]> git.baikalelectronics.ru Git - kernel.git/commit
rtlwifi: rtl_pci: Fix problem of too small skb->len
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 21 Oct 2019 00:56:58 +0000 (19:56 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 23 Oct 2019 10:32:39 +0000 (13:32 +0300)
commitd69f2014465c294d9663b5293cf30e2e6bb5c7b1
treee371aa1c582c7c9005732e115a3fa72989799df6
parent8fe539a9eeb2e6e952038ca35c42962013e9c50e
rtlwifi: rtl_pci: Fix problem of too small skb->len

In commit 9334c7981fd3 ("mac80211: Properly handle SKB with radiotap
only"), buffers whose length is too short cause a WARN_ON(1) to be
executed. This change exposed a fault in rtlwifi drivers, which is fixed
by regarding packets with skb->len <= FCS_LEN as though they are in error
and dropping them. The test is now annotated as likely.

Cc: Stable <stable@vger.kernel.org> # v5.0+
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/realtek/rtlwifi/pci.c