linux_dsm_epyc7002/drivers/net/wireless
Jia-Ju Bai b55f3b8410 mac80211_hwsim: Fix possible null-pointer dereferences in hwsim_dump_radio_nl()
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>
2019-07-29 16:20:34 +02:00
..
admtek treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 501 2019-06-19 17:09:56 +02:00
ath wireless: fix nl80211 vendor commands 2019-07-20 21:37:26 +02:00
atmel treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
broadcom wireless: fix nl80211 vendor commands 2019-07-20 21:37:26 +02:00
cisco airo: switch to skcipher interface 2019-06-25 08:12:20 +03:00
intel iwlwifi: pcie: add support for qu c-step devices 2019-07-15 20:46:00 +03:00
intersil Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2019-07-11 10:55:49 -07:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-07-08 19:48:57 -07:00
mediatek kernel: fix typos and some coding style in comments 2019-07-16 19:23:21 -07:00
quantenna qtnfmac: Use struct_size() in kzalloc() 2019-06-25 08:01:32 +03:00
ralink rt2x00usb: fix rx queue hang 2019-07-15 20:52:18 +03:00
realtek scripts/spelling.txt: drop "sepc" from the misspelling list 2019-07-12 11:05:41 -07:00
rsi rsi: Properly initialize data in rsi_sdio_ta_reset 2019-05-28 14:31:36 +03:00
st treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ti wireless: fix nl80211 vendor commands 2019-07-20 21:37:26 +02:00
zydas treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mac80211_hwsim.c mac80211_hwsim: Fix possible null-pointer dereferences in hwsim_dump_radio_nl() 2019-07-29 16:20:34 +02:00
mac80211_hwsim.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Makefile mac80211-next: rtnetlink wifi simulation device 2018-12-05 15:31:31 +01:00
ray_cs.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 416 2019-06-05 17:37:15 +02:00
ray_cs.h
rayctl.h
rndis_wlan.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
virt_wifi.c timekeeping: Use proper clock specifier names in functions 2019-06-22 12:11:27 +02:00
wl3501_cs.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
wl3501.h