================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:191 [inline] BUG: KASAN: slab-out-of-bounds in packet_recvmsg+0x56c/0x1150 net/packet/af_packet.c:3456 Read of size 231 at addr ffff88807b0fd2a8 by task syz-executor.1/8875 CPU: 1 PID: 8875 Comm: syz-executor.1 Not tainted 5.14.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:105 print_address_description.constprop.0.cold+0x6c/0x309 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:436 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 memcpy+0x20/0x60 mm/kasan/shadow.c:65 memcpy include/linux/fortify-string.h:191 [inline] packet_recvmsg+0x56c/0x1150 net/packet/af_packet.c:3456 sock_recvmsg_nosec net/socket.c:944 [inline] sock_recvmsg net/socket.c:962 [inline] sock_recvmsg net/socket.c:958 [inline] ____sys_recvmsg+0x2c4/0x600 net/socket.c:2622 ___sys_recvmsg+0x127/0x200 net/socket.c:2664 do_recvmmsg+0x24d/0x6d0 net/socket.c:2758 __sys_recvmmsg net/socket.c:2837 [inline] __do_sys_recvmmsg net/socket.c:2860 [inline] __se_sys_recvmmsg net/socket.c:2853 [inline] __x64_sys_recvmmsg+0x20b/0x260 net/socket.c:2853 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:0x4665e9 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:00007f2b41999188 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000000006 RSI: 0000000020003640 RDI: 0000000000000003 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000020 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffed9a1cdff R14: 00007f2b41999300 R15: 0000000000022000 Allocated by task 14066: 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_slab_alloc+0x84/0xa0 mm/kasan/common.c:467 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:2956 [inline] slab_alloc mm/slub.c:2964 [inline] kmem_cache_alloc+0x285/0x4a0 mm/slub.c:2969 skb_clone+0x170/0x3c0 net/core/skbuff.c:1520 dev_queue_xmit_nit+0x38c/0xa90 net/core/dev.c:2415 xmit_one net/core/dev.c:3654 [inline] dev_hard_start_xmit+0xad/0x920 net/core/dev.c:3675 sch_direct_xmit+0x19f/0xbb0 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0x4bc/0x1700 net/sched/sch_generic.c:415 qdisc_run include/net/pkt_sched.h:131 [inline] qdisc_run include/net/pkt_sched.h:128 [inline] net_tx_action+0x7e4/0xdc0 net/core/dev.c:5122 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 The buggy address belongs to the object at ffff88807b0fd280 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 40 bytes inside of 232-byte region [ffff88807b0fd280, ffff88807b0fd368) The buggy address belongs to the page: page:ffffea0001ec3f40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b0fd flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff88814015b640 raw: 0000000000000000 00000000000c000c 00000001ffffffff 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 0x12a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY), pid 6552, ts 1056127341446, free_ts 1055859677483 prep_new_page mm/page_alloc.c:2433 [inline] get_page_from_freelist+0xa72/0x2f80 mm/page_alloc.c:4166 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5388 alloc_pages+0x18c/0x2a0 mm/mempolicy.c:2244 alloc_slab_page mm/slub.c:1688 [inline] allocate_slab+0x32e/0x4b0 mm/slub.c:1828 new_slab mm/slub.c:1891 [inline] new_slab_objects mm/slub.c:2637 [inline] ___slab_alloc+0x4ba/0x820 mm/slub.c:2800 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2840 slab_alloc_node mm/slub.c:2922 [inline] kmem_cache_alloc_node+0x12c/0x3e0 mm/slub.c:2992 __alloc_skb+0x20b/0x340 net/core/skbuff.c:414 skb_copy+0x137/0x2f0 net/core/skbuff.c:1585 mac80211_hwsim_tx_frame_no_nl.isra.0+0xb17/0x1330 drivers/net/wireless/mac80211_hwsim.c:1565 mac80211_hwsim_tx_frame+0x1ee/0x2a0 drivers/net/wireless/mac80211_hwsim.c:1784 mac80211_hwsim_beacon_tx+0x49b/0x930 drivers/net/wireless/mac80211_hwsim.c:1838 __iterate_interfaces+0x1e5/0x520 net/mac80211/util.c:793 ieee80211_iterate_active_interfaces_atomic+0x70/0x180 net/mac80211/util.c:829 mac80211_hwsim_beacon+0xd5/0x1a0 drivers/net/wireless/mac80211_hwsim.c:1861 __run_hrtimer kernel/time/hrtimer.c:1537 [inline] __hrtimer_run_queues+0x609/0xe50 kernel/time/hrtimer.c:1601 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1343 [inline] free_pcp_prepare+0x2c5/0x780 mm/page_alloc.c:1394 free_unref_page_prepare mm/page_alloc.c:3329 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3408 unfreeze_partials+0x17c/0x1d0 mm/slub.c:2418 put_cpu_partial+0x13d/0x230 mm/slub.c:2454 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x8e/0xa0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:254 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:2956 [inline] kmem_cache_alloc_node+0x266/0x3e0 mm/slub.c:2992 __alloc_skb+0x20b/0x340 net/core/skbuff.c:414 alloc_skb include/linux/skbuff.h:1116 [inline] nlmsg_new include/net/netlink.h:953 [inline] inet6_netconf_notify_devconf+0xa0/0x1e0 net/ipv6/addrconf.c:581 __addrconf_sysctl_unregister net/ipv6/addrconf.c:7032 [inline] addrconf_exit_net+0x1c1/0x2a0 net/ipv6/addrconf.c:7138 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:175 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x1630 kernel/workqueue.c:2276 worker_thread+0x658/0x11f0 kernel/workqueue.c:2422 kthread+0x3e5/0x4d0 kernel/kthread.c:319 Memory state around the buggy address: ffff88807b0fd200: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88807b0fd280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88807b0fd300: 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc ^ ffff88807b0fd380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb ffff88807b0fd400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================