================================================================== 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 42 at addr ffff888019fb5b80 by task syz-executor.1/16296 CPU: 1 PID: 16296 Comm: syz-executor.1 Not tainted 5.14.0-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+0x6c/0x2d6 mm/kasan/report.c:256 __kasan_report mm/kasan/report.c:442 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:459 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+0xf19/0x1900 kernel/bpf/hashtab.c:1768 bpf_map_do_batch+0x3d5/0x510 kernel/bpf/syscall.c:4176 __sys_bpf+0x2706/0x5df0 kernel/bpf/syscall.c:4647 __do_sys_bpf kernel/bpf/syscall.c:4691 [inline] __se_sys_bpf kernel/bpf/syscall.c:4689 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4689 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:0x4665f9 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:00007f10b36e5188 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 000000000056c1a8 RCX: 00000000004665f9 RDX: 0000000000000038 RSI: 0000000020000040 RDI: 0000000000000019 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056c1a8 R13: 00007ffdc3f249bf R14: 00007f10b36e5300 R15: 0000000000022000 Allocated by task 16296: kasan_save_stack+0x1b/0x40 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+0xa1/0xd0 mm/kasan/common.c:522 kmalloc_node include/linux/slab.h:614 [inline] kvmalloc_node+0x61/0x120 mm/util.c:587 kvmalloc include/linux/mm.h:805 [inline] kvmalloc_array include/linux/mm.h:823 [inline] __htab_map_lookup_and_delete_batch+0x525/0x1900 kernel/bpf/hashtab.c:1647 bpf_map_do_batch+0x3d5/0x510 kernel/bpf/syscall.c:4176 __sys_bpf+0x2706/0x5df0 kernel/bpf/syscall.c:4647 __do_sys_bpf kernel/bpf/syscall.c:4691 [inline] __se_sys_bpf kernel/bpf/syscall.c:4689 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:4689 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 The buggy address belongs to the object at ffff888019fb5b80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 0 bytes inside of 64-byte region [ffff888019fb5b80, ffff888019fb5bc0) The buggy address belongs to the page: page:ffffea000067ed40 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888019fb5e00 pfn:0x19fb5 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0000753748 ffffea0001f8b888 ffff888010c40200 raw: ffff888019fb5e00 ffff888019fb5000 0000000100000017 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 1099, ts 172521316956, free_ts 172501465563 prep_new_page mm/page_alloc.c:2424 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4153 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5375 __alloc_pages_node include/linux/gfp.h:570 [inline] kmem_getpages mm/slab.c:1377 [inline] cache_grow_begin+0x75/0x460 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] __do_kmalloc mm/slab.c:3700 [inline] __kmalloc+0x3d5/0x4d0 mm/slab.c:3711 kmalloc include/linux/slab.h:596 [inline] ieee802_11_parse_elems_crc+0x121/0xfe0 net/mac80211/util.c:1477 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2207 [inline] ieee80211_rx_mgmt_probe_beacon+0x187/0x17c0 net/mac80211/ibss.c:1605 ieee80211_ibss_rx_queued_mgmt+0xd37/0x1610 net/mac80211/ibss.c:1635 ieee80211_iface_process_skb net/mac80211/iface.c:1439 [inline] ieee80211_iface_work+0xa65/0xd00 net/mac80211/iface.c:1493 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x3e5/0x4d0 kernel/kthread.c:319 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+0x2c5/0x780 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3315 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3394 __vunmap+0x783/0xb70 mm/vmalloc.c:2621 free_work+0x58/0x70 mm/vmalloc.c:95 process_one_work+0x9bf/0x16b0 kernel/workqueue.c:2297 worker_thread+0x658/0x11f0 kernel/workqueue.c:2444 kthread+0x3e5/0x4d0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff888019fb5a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888019fb5b00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888019fb5b80: 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc fc ^ ffff888019fb5c00: 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc ffff888019fb5c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ==================================================================