================================================================== BUG: KASAN: slab-out-of-bounds in instrument_copy_to_user include/linux/instrumented.h:118 [inline] BUG: KASAN: slab-out-of-bounds in _copy_to_user lib/usercopy.c:32 [inline] BUG: KASAN: slab-out-of-bounds in _copy_to_user+0xc7/0x150 lib/usercopy.c:26 Read of size 654 at addr ffff88806ff3b000 by task syz-executor.4/2260 CPU: 1 PID: 2260 Comm: syz-executor.4 Not tainted 5.16.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x2ed mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_copy_to_user include/linux/instrumented.h:118 [inline] _copy_to_user lib/usercopy.c:32 [inline] _copy_to_user+0xc7/0x150 lib/usercopy.c:26 copy_to_user include/linux/uaccess.h:200 [inline] __htab_map_lookup_and_delete_batch+0xf59/0x18b0 kernel/bpf/hashtab.c:1770 bpf_map_do_batch+0x2dd/0x5c0 kernel/bpf/syscall.c:4221 __sys_bpf+0x288b/0x5980 kernel/bpf/syscall.c:4693 __do_sys_bpf kernel/bpf/syscall.c:4737 [inline] __se_sys_bpf kernel/bpf/syscall.c:4735 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4735 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f1971932ae9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f196ee66188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007f1971a460e0 RCX: 00007f1971932ae9 RDX: 0000000000000038 RSI: 0000000020000040 RDI: 0000000000000019 RBP: 00007f197198cf6d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff27b2fccf R14: 00007f196ee66300 R15: 0000000000022000 Allocated by task 2260: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa6/0xd0 mm/kasan/common.c:522 kmalloc_node include/linux/slab.h:613 [inline] kvmalloc_node+0x61/0x120 mm/util.c:587 kvmalloc include/linux/slab.h:741 [inline] kvmalloc_array include/linux/slab.h:759 [inline] __htab_map_lookup_and_delete_batch+0x548/0x18b0 kernel/bpf/hashtab.c:1648 bpf_map_do_batch+0x2dd/0x5c0 kernel/bpf/syscall.c:4221 __sys_bpf+0x288b/0x5980 kernel/bpf/syscall.c:4693 __do_sys_bpf kernel/bpf/syscall.c:4737 [inline] __se_sys_bpf kernel/bpf/syscall.c:4735 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4735 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xb5/0xe0 mm/kasan/generic.c:348 kvfree_call_rcu+0x74/0x990 kernel/rcu/tree.c:3550 put_css_set_locked+0xa93/0x1000 kernel/cgroup/cgroup.c:988 cgroup_migrate_finish+0x380/0x650 kernel/cgroup/cgroup.c:2614 cgroup_attach_task+0x466/0x7a0 kernel/cgroup/cgroup.c:2806 cgroup_attach_task_all+0xde/0x140 kernel/cgroup/cgroup-v1.c:70 vhost_attach_cgroups_work+0x3a/0x90 drivers/vhost/vhost.c:531 vhost_worker+0x23d/0x3d0 drivers/vhost/vhost.c:372 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Second to last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xb5/0xe0 mm/kasan/generic.c:348 kvfree_call_rcu+0x74/0x990 kernel/rcu/tree.c:3550 put_css_set_locked+0xa93/0x1000 kernel/cgroup/cgroup.c:988 cgroup_migrate_finish+0x380/0x650 kernel/cgroup/cgroup.c:2614 cgroup_attach_task+0x466/0x7a0 kernel/cgroup/cgroup.c:2806 cgroup_attach_task_all+0xde/0x140 kernel/cgroup/cgroup-v1.c:70 vhost_attach_cgroups_work+0x3a/0x90 drivers/vhost/vhost.c:531 vhost_worker+0x23d/0x3d0 drivers/vhost/vhost.c:372 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff88806ff3b000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 0 bytes inside of 1024-byte region [ffff88806ff3b000, ffff88806ff3b400) The buggy address belongs to the page: page:ffffea0001bfcec0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6ff3b flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000d89088 ffffea0001ead408 ffff888010c40700 raw: 0000000000000000 ffff88806ff3b000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x242220(__GFP_HIGH|__GFP_ATOMIC|__GFP_NOWARN|__GFP_COMP|__GFP_THISNODE), pid 967, ts 240324347453, free_ts 239871905381 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 __alloc_pages_node include/linux/gfp.h:570 [inline] kmem_getpages mm/slab.c:1377 [inline] cache_grow_begin+0x75/0x470 mm/slab.c:2593 cache_alloc_refill+0x27f/0x380 mm/slab.c:2965 ____cache_alloc mm/slab.c:3048 [inline] ____cache_alloc mm/slab.c:3031 [inline] __do_cache_alloc mm/slab.c:3275 [inline] slab_alloc mm/slab.c:3316 [inline] kmem_cache_alloc_trace+0x380/0x4a0 mm/slab.c:3573 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:724 [inline] ieee802_11_parse_elems_crc+0xd5/0x1060 net/mac80211/util.c:1471 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2208 [inline] ieee80211_bss_info_update+0x42c/0xb30 net/mac80211/scan.c:212 ieee80211_rx_bss_info net/mac80211/ibss.c:1119 [inline] ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1610 [inline] ieee80211_ibss_rx_queued_mgmt+0x19cf/0x3130 net/mac80211/ibss.c:1639 ieee80211_iface_process_skb net/mac80211/iface.c:1468 [inline] ieee80211_iface_work+0xa65/0xd00 net/mac80211/iface.c:1522 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2298 worker_thread+0x658/0x11f0 kernel/workqueue.c:2445 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page_list+0x1a9/0xfa0 mm/page_alloc.c:3425 release_pages+0x3f4/0x1480 mm/swap.c:980 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu mm/mmu_gather.c:249 [inline] tlb_finish_mmu+0x165/0x8c0 mm/mmu_gather.c:340 exit_mmap+0x1ea/0x630 mm/mmap.c:3172 __mmput+0x122/0x4b0 kernel/fork.c:1113 mmput+0x56/0x60 kernel/fork.c:1134 exit_mm kernel/exit.c:507 [inline] do_exit+0xb27/0x2b40 kernel/exit.c:819 do_group_exit+0x125/0x310 kernel/exit.c:929 __do_sys_exit_group kernel/exit.c:940 [inline] __se_sys_exit_group kernel/exit.c:938 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:938 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff88806ff3b100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88806ff3b180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88806ff3b200: 00 00 00 00 01 fc fc fc fc fc fc fc fc fc fc fc ^ ffff88806ff3b280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806ff3b300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================