================================================================== BUG: KASAN: slab-use-after-free in __vlan_get_protocol include/linux/if_vlan.h:617 [inline] BUG: KASAN: slab-use-after-free in vlan_get_protocol include/linux/if_vlan.h:637 [inline] BUG: KASAN: slab-use-after-free in skb_protocol include/linux/if_vlan.h:668 [inline] BUG: KASAN: slab-use-after-free in ip6gre_tunnel_xmit+0xff7/0x10f0 net/ipv6/ip6_gre.c:919 Read of size 2 at addr ffff8880763d98e4 by task syz.1.56/6182 CPU: 0 UID: 0 PID: 6182 Comm: syz.1.56 Not tainted 6.12.0-syzkaller-00971-g158f238aa69d #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 __vlan_get_protocol include/linux/if_vlan.h:617 [inline] vlan_get_protocol include/linux/if_vlan.h:637 [inline] skb_protocol include/linux/if_vlan.h:668 [inline] ip6gre_tunnel_xmit+0xff7/0x10f0 net/ipv6/ip6_gre.c:919 __netdev_start_xmit include/linux/netdevice.h:4928 [inline] netdev_start_xmit include/linux/netdevice.h:4937 [inline] xmit_one net/core/dev.c:3588 [inline] dev_hard_start_xmit+0x143/0x790 net/core/dev.c:3604 sch_direct_xmit+0x1ae/0xc30 net/sched/sch_generic.c:343 __dev_xmit_skb net/core/dev.c:3825 [inline] __dev_queue_xmit+0x136a/0x4350 net/core/dev.c:4398 dev_queue_xmit include/linux/netdevice.h:3094 [inline] packet_xmit+0x23e/0x360 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3145 [inline] packet_sendmsg+0x2691/0x54d0 net/packet/af_packet.c:3177 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg net/socket.c:726 [inline] __sys_sendto+0x488/0x4f0 net/socket.c:2195 __do_sys_sendto net/socket.c:2202 [inline] __se_sys_sendto net/socket.c:2198 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2198 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ff51af7e759 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff51a1fe038 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007ff51b136058 RCX: 00007ff51af7e759 RDX: 0000000000000013 RSI: 00000000200003c0 RDI: 0000000000000007 RBP: 00007ff51aff175e R08: 0000000020000140 R09: 0000000000000014 R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007ff51b136058 R15: 00007ffc08c01858 Allocated by task 6182: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 unpoison_slab_object mm/kasan/common.c:319 [inline] __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:345 kasan_slab_alloc include/linux/kasan.h:247 [inline] slab_post_alloc_hook mm/slub.c:4085 [inline] slab_alloc_node mm/slub.c:4134 [inline] kmem_cache_alloc_node_noprof+0x153/0x310 mm/slub.c:4186 kmalloc_reserve+0x18b/0x2c0 net/core/skbuff.c:587 __alloc_skb+0x164/0x380 net/core/skbuff.c:678 alloc_skb include/linux/skbuff.h:1322 [inline] alloc_skb_with_frags+0xe4/0x850 net/core/skbuff.c:6612 sock_alloc_send_pskb+0x7f1/0x980 net/core/sock.c:2889 packet_alloc_skb net/packet/af_packet.c:2994 [inline] packet_snd net/packet/af_packet.c:3088 [inline] packet_sendmsg+0x1f18/0x54d0 net/packet/af_packet.c:3177 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg net/socket.c:726 [inline] __sys_sendto+0x488/0x4f0 net/socket.c:2195 __do_sys_sendto net/socket.c:2202 [inline] __se_sys_sendto net/socket.c:2198 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2198 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 6182: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x51/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:230 [inline] slab_free_hook mm/slub.c:2342 [inline] slab_free mm/slub.c:4579 [inline] kmem_cache_free+0x152/0x4b0 mm/slub.c:4681 skb_kfree_head net/core/skbuff.c:1084 [inline] skb_kfree_head net/core/skbuff.c:1081 [inline] skb_free_head+0x18a/0x1d0 net/core/skbuff.c:1098 skb_release_data+0x560/0x730 net/core/skbuff.c:1125 skb_release_all net/core/skbuff.c:1190 [inline] __kfree_skb net/core/skbuff.c:1204 [inline] sk_skb_reason_drop+0x129/0x1a0 net/core/skbuff.c:1242 packet_rcv+0x16c/0x15a0 net/packet/af_packet.c:2290 dev_queue_xmit_nit+0x846/0xba0 net/core/dev.c:2347 xmit_one net/core/dev.c:3584 [inline] dev_hard_start_xmit+0x56/0x790 net/core/dev.c:3604 sch_direct_xmit+0x1ae/0xc30 net/sched/sch_generic.c:343 __dev_xmit_skb net/core/dev.c:3825 [inline] __dev_queue_xmit+0x136a/0x4350 net/core/dev.c:4398 dev_queue_xmit include/linux/netdevice.h:3094 [inline] packet_xmit+0x23e/0x360 net/packet/af_packet.c:276 packet_snd net/packet/af_packet.c:3145 [inline] packet_sendmsg+0x2691/0x54d0 net/packet/af_packet.c:3177 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg net/socket.c:726 [inline] __sys_sendto+0x488/0x4f0 net/socket.c:2195 __do_sys_sendto net/socket.c:2202 [inline] __se_sys_sendto net/socket.c:2198 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2198 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8880763d9800 which belongs to the cache skbuff_small_head of size 640 The buggy address is located 228 bytes inside of freed 640-byte region [ffff8880763d9800, ffff8880763d9a80) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x763d8 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 ksm flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801deeca00 ffffea0000c14500 0000000000000003 raw: 0000000000000000 0000000080150015 00000001f5000000 0000000000000000 head: 00fff00000000040 ffff88801deeca00 ffffea0000c14500 0000000000000003 head: 0000000000000000 0000000080150015 00000001f5000000 0000000000000000 head: 00fff00000000002 ffffea0001d8f601 ffffffffffffffff 0000000000000000 head: 0000000000000004 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5810, tgid 5810 (sshd), ts 43529637853, free_ts 42509597658 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474 __alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265 alloc_slab_page mm/slub.c:2412 [inline] allocate_slab mm/slub.c:2578 [inline] new_slab+0x2c9/0x410 mm/slub.c:2631 ___slab_alloc+0xdac/0x1880 mm/slub.c:3818 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] kmem_cache_alloc_node_noprof+0xed/0x310 mm/slub.c:4186 kmalloc_reserve+0x18b/0x2c0 net/core/skbuff.c:587 __alloc_skb+0x164/0x380 net/core/skbuff.c:678 alloc_skb_fclone include/linux/skbuff.h:1372 [inline] tcp_stream_alloc_skb+0x34/0x570 net/ipv4/tcp.c:885 tcp_sendmsg_locked+0xeb5/0x3750 net/ipv4/tcp.c:1167 tcp_sendmsg+0x2e/0x50 net/ipv4/tcp.c:1357 inet_sendmsg+0xb9/0x140 net/ipv4/af_inet.c:853 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg net/socket.c:726 [inline] sock_write_iter+0x4ac/0x5b0 net/socket.c:1147 new_sync_write fs/read_write.c:586 [inline] vfs_write+0x5ae/0x1150 fs/read_write.c:679 page last free pid 5702 tgid 5702 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x661/0x1080 mm/page_alloc.c:2657 __folio_put+0x32a/0x450 mm/swap.c:112 folio_put include/linux/mm.h:1490 [inline] put_page+0x21e/0x280 include/linux/mm.h:1562 anon_pipe_buf_release+0x11a/0x240 fs/pipe.c:128 pipe_buf_release include/linux/pipe_fs_i.h:219 [inline] pipe_update_tail fs/pipe.c:224 [inline] pipe_read+0x641/0x13f0 fs/pipe.c:344 new_sync_read fs/read_write.c:484 [inline] vfs_read+0xa4c/0xbe0 fs/read_write.c:565 ksys_read+0x207/0x250 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f Memory state around the buggy address: ffff8880763d9780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880763d9800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880763d9880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880763d9900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880763d9980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================