linux-uconsole/drivers/net/wireless
Jia-Ju Bai ba42212ac0 mac80211_hwsim: Fix possible null-pointer dereferences in hwsim_dump_radio_nl()
[ Upstream commit b55f3b8410 ]

In hwsim_dump_radio_nl(), when genlmsg_put() on line 3617 fails, hdr is
assigned to NULL. Then hdr is used on lines 3622 and 3623:
    genl_dump_check_consistent(cb, hdr);
    genlmsg_end(skb, hdr);

Thus, possible null-pointer dereferences may occur.

To fix these bugs, hdr is used here when it is not NULL.

This bug is found by a static analysis tool STCheck written by us.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20190729082332.28895-1-baijiaju1990@gmail.com
[put braces on all branches]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-08-29 08:28:33 +02:00
..
admtek
ath ath10k: Change the warning message string 2019-08-04 09:30:53 +02:00
atmel at76c50x-usb: Don't register led_trigger if usb_register_driver failed 2019-05-31 06:46:05 -07:00
broadcom brcmfmac: sdio: Don't tune while the card is off 2019-06-25 11:35:54 +08:00
cisco airo: remove unused variables len and dev and clean up formatting 2018-07-31 10:17:19 +03:00
intel iwlwifi: mvm: fix version check for GEO_TX_POWER_LIMIT support 2019-08-16 10:12:54 +02:00
intersil p54usb: Fix race between disconnect and firmware loading 2019-07-14 08:11:19 +02:00
marvell mwifiex: fix 802.11n/WPA detection 2019-08-16 10:12:53 +02:00
mediatek mt7601u: fix possible memory leak when the device is disconnected 2019-07-26 09:14:11 +02:00
quantenna qtnfmac: implement basic WoWLAN support 2018-08-02 21:55:49 +03:00
ralink rt2x00: do not increment sequence number while re-transmitting 2019-04-27 09:36:38 +02:00
realtek rtlwifi: rtl8192cu: fix error handle when usb probe failed 2019-07-26 09:14:11 +02:00
rsi rsi: Fix NULL pointer dereference in kmalloc 2019-05-31 06:46:15 -07:00
st net: cw1200: fix a NULL pointer dereference 2019-05-31 06:46:15 -07:00
ti wlcore: Fix memory leak in case wl12xx_fetch_firmware failure 2019-04-05 22:33:16 +02:00
zydas zd1211rw: use irqsave() in USB's complete callback 2018-06-27 19:12:43 +03:00
Kconfig
mac80211_hwsim.c mac80211_hwsim: Fix possible null-pointer dereferences in hwsim_dump_radio_nl() 2019-08-29 08:28:33 +02:00
mac80211_hwsim.h
Makefile
ray_cs.c ray_cs: remove redundant pointer 'p' 2018-07-31 10:19:50 +03:00
ray_cs.h
rayctl.h
rndis_wlan.c wireless-drivers: use BIT_ULL for NL80211_STA_INFO_ attribute types 2018-06-27 19:07:39 +03:00
wl3501.h
wl3501_cs.c