================================================================== BUG: KASAN: use-after-free in memcpy include/linux/string.h:447 [inline] BUG: KASAN: use-after-free in skb_copy_from_linear_data_offset include/linux/skbuff.h:3676 [inline] BUG: KASAN: use-after-free in skb_segment+0x14ba/0x37a0 net/core/skbuff.c:3996 Read of size 10228 at addr ffff8880716cf134 by task syz-executor.0/9567 CPU: 1 PID: 9567 Comm: syz-executor.0 Not tainted 5.11.0-rc3-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:230 __kasan_report mm/kasan/report.c:396 [inline] kasan_report.cold+0x79/0xd5 mm/kasan/report.c:413 check_memory_region_inline mm/kasan/generic.c:179 [inline] check_memory_region+0x13d/0x180 mm/kasan/generic.c:185 memcpy+0x20/0x60 mm/kasan/shadow.c:64 memcpy include/linux/string.h:447 [inline] skb_copy_from_linear_data_offset include/linux/skbuff.h:3676 [inline] skb_segment+0x14ba/0x37a0 net/core/skbuff.c:3996 tcp_gso_segment+0x33d/0x17e0 net/ipv4/tcp_offload.c:98 tcp4_gso_segment net/ipv4/tcp_offload.c:51 [inline] tcp4_gso_segment+0x194/0x3a0 net/ipv4/tcp_offload.c:29 inet_gso_segment+0x502/0x1110 net/ipv4/af_inet.c:1378 skb_mac_gso_segment+0x26e/0x530 net/core/dev.c:3326 __skb_gso_segment+0x330/0x6e0 net/core/dev.c:3399 skb_gso_segment include/linux/netdevice.h:4708 [inline] cake_enqueue+0x2808/0x39f0 net/sched/sch_cake.c:1742 __dev_xmit_skb net/core/dev.c:3807 [inline] __dev_queue_xmit+0x1913/0x2dd0 net/core/dev.c:4119 neigh_hh_output include/net/neighbour.h:499 [inline] neigh_output include/net/neighbour.h:508 [inline] ip_finish_output2+0xeb6/0x21b0 net/ipv4/ip_output.c:230 __ip_finish_output net/ipv4/ip_output.c:308 [inline] __ip_finish_output+0x396/0x640 net/ipv4/ip_output.c:290 ip_finish_output+0x35/0x200 net/ipv4/ip_output.c:318 NF_HOOK_COND include/linux/netfilter.h:290 [inline] ip_output+0x196/0x310 net/ipv4/ip_output.c:432 dst_output include/net/dst.h:441 [inline] ip_local_out net/ipv4/ip_output.c:126 [inline] __ip_queue_xmit+0x8e9/0x1a00 net/ipv4/ip_output.c:532 __tcp_transmit_skb+0x188c/0x38f0 net/ipv4/tcp_output.c:1405 tcp_transmit_skb net/ipv4/tcp_output.c:1423 [inline] tcp_write_xmit+0xde7/0x6140 net/ipv4/tcp_output.c:2689 tcp_sendmsg_locked+0xa1c/0x2e40 net/ipv4/tcp.c:1410 tcp_sendmsg+0x2b/0x40 net/ipv4/tcp.c:1459 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:817 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2345 ___sys_sendmsg+0xf3/0x170 net/socket.c:2399 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2432 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45e219 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f8c4be31c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045e219 RDX: 0000000000000000 RSI: 00000000200015c0 RDI: 0000000000000003 RBP: 000000000119bfc0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119bf8c R13: 00007ffc7b0f842f R14: 00007f8c4be329c0 R15: 000000000119bf8c Allocated by task 9570: 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:401 [inline] ____kasan_kmalloc.constprop.0+0x82/0xa0 mm/kasan/common.c:429 kmalloc_array include/linux/slab.h:592 [inline] kcalloc include/linux/slab.h:621 [inline] alloc_pipe_info+0x1e5/0x590 fs/pipe.c:791 get_pipe_inode fs/pipe.c:863 [inline] create_pipe_files+0x8f/0x8d0 fs/pipe.c:895 __do_pipe_flags fs/pipe.c:944 [inline] do_pipe2+0x96/0x1b0 fs/pipe.c:992 __do_sys_pipe fs/pipe.c:1015 [inline] __se_sys_pipe fs/pipe.c:1013 [inline] __x64_sys_pipe+0x2f/0x40 fs/pipe.c:1013 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 9570: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:356 ____kasan_slab_free+0xe1/0x110 mm/kasan/common.c:362 kasan_slab_free include/linux/kasan.h:188 [inline] slab_free_hook mm/slub.c:1547 [inline] slab_free_freelist_hook+0x5d/0x150 mm/slub.c:1580 slab_free mm/slub.c:3142 [inline] kfree+0xdb/0x3b0 mm/slub.c:4124 free_pipe_info+0x2c8/0x390 fs/pipe.c:834 put_pipe_info fs/pipe.c:695 [inline] pipe_release+0x2bf/0x320 fs/pipe.c:718 __fput+0x283/0x920 fs/file_table.c:280 task_work_run+0xdd/0x190 kernel/task_work.c:140 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:174 [inline] exit_to_user_mode_prepare+0x249/0x250 kernel/entry/common.c:201 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:302 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff8880716cf000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 308 bytes inside of 1024-byte region [ffff8880716cf000, ffff8880716cf400) The buggy address belongs to the page: page:00000000a4dffea2 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x716cc head:00000000a4dffea2 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 ffffea0001aab800 0000000300000003 ffff888010041140 raw: 0000000000000000 0000000080080008 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880716cf000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880716cf080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880716cf100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880716cf180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880716cf200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================