================================================================== BUG: KASAN: slab-out-of-bounds in ieee80211_add_virtual_monitor+0xa94/0xb30 net/mac80211/iface.c:1255 Read of size 1 at addr ffff88805261bd50 by task syz.1.6484/2725 CPU: 2 UID: 0 PID: 2725 Comm: syz.1.6484 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xcd/0x630 mm/kasan/report.c:482 kasan_report+0xe0/0x110 mm/kasan/report.c:595 ieee80211_add_virtual_monitor+0xa94/0xb30 net/mac80211/iface.c:1255 ieee80211_do_stop+0x1de1/0x2520 net/mac80211/iface.c:746 ieee80211_stop+0x169/0x320 net/mac80211/iface.c:828 __dev_close_many+0x29b/0x700 net/core/dev.c:1756 __dev_close net/core/dev.c:1768 [inline] __dev_change_flags+0x4d8/0x6f0 net/core/dev.c:9732 netif_change_flags+0x8d/0x160 net/core/dev.c:9797 do_setlink.constprop.0+0xb53/0x4380 net/core/rtnetlink.c:3158 rtnl_changelink net/core/rtnetlink.c:3776 [inline] __rtnl_newlink net/core/rtnetlink.c:3935 [inline] rtnl_newlink+0x1376/0x1f50 net/core/rtnetlink.c:4072 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6958 netlink_rcv_skb+0x158/0x420 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8c8/0xdd0 net/netlink/af_netlink.c:1894 sock_sendmsg_nosec net/socket.c:727 [inline] __sock_sendmsg net/socket.c:742 [inline] ____sys_sendmsg+0xa5d/0xc30 net/socket.c:2592 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2646 __sys_sendmsg+0x16d/0x220 net/socket.c:2678 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xe8/0x680 arch/x86/entry/syscall_32.c:307 do_fast_syscall_32+0x32/0x80 arch/x86/entry/syscall_32.c:332 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7f95579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f544455c EFLAGS: 00000296 ORIG_RAX: 0000000000000172 RAX: ffffffffffffffda RBX: 0000000000000007 RCX: 0000000080000600 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88805261bc00 pfn:0x52618 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff88804cf34c02 flags: 0x4fff00000000040(head|node=1|zone=1|lastcpupid=0x7ff) page_type: f8(unknown) raw: 04fff00000000040 0000000000000000 dead000000000122 0000000000000000 raw: ffff88805261bc00 0000000000000000 00000000f8000000 ffff88804cf34c02 head: 04fff00000000040 0000000000000000 dead000000000122 0000000000000000 head: ffff88805261bc00 0000000000000000 00000000f8000000 ffff88804cf34c02 head: 04fff00000000002 ffffea0001498601 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0x546dc0(GFP_USER|__GFP_ZERO|__GFP_NOWARN|__GFP_RETRY_MAYFAIL|__GFP_COMP|__GFP_ACCOUNT), pid 825, tgid 824 (syz.1.6089), ts 2167589719334, free_ts 2167526714294 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846 prep_new_page mm/page_alloc.c:1854 [inline] get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915 __alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486 ___kmalloc_large_node+0x10c/0x150 mm/slub.c:5598 __kmalloc_large_node_noprof+0x1c/0x70 mm/slub.c:5629 __do_kmalloc_node mm/slub.c:5645 [inline] __kvmalloc_node_noprof.cold+0xf/0x8e mm/slub.c:7136 alloc_netdev_mqs+0xd7/0x1550 net/core/dev.c:11997 ieee80211_if_add+0x18a/0x1a10 net/mac80211/iface.c:2227 ieee80211_add_iface+0xaf/0x560 net/mac80211/cfg.c:217 rdev_add_virtual_intf net/wireless/rdev-ops.h:50 [inline] _nl80211_new_interface net/wireless/nl80211.c:4706 [inline] nl80211_new_interface+0x6ba/0x1100 net/wireless/nl80211.c:4764 genl_family_rcv_msg_doit+0x209/0x2f0 net/netlink/genetlink.c:1115 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline] genl_rcv_msg+0x55c/0x800 net/netlink/genetlink.c:1210 netlink_rcv_skb+0x158/0x420 net/netlink/af_netlink.c:2550 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1344 page last free pid 825 tgid 824 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1395 [inline] __free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943 discard_slab mm/slub.c:3346 [inline] __put_partials+0x130/0x170 mm/slub.c:3886 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4c/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:349 kasan_slab_alloc include/linux/kasan.h:252 [inline] slab_post_alloc_hook mm/slub.c:4953 [inline] slab_alloc_node mm/slub.c:5263 [inline] kmem_cache_alloc_node_noprof+0x298/0x800 mm/slub.c:5315 __alloc_skb+0x156/0x410 net/core/skbuff.c:679 alloc_skb include/linux/skbuff.h:1383 [inline] nlmsg_new include/net/netlink.h:1055 [inline] rtmsg_ifinfo_build_skb+0x81/0x280 net/core/rtnetlink.c:4407 rtmsg_ifinfo_event net/core/rtnetlink.c:4449 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:4439 [inline] rtmsg_ifinfo+0x9f/0x1a0 net/core/rtnetlink.c:4458 netif_state_change+0x17f/0x380 net/core/dev.c:1586 do_setlink.constprop.0+0x3570/0x4380 net/core/rtnetlink.c:3405 rtnl_group_changelink net/core/rtnetlink.c:3790 [inline] __rtnl_newlink net/core/rtnetlink.c:3944 [inline] rtnl_newlink+0x1807/0x1f50 net/core/rtnetlink.c:4072 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:6958 netlink_rcv_skb+0x158/0x420 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline] netlink_unicast+0x5aa/0x870 net/netlink/af_netlink.c:1344 netlink_sendmsg+0x8c8/0xdd0 net/netlink/af_netlink.c:1894 Memory state around the buggy address: ffff88805261bc00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ffff88805261bc80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe >ffff88805261bd00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ^ ffff88805261bd80: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ffff88805261be00: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe ================================================================== ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi