================================================================== 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 ffff8880785424e4 by task syz.2.3270/12772 CPU: 0 UID: 0 PID: 12772 Comm: syz.2.3270 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:0x7f380677e759 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:00007f38075a1038 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f3806936058 RCX: 00007f380677e759 RDX: 0000000000000013 RSI: 00000000200003c0 RDI: 0000000000000005 RBP: 00007f38067f175e R08: 0000000020000140 R09: 0000000000000014 R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000001 R14: 00007f3806936058 R15: 00007ffdcdbeb018 Allocated by task 12772: 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 12772: 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 ffff888078542400 which belongs to the cache skbuff_small_head of size 640 The buggy address is located 228 bytes inside of freed 640-byte region [ffff888078542400, ffff888078542680) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x78540 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 ffff8881416f6a00 ffffea0000c4c800 dead000000000003 raw: 0000000000000000 0000000080150015 00000001f5000000 0000000000000000 head: 00fff00000000040 ffff8881416f6a00 ffffea0000c4c800 dead000000000003 head: 0000000000000000 0000000080150015 00000001f5000000 0000000000000000 head: 00fff00000000002 ffffea0001e15001 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 76, tgid 76 (kworker/u8:4), ts 97372308770, free_ts 97342937178 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 include/linux/skbuff.h:1322 [inline] nlmsg_new include/net/netlink.h:1015 [inline] inet_netconf_notify_devconf+0x8b/0x1f0 net/ipv4/devinet.c:2142 __devinet_sysctl_unregister net/ipv4/devinet.c:2637 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2661 [inline] inetdev_destroy net/ipv4/devinet.c:345 [inline] inetdev_event+0xe91/0x1830 net/ipv4/devinet.c:1643 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1996 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] unregister_netdevice_many_notify+0x8d5/0x1e50 net/core/dev.c:11407 cleanup_net+0x58c/0xb40 net/core/net_namespace.c:621 page last free pid 76 tgid 76 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 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4e/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x192/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 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 __alloc_skb+0x2b1/0x380 net/core/skbuff.c:668 alloc_skb include/linux/skbuff.h:1322 [inline] nlmsg_new include/net/netlink.h:1015 [inline] inet_netconf_notify_devconf+0x8b/0x1f0 net/ipv4/devinet.c:2142 __devinet_sysctl_unregister net/ipv4/devinet.c:2637 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2661 [inline] inetdev_destroy net/ipv4/devinet.c:345 [inline] inetdev_event+0xe91/0x1830 net/ipv4/devinet.c:1643 notifier_call_chain+0xb9/0x410 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x140 net/core/dev.c:1996 call_netdevice_notifiers_extack net/core/dev.c:2034 [inline] call_netdevice_notifiers net/core/dev.c:2048 [inline] unregister_netdevice_many_notify+0x8d5/0x1e50 net/core/dev.c:11407 cleanup_net+0x58c/0xb40 net/core/net_namespace.c:621 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 Memory state around the buggy address: ffff888078542380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888078542400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888078542480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888078542500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888078542580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================