Markus Theil
92b9e3deff
mac80211: fix double free in ibss_leave
...
commit 3bd801b14e0c5d29eeddc7336558beb3344efaa3 upstream.
Clear beacon ie pointer and ie length after free
in order to prevent double free.
==================================================================
BUG: KASAN: double-free or invalid-free \
in ieee80211_ibss_leave+0x83/0xe0 net/mac80211/ibss.c:1876
CPU: 0 PID: 8472 Comm: syz-executor100 Not tainted 5.11.0-rc6-syzkaller #0
Call Trace:
__dump_stack lib/dump_stack.c:79 [inline]
dump_stack+0x107/0x163 lib/dump_stack.c:120
print_address_description.constprop.0.cold+0x5b/0x2c6 mm/kasan/report.c:230
kasan_report_invalid_free+0x51/0x80 mm/kasan/report.c:355
____kasan_slab_free+0xcc/0xe0 mm/kasan/common.c:341
kasan_slab_free include/linux/kasan.h:192 [inline]
__cache_free mm/slab.c:3424 [inline]
kfree+0xed/0x270 mm/slab.c:3760
ieee80211_ibss_leave+0x83/0xe0 net/mac80211/ibss.c:1876
rdev_leave_ibss net/wireless/rdev-ops.h:545 [inline]
__cfg80211_leave_ibss+0x19a/0x4c0 net/wireless/ibss.c:212
__cfg80211_leave+0x327/0x430 net/wireless/core.c:1172
cfg80211_leave net/wireless/core.c:1221 [inline]
cfg80211_netdev_notifier_call+0x9e8/0x12c0 net/wireless/core.c:1335
notifier_call_chain+0xb5/0x200 kernel/notifier.c:83
call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2040
call_netdevice_notifiers_extack net/core/dev.c:2052 [inline]
call_netdevice_notifiers net/core/dev.c:2066 [inline]
__dev_close_many+0xee/0x2e0 net/core/dev.c:1586
__dev_close net/core/dev.c:1624 [inline]
__dev_change_flags+0x2cb/0x730 net/core/dev.c:8476
dev_change_flags+0x8a/0x160 net/core/dev.c:8549
dev_ifsioc+0x210/0xa70 net/core/dev_ioctl.c:265
dev_ioctl+0x1b1/0xc40 net/core/dev_ioctl.c:511
sock_do_ioctl+0x148/0x2d0 net/socket.c:1060
sock_ioctl+0x477/0x6a0 net/socket.c:1177
vfs_ioctl fs/ioctl.c:48 [inline]
__do_sys_ioctl fs/ioctl.c:753 [inline]
__se_sys_ioctl fs/ioctl.c:739 [inline]
__x64_sys_ioctl+0x193/0x200 fs/ioctl.c:739
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
Reported-by: syzbot+93976391bf299d425f44@syzkaller.appspotmail.com
Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
Link: https://lore.kernel.org/r/20210213133653.367130-1-markus.theil@tu-ilmenau.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-30 14:35:29 +02:00
..
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-07-31 10:51:17 +02:00
2019-06-19 17:09:55 +02:00
2021-03-30 14:35:26 +02:00
2019-05-21 10:50:45 +02:00
2017-11-02 11:10:55 +01:00
2019-06-22 08:59:24 -04:00
2017-11-02 11:10:55 +01:00
2019-10-01 17:56:19 +02:00
2017-11-02 11:10:55 +01:00
2020-04-01 11:02:01 +02:00
2017-11-02 11:10:55 +01:00
2019-07-26 13:29:10 +02:00
2017-11-02 11:10:55 +01:00
2021-02-10 09:25:29 +01:00
2019-07-26 13:08:28 +02:00
2019-06-05 17:37:16 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-08-21 10:58:32 +02:00
2019-07-29 16:40:22 +02:00
2021-03-30 14:35:29 +02:00
2021-02-03 23:26:00 +01:00
2021-02-03 23:26:00 +01:00
2019-07-08 20:57:08 -07:00
2020-04-01 11:02:01 +02:00
2019-09-11 09:33:28 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-04-29 16:33:18 +02:00
2018-10-11 16:01:01 +02:00
2021-03-04 10:26:17 +01:00
2020-12-21 13:27:03 +01:00
2019-07-26 16:14:12 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-05-02 08:48:58 +02:00
2019-07-26 16:14:12 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-05-10 10:31:32 +02:00
2019-06-19 17:09:55 +02:00
2019-07-26 13:08:28 +02:00
2017-11-02 11:10:55 +01:00
2021-02-10 09:25:29 +01:00
2020-04-29 16:33:18 +02:00
2018-10-11 16:01:05 +02:00
2019-06-19 17:09:55 +02:00
2020-04-29 16:33:18 +02:00
2019-08-21 11:10:13 +02:00
2020-11-24 13:29:23 +01:00
2020-11-24 13:29:23 +01:00
2021-02-07 15:35:48 +01:00
2019-10-07 22:10:50 +02:00
2021-02-13 13:52:55 +01:00
2020-11-24 13:29:23 +01:00
2020-04-01 11:02:01 +02:00
2020-05-10 10:31:32 +02:00
2019-06-17 15:55:34 -07:00
2020-02-05 21:22:46 +00:00
2019-07-08 20:57:08 -07:00
2019-03-29 11:20:36 +01:00
2017-11-02 11:10:55 +01:00
2019-07-26 13:08:28 +02:00
2021-01-23 15:58:00 +01:00
2020-03-05 16:43:41 +01:00
2020-12-30 11:51:25 +01:00
2019-07-08 20:57:08 -07:00
2019-07-08 20:57:08 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-07-26 16:14:12 +02:00
2019-06-19 17:09:55 +02:00