]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: Fix possible buffer overflows at parsing bss descriptor
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 May 2019 12:52:19 +0000 (14:52 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 30 May 2019 11:22:10 +0000 (14:22 +0300)
commit13ec7f10b87f5fc04c4ccbd491c94c7980236a74
tree051fc20093146cd57bbaa8d8e224f08111443a8e
parent6aca09771db4277a78853d6ac680d8d5f0d915e3
mwifiex: Fix possible buffer overflows at parsing bss descriptor

mwifiex_update_bss_desc_with_ie() calls memcpy() unconditionally in
a couple places without checking the destination size.  Since the
source is given from user-space, this may trigger a heap buffer
overflow.

Fix it by putting the length check before performing memcpy().

This fix addresses CVE-2019-3846.

Reported-by: huangwen <huangwen@venustech.com.cn>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/mwifiex/scan.c