================================================================== BUG: KASAN: slab-out-of-bounds in memcpy include/linux/fortify-string.h:225 [inline] BUG: KASAN: slab-out-of-bounds in packet_recvmsg+0x56c/0x1150 net/packet/af_packet.c:3489 Read of size 200 at addr ffff8880449343e8 by task syz-executor.0/11374 CPU: 0 PID: 11374 Comm: syz-executor.0 Not tainted 5.17.0-rc6-syzkaller-02043-g3e18bcb778e6 #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/0x336 mm/kasan/report.c:255 __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 memcpy+0x20/0x60 mm/kasan/shadow.c:65 memcpy include/linux/fortify-string.h:225 [inline] packet_recvmsg+0x56c/0x1150 net/packet/af_packet.c:3489 sock_recvmsg_nosec net/socket.c:948 [inline] sock_recvmsg net/socket.c:966 [inline] sock_recvmsg net/socket.c:962 [inline] __sys_recvfrom+0x248/0x3a0 net/socket.c:2097 __do_sys_recvfrom net/socket.c:2115 [inline] __se_sys_recvfrom net/socket.c:2111 [inline] __x64_sys_recvfrom+0xdd/0x1b0 net/socket.c:2111 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:0x7f369c1cd049 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 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f369ab21168 EFLAGS: 00000246 ORIG_RAX: 000000000000002d RAX: ffffffffffffffda RBX: 00007f369c2e0030 RCX: 00007f369c1cd049 RDX: 00000000000000db RSI: 0000000020000580 RDI: 0000000000000003 RBP: 00007f369c22708d R08: 0000000020000740 R09: 0000000000000014 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fffe734dfdf R14: 00007f369ab21300 R15: 0000000000022000 Allocated by task 9995: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:469 kasan_slab_alloc include/linux/kasan.h:260 [inline] slab_post_alloc_hook mm/slab.h:732 [inline] slab_alloc_node mm/slub.c:3230 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x271/0x4b0 mm/slub.c:3243 skb_clone+0x170/0x3c0 net/core/skbuff.c:1520 dev_queue_xmit_nit+0x393/0xb20 net/core/dev.c:2260 xmit_one net/core/dev.c:3517 [inline] dev_hard_start_xmit+0xad/0x920 net/core/dev.c:3538 sch_direct_xmit+0x19f/0xbe0 net/sched/sch_generic.c:342 qdisc_restart net/sched/sch_generic.c:407 [inline] __qdisc_run+0x4c0/0x1720 net/sched/sch_generic.c:415 __dev_xmit_skb net/core/dev.c:3812 [inline] __dev_queue_xmit+0x2089/0x37c0 net/core/dev.c:4131 neigh_hh_output include/net/neighbour.h:533 [inline] neigh_output include/net/neighbour.h:547 [inline] ip6_finish_output2+0xf80/0x1500 net/ipv6/ip6_output.c:126 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x61e/0xe90 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x280 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:451 [inline] ip6_local_out+0xaf/0x1a0 net/ipv6/output_core.c:161 ip6tunnel_xmit include/net/ip6_tunnel.h:161 [inline] udp_tunnel6_xmit_skb+0x72e/0xc90 net/ipv6/ip6_udp_tunnel.c:109 send6+0x4ab/0xcd0 drivers/net/wireguard/socket.c:152 wg_socket_send_skb_to_peer+0xf5/0x220 drivers/net/wireguard/socket.c:177 wg_packet_create_data_done drivers/net/wireguard/send.c:251 [inline] wg_packet_tx_worker+0x1a7/0x720 drivers/net/wireguard/send.c:276 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2e9/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff8880449343c0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 40 bytes inside of 232-byte region [ffff8880449343c0, ffff8880449344a8) The buggy address belongs to the page: page:ffffea0001124d00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888044934c80 pfn:0x44934 flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea0001cdb080 dead000000000008 ffff8880153ee500 raw: ffff888044934c80 00000000800c0003 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 3672, ts 325402335730, free_ts 324998127335 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4165 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5389 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2271 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x27f/0x3c0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0xbe1/0x12b0 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] kmem_cache_alloc_node+0x190/0x4f0 mm/slub.c:3266 __alloc_skb+0x215/0x340 net/core/skbuff.c:414 alloc_skb include/linux/skbuff.h:1300 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:745 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:802 [inline] nsim_dev_trap_report_work+0x29a/0xbc0 drivers/net/netdevsim/dev.c:843 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2e9/0x3a0 kernel/kthread.c:377 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:1352 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1404 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3404 __put_single_page mm/swap.c:99 [inline] __put_page+0x13d/0x1e0 mm/swap.c:130 folio_put include/linux/mm.h:1199 [inline] put_page include/linux/mm.h:1237 [inline] put_page_refs+0x245/0x300 mm/gup.c:62 unpin_user_pages_dirty_lock+0x293/0x550 mm/gup.c:366 xdp_umem_unpin_pages net/xdp/xdp_umem.c:28 [inline] xdp_umem_release net/xdp/xdp_umem.c:63 [inline] xdp_umem_release_deferred+0x122/0x2b0 net/xdp/xdp_umem.c:73 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307 worker_thread+0x657/0x1110 kernel/workqueue.c:2454 kthread+0x2e9/0x3a0 kernel/kthread.c:377 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Memory state around the buggy address: ffff888044934380: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888044934400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888044934480: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ^ ffff888044934500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888044934580: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ==================================================================