summaryrefslogtreecommitdiff
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2019-07-29 16:23:32 +0800
committerJohannes Berg <johannes.berg@intel.com>2019-07-29 16:20:34 +0200
commitb55f3b841099e641bdb2701d361a4c304e2dbd6f (patch)
tree0d6ddf7fb0db9a3a9b1a8ad435d08aae0a6557aa /net/mac80211/iface.c
parent05aaa5c97dce4c10a9e7eae2f1569a684e0c5ced (diff)
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>
Diffstat (limited to 'net/mac80211/iface.c')
0 files changed, 0 insertions, 0 deletions