Markus Theil
25e809bf8b
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:32:08 +02:00
..
2020-10-12 10:05:47 +02:00
2021-01-17 14:16:55 +01:00
2020-08-03 15:48:32 -07:00
2020-10-31 12:26:30 -07:00
2020-07-25 17:49:04 -07:00
2020-11-27 08:02:55 +01:00
2021-03-07 12:34:10 +01:00
2021-01-27 11:55:07 +01:00
2020-10-15 12:33:24 -07:00
2021-03-30 14:32:04 +02:00
2020-09-05 15:57:05 -07:00
2021-03-30 14:32:03 +02:00
2020-10-12 15:29:27 +02:00
2021-03-30 14:32:08 +02:00
2021-01-23 16:04:01 +01:00
2021-03-30 14:32:01 +02:00
2020-08-23 17:36:59 -05:00
2021-03-17 17:06:22 +01:00
2021-03-17 17:06:16 +01:00
2021-03-07 12:34:07 +01:00
2020-10-02 19:11:11 -07:00
2021-03-30 14:32:06 +02:00
2021-03-30 14:32:06 +02:00
2021-03-07 12:34:05 +01:00
2020-07-24 15:41:54 -07:00
2021-02-13 13:55:02 +01:00
2021-03-17 17:06:11 +01:00
2020-08-27 07:55:59 -07:00
2021-02-10 09:29:14 +01:00
2020-07-24 15:41:54 -07:00
2021-03-30 14:32:08 +02:00
2020-09-08 20:12:58 -07:00
2021-03-17 17:06:11 +01:00
2021-03-30 14:32:01 +02:00
2021-01-12 20:18:10 +01:00
2021-03-30 14:32:06 +02:00
2021-03-17 17:06:15 +01:00
2020-10-09 20:22:32 -07:00
2020-08-23 17:36:59 -05:00
2021-03-04 11:37:36 +01:00
2021-02-23 15:53:23 +01:00
2021-02-23 15:53:23 +01:00
2020-08-23 17:36:59 -05:00
2021-03-07 12:34:07 +01:00
2021-03-30 14:31:58 +02:00
2021-02-26 10:12:59 +01:00
2020-11-12 09:18:06 +01:00
2020-11-20 10:04:58 -08:00
2021-02-17 11:02:28 +01:00
2021-03-30 14:32:01 +02:00
2021-02-17 11:02:29 +01:00
2020-11-19 10:59:19 -08:00
2021-03-25 09:04:08 +01:00
2021-02-07 15:37:12 +01:00
2021-03-30 14:31:59 +02:00
2021-02-23 15:53:23 +01:00
2020-10-15 18:42:13 -07:00
2021-03-30 14:32:03 +02:00
2020-10-02 19:11:11 -07:00
2021-02-03 23:28:38 +01:00
2020-12-02 17:26:36 -08:00
2021-01-27 11:55:10 +01:00
2021-02-03 23:28:45 +01:00
2020-10-03 00:02:13 -04:00
2020-06-30 15:57:34 -07:00
2020-09-30 18:01:26 -07:00
2020-10-05 18:40:01 -07:00