Skip to content

Commit 1165dd7

Browse files
Qiujun Huanggregkh
authored andcommitted
staging: wlan-ng: fix use-after-free Read in hfa384x_usbin_callback
We can't handle the case length > WLAN_DATA_MAXLEN. Because the size of rxfrm->data is WLAN_DATA_MAXLEN(2312), and we can't read more than that. Thanks-to: Hillf Danton <[email protected]> Reported-and-tested-by: [email protected] Signed-off-by: Qiujun Huang <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b67b7b0 commit 1165dd7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/staging/wlan-ng/hfa384x_usb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3376,6 +3376,8 @@ static void hfa384x_int_rxmonitor(struct wlandevice *wlandev,
33763376
WLAN_HDR_A4_LEN + WLAN_DATA_MAXLEN + WLAN_CRC_LEN)) {
33773377
pr_debug("overlen frm: len=%zd\n",
33783378
skblen - sizeof(struct p80211_caphdr));
3379+
3380+
return;
33793381
}
33803382

33813383
skb = dev_alloc_skb(skblen);

0 commit comments

Comments
 (0)