================================================================== 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 8928 at addr ffff88801b38c420 by task syz-executor.4/20147 CPU: 0 PID: 20147 Comm: syz-executor.4 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 tcp6_gso_segment net/ipv6/tcpv6_offload.c:65 [inline] tcp6_gso_segment+0x1a0/0x460 net/ipv6/tcpv6_offload.c:41 ipv6_gso_segment+0x48d/0xf50 net/ipv6/ip6_offload.c:115 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] ip6_finish_output2+0x8db/0x16c0 net/ipv6/ip6_output.c:117 __ip6_finish_output net/ipv6/ip6_output.c:182 [inline] __ip6_finish_output+0x4c1/0xe10 net/ipv6/ip6_output.c:161 ip6_finish_output+0x35/0x200 net/ipv6/ip6_output.c:192 NF_HOOK_COND include/linux/netfilter.h:290 [inline] ip6_output+0x1db/0x520 net/ipv6/ip6_output.c:215 dst_output include/net/dst.h:441 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] NF_HOOK include/linux/netfilter.h:295 [inline] ip6_xmit+0x127e/0x1eb0 net/ipv6/ip6_output.c:319 inet6_csk_xmit+0x358/0x630 net/ipv6/inet6_connection_sock.c:135 __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 inet6_sendmsg+0x99/0xe0 net/ipv6/af_inet6.c:638 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 __sys_sendto+0x21c/0x320 net/socket.c:1975 __do_sys_sendto net/socket.c:1987 [inline] __se_sys_sendto net/socket.c:1983 [inline] __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1983 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:00007f5a8b77ec68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 000000000045e219 RDX: 00000000fffffdda RSI: 00000000200000c0 RDI: 0000000000000007 RBP: 000000000119c080 R08: 0000000000000000 R09: 0600000000000004 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034 R13: 00007ffc45f3337f R14: 00007f5a8b77f9c0 R15: 000000000119c034 Allocated by task 19880: 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 kasan_slab_alloc include/linux/kasan.h:205 [inline] slab_post_alloc_hook mm/slab.h:512 [inline] slab_alloc_node mm/slub.c:2891 [inline] slab_alloc mm/slub.c:2899 [inline] kmem_cache_alloc+0x1c6/0x440 mm/slub.c:2904 skb_clone+0x170/0x3c0 net/core/skbuff.c:1452 __netlink_deliver_tap_skb net/netlink/af_netlink.c:288 [inline] __netlink_deliver_tap net/netlink/af_netlink.c:313 [inline] netlink_deliver_tap+0x990/0xb70 net/netlink/af_netlink.c:326 netlink_deliver_tap_kernel net/netlink/af_netlink.c:335 [inline] netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x5e5/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x331/0x810 net/socket.c:2345 ___sys_sendmsg+0xf3/0x170 net/socket.c:2399 __sys_sendmmsg+0x195/0x470 net/socket.c:2489 __do_sys_sendmmsg net/socket.c:2518 [inline] __se_sys_sendmmsg net/socket.c:2515 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2515 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 Freed by task 19880: 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] kmem_cache_free+0x82/0x350 mm/slub.c:3158 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:633 __kfree_skb net/core/skbuff.c:690 [inline] consume_skb net/core/skbuff.c:845 [inline] consume_skb+0xcf/0x160 net/core/skbuff.c:839 nlmon_xmit+0xa4/0xe0 drivers/net/nlmon.c:15 __netdev_start_xmit include/linux/netdevice.h:4758 [inline] netdev_start_xmit include/linux/netdevice.h:4772 [inline] xmit_one net/core/dev.c:3574 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3590 __dev_queue_xmit+0x21db/0x2dd0 net/core/dev.c:4151 __netlink_deliver_tap_skb net/netlink/af_netlink.c:295 [inline] __netlink_deliver_tap net/netlink/af_netlink.c:313 [inline] netlink_deliver_tap+0x92e/0xb70 net/netlink/af_netlink.c:326 netlink_deliver_tap_kernel net/netlink/af_netlink.c:335 [inline] netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline] netlink_unicast+0x5e5/0x7d0 net/netlink/af_netlink.c:1330 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:672 ____sys_sendmsg+0x331/0x810 net/socket.c:2345 ___sys_sendmsg+0xf3/0x170 net/socket.c:2399 __sys_sendmmsg+0x195/0x470 net/socket.c:2489 __do_sys_sendmmsg net/socket.c:2518 [inline] __se_sys_sendmmsg net/socket.c:2515 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2515 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 The buggy address belongs to the object at ffff88801b38c3c0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 96 bytes inside of 232-byte region [ffff88801b38c3c0, ffff88801b38c4a8) The buggy address belongs to the page: page:00000000d1984338 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b38c flags: 0xfff00000000200(slab) raw: 00fff00000000200 dead000000000100 dead000000000122 ffff8881406f7c80 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88801b38c300: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ffff88801b38c380: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb >ffff88801b38c400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801b38c480: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ffff88801b38c500: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================