================================================================== BUG: KASAN: slab-out-of-bounds in cfg80211_wext_freq+0x1a0/0x1c0 net/wireless/wext-compat.c:238 Read of size 2 at addr ffff88803513ad40 by task syz-executor.3/7973 CPU: 1 PID: 7973 Comm: syz-executor.3 Not tainted 6.10.0-rc3-syzkaller-00044-g2ccbdf43d5e7 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 cfg80211_wext_freq+0x1a0/0x1c0 net/wireless/wext-compat.c:238 cfg80211_wext_siwscan+0x6e2/0xf30 net/wireless/scan.c:3463 ioctl_standard_iw_point+0x599/0xc10 net/wireless/wext-core.c:867 ioctl_standard_call+0x191/0x210 net/wireless/wext-core.c:1052 wireless_process_ioctl+0x4e3/0x5e0 net/wireless/wext-core.c:983 wext_ioctl_dispatch net/wireless/wext-core.c:1016 [inline] wext_ioctl_dispatch net/wireless/wext-core.c:1004 [inline] wext_handle_ioctl+0x23d/0x2c0 net/wireless/wext-core.c:1077 sock_ioctl+0x3ac/0x6c0 net/socket.c:1275 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x193/0x220 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f83a8e7cee9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f83a9c7f0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f83a8fabf80 RCX: 00007f83a8e7cee9 RDX: 0000000020000000 RSI: 0000000000008b18 RDI: 000000000000000b RBP: 00007f83a8ec949e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f83a8fabf80 R15: 00007ffe9b3d77c8 Allocated by task 7973: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:370 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:387 kasan_kmalloc include/linux/kasan.h:211 [inline] __do_kmalloc_node mm/slub.c:4122 [inline] __kmalloc_noprof+0x1ec/0x410 mm/slub.c:4135 kmalloc_noprof include/linux/slab.h:664 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] ioctl_standard_iw_point+0x3c6/0xc10 net/wireless/wext-core.c:828 ioctl_standard_call+0x191/0x210 net/wireless/wext-core.c:1052 wireless_process_ioctl+0x4e3/0x5e0 net/wireless/wext-core.c:983 wext_ioctl_dispatch net/wireless/wext-core.c:1016 [inline] wext_ioctl_dispatch net/wireless/wext-core.c:1004 [inline] wext_handle_ioctl+0x23d/0x2c0 net/wireless/wext-core.c:1077 sock_ioctl+0x3ac/0x6c0 net/socket.c:1275 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl fs/ioctl.c:893 [inline] __x64_sys_ioctl+0x193/0x220 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88803513ac00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 4 bytes to the right of allocated 316-byte region [ffff88803513ac00, ffff88803513ad3c) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x35138 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffefff(slab) raw: 00fff00000000040 ffff888015442c80 ffffea0000955f00 dead000000000002 raw: 0000000000000000 0000000080100010 00000001ffffefff 0000000000000000 head: 00fff00000000040 ffff888015442c80 ffffea0000955f00 dead000000000002 head: 0000000000000000 0000000080100010 00000001ffffefff 0000000000000000 head: 00fff00000000002 ffffea0000d44e01 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 97, tgid 97 (kworker/u32:4), ts 56880474569, free_ts 56761662650 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1468 prep_new_page mm/page_alloc.c:1476 [inline] get_page_from_freelist+0x136a/0x2e50 mm/page_alloc.c:3420 __alloc_pages_noprof+0x22b/0x2460 mm/page_alloc.c:4678 __alloc_pages_node_noprof include/linux/gfp.h:269 [inline] alloc_pages_node_noprof include/linux/gfp.h:296 [inline] alloc_slab_page+0x56/0x110 mm/slub.c:2265 allocate_slab mm/slub.c:2428 [inline] new_slab+0x84/0x260 mm/slub.c:2481 ___slab_alloc+0xdac/0x1870 mm/slub.c:3667 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3757 __slab_alloc_node mm/slub.c:3810 [inline] slab_alloc_node mm/slub.c:3989 [inline] kmalloc_trace_noprof+0x2b4/0x300 mm/slub.c:4148 kmalloc_noprof include/linux/slab.h:660 [inline] kzalloc_noprof include/linux/slab.h:778 [inline] mca_alloc net/ipv6/mcast.c:880 [inline] __ipv6_dev_mc_inc+0x2b7/0xc50 net/ipv6/mcast.c:936 addrconf_join_solict net/ipv6/addrconf.c:2240 [inline] addrconf_dad_begin net/ipv6/addrconf.c:4101 [inline] addrconf_dad_work+0x232/0x1500 net/ipv6/addrconf.c:4226 process_one_work+0x9fb/0x1b60 kernel/workqueue.c:3231 process_scheduled_works kernel/workqueue.c:3312 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 page last free pid 5185 tgid 5185 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1088 [inline] free_unref_page+0x64a/0xe40 mm/page_alloc.c:2583 __folio_put+0x239/0x360 mm/swap.c:129 folio_put include/linux/mm.h:1508 [inline] put_page include/linux/mm.h:1580 [inline] skb_page_unref include/linux/skbuff_ref.h:44 [inline] __skb_frag_unref include/linux/skbuff_ref.h:57 [inline] skb_release_data+0x5df/0x980 net/core/skbuff.c:1102 skb_release_all net/core/skbuff.c:1173 [inline] __kfree_skb net/core/skbuff.c:1187 [inline] napi_consume_skb+0x1b8/0x2a0 net/core/skbuff.c:1485 skb_defer_free_flush net/core/dev.c:6270 [inline] skb_defer_free_flush net/core/dev.c:6254 [inline] net_rx_action+0x3f9/0xf10 net/core/dev.c:6888 handle_softirqs+0x216/0x8f0 kernel/softirq.c:554 do_softirq kernel/softirq.c:455 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:442 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:382 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:851 [inline] __dev_queue_xmit+0x872/0x4130 net/core/dev.c:4420 dev_queue_xmit include/linux/netdevice.h:3095 [inline] neigh_hh_output include/net/neighbour.h:526 [inline] neigh_output include/net/neighbour.h:540 [inline] ip_finish_output2+0x16fc/0x25e0 net/ipv4/ip_output.c:235 __ip_finish_output net/ipv4/ip_output.c:313 [inline] __ip_finish_output+0x49e/0x950 net/ipv4/ip_output.c:295 ip_finish_output+0x31/0x310 net/ipv4/ip_output.c:323 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x13b/0x2a0 net/ipv4/ip_output.c:433 dst_output include/net/dst.h:450 [inline] ip_local_out+0x33e/0x4a0 net/ipv4/ip_output.c:129 __ip_queue_xmit+0x747/0x1940 net/ipv4/ip_output.c:535 __tcp_transmit_skb+0x29c1/0x3dc0 net/ipv4/tcp_output.c:1466 Memory state around the buggy address: ffff88803513ac00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88803513ac80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88803513ad00: 00 00 00 00 00 00 00 04 fc fc fc fc fc fc fc fc ^ ffff88803513ad80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803513ae00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================