================================================================== 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:3484 Read of size 203 at addr ffff888025f9fde8 by task syz-executor.4/20917 CPU: 1 PID: 20917 Comm: syz-executor.4 Not tainted 5.17.0-rc1-syzkaller-00495-gff58831fa02d #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:3484 sock_recvmsg_nosec net/socket.c:948 [inline] sock_recvmsg net/socket.c:966 [inline] sock_recvmsg net/socket.c:962 [inline] ____sys_recvmsg+0x2c4/0x600 net/socket.c:2632 ___sys_recvmsg+0x127/0x200 net/socket.c:2674 __sys_recvmsg+0xe2/0x1a0 net/socket.c:2704 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:0x7fb979094059 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:00007fb9779e8168 EFLAGS: 00000246 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 00007fb9791a7030 RCX: 00007fb979094059 RDX: 0000000000000002 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 00007fb9790ee08d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc9652dc8f R14: 00007fb9779e8300 R15: 0000000000022000 Allocated by task 20913: 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+0x202/0x3a0 mm/slub.c:3243 skb_clone+0x170/0x3c0 net/core/skbuff.c:1519 tpacket_rcv+0x2cad/0x3760 net/packet/af_packet.c:2312 deliver_skb net/core/dev.c:2135 [inline] dev_queue_xmit_nit+0x373/0xa90 net/core/dev.c:2205 xmit_one net/core/dev.c:3468 [inline] dev_hard_start_xmit+0xad/0x920 net/core/dev.c:3489 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:3762 [inline] __dev_queue_xmit+0x2084/0x3660 net/core/dev.c:4081 neigh_hh_output include/net/neighbour.h:525 [inline] neigh_output include/net/neighbour.h:539 [inline] ip_finish_output2+0x14dc/0x2170 net/ipv4/ip_output.c:228 __ip_finish_output net/ipv4/ip_output.c:306 [inline] __ip_finish_output+0x396/0x650 net/ipv4/ip_output.c:288 ip_finish_output+0x32/0x200 net/ipv4/ip_output.c:316 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip_output+0x196/0x310 net/ipv4/ip_output.c:430 dst_output include/net/dst.h:451 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x8fe/0x1bb0 net/ipv4/ip_output.c:532 __tcp_transmit_skb+0x187d/0x3810 net/ipv4/tcp_output.c:1402 tcp_transmit_skb net/ipv4/tcp_output.c:1420 [inline] tcp_write_xmit+0xd91/0x5f70 net/ipv4/tcp_output.c:2680 __tcp_push_pending_frames+0xaa/0x390 net/ipv4/tcp_output.c:2864 tcp_sendmsg_locked+0x2422/0x3050 net/ipv4/tcp.c:1391 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1440 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:819 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 __sys_sendto+0x21c/0x320 net/socket.c:2040 __do_sys_sendto net/socket.c:2052 [inline] __se_sys_sendto net/socket.c:2048 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:2048 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 ffff888025f9fdc0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 40 bytes inside of 232-byte region [ffff888025f9fdc0, ffff888025f9fea8) The buggy address belongs to the page: page:ffffea000097e7c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x25f9f flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea000087b040 dead000000000005 ffff8881447a9140 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 8834, ts 417215071582, free_ts 405218904882 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 mm/slub.c:1944 [inline] new_slab+0x28a/0x3b0 mm/slub.c:2004 ___slab_alloc+0x87c/0xe90 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x35c/0x3a0 mm/slub.c:3243 skb_clone+0x170/0x3c0 net/core/skbuff.c:1519 dev_queue_xmit_nit+0x38c/0xa90 net/core/dev.c:2211 xmit_one net/core/dev.c:3468 [inline] dev_hard_start_xmit+0xad/0x920 net/core/dev.c:3489 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 qdisc_run include/net/pkt_sched.h:126 [inline] qdisc_run include/net/pkt_sched.h:123 [inline] net_tx_action+0x790/0xd30 net/core/dev.c:4952 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 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 packet_set_ring+0x686/0x1b00 net/packet/af_packet.c:4492 packet_release+0x597/0xd00 net/packet/af_packet.c:3124 __sock_release+0xcd/0x280 net/socket.c:650 sock_close+0x18/0x20 net/socket.c:1318 __fput+0x286/0x9f0 fs/file_table.c:311 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff888025f9fd80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00 ffff888025f9fe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888025f9fe80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc ^ ffff888025f9ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888025f9ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================