]> asedeno.scripts.mit.edu Git - linux.git/commit
libertas: Fix two buffer overflows at parsing bss descriptor
authorWen Huang <huangwenabc@gmail.com>
Thu, 28 Nov 2019 10:51:04 +0000 (18:51 +0800)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 18 Dec 2019 18:52:14 +0000 (20:52 +0200)
commite5e884b42639c74b5b57dc277909915c0aefc8bb
tree27fa276969946cf39207ce5fc8a3cea18c381c07
parentb43e36d75e8727f78892652a25967a1ffa03d1d1
libertas: Fix two buffer overflows at parsing bss descriptor

add_ie_rates() copys rates without checking the length
in bss descriptor from remote AP.when victim connects to
remote attacker, this may trigger buffer overflow.
lbs_ibss_join_existing() copys rates without checking the length
in bss descriptor from remote IBSS node.when victim connects to
remote attacker, this may trigger buffer overflow.
Fix them by putting the length check before performing copy.

This fix addresses CVE-2019-14896 and CVE-2019-14897.
This also fix build warning of mixed declarations and code.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Wen Huang <huangwenabc@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/marvell/libertas/cfg.c