syzbot


KASAN: slab-use-after-free Read in __ip_queue_xmit

Status: closed as invalid on 2026/01/08 10:57
Subsystems: net
[Documentation on labels]
First crash: 119d, last: 119d

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in ip_mtu_locked include/net/ip.h:434 [inline]
BUG: KASAN: slab-use-after-free in ip_dont_fragment include/net/ip.h:444 [inline]
BUG: KASAN: slab-use-after-free in __ip_queue_xmit+0x21df/0x2330 net/ipv4/ip_output.c:512
Read of size 1 at addr ffff888067e0eeb4 by task syz.1.3812/7871

CPU: 0 UID: 0 PID: 7871 Comm: syz.1.3812 Tainted: G     U              syzkaller #0 PREEMPT(full) 
Tainted: [U]=USER
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
Call Trace:
 <TASK>
 __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:378 [inline]
 print_report+0xcd/0x630 mm/kasan/report.c:482
 kasan_report+0xe0/0x110 mm/kasan/report.c:595
 ip_mtu_locked include/net/ip.h:434 [inline]
 ip_dont_fragment include/net/ip.h:444 [inline]
 __ip_queue_xmit+0x21df/0x2330 net/ipv4/ip_output.c:512
 l2tp_ip_sendmsg+0x66d/0x1980 net/l2tp/l2tp_ip.c:518
 inet_sendmsg+0x11c/0x140 net/ipv4/af_inet.c:853
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg net/socket.c:742 [inline]
 ____sys_sendmsg+0x973/0xc70 net/socket.c:2630
 ___sys_sendmsg+0x134/0x1d0 net/socket.c:2684
 __sys_sendmmsg+0x200/0x420 net/socket.c:2773
 __do_sys_sendmmsg net/socket.c:2800 [inline]
 __se_sys_sendmmsg net/socket.c:2797 [inline]
 __x64_sys_sendmmsg+0x9c/0x100 net/socket.c:2797
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fcfd058f6c9
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:00007fcfd13ee038 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007fcfd07e6270 RCX: 00007fcfd058f6c9
RDX: 00000000000009a5 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007fcfd0611f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000b00000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fcfd07e6308 R14: 00007fcfd07e6270 R15: 00007ffcf7cae848
 </TASK>

Allocated by task 7871:
 kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
 kasan_save_track+0x14/0x30 mm/kasan/common.c:77
 unpoison_slab_object mm/kasan/common.c:342 [inline]
 __kasan_slab_alloc+0x89/0x90 mm/kasan/common.c:368
 kasan_slab_alloc include/linux/kasan.h:252 [inline]
 slab_post_alloc_hook mm/slub.c:4974 [inline]
 slab_alloc_node mm/slub.c:5284 [inline]
 kmem_cache_alloc_noprof+0x250/0x6e0 mm/slub.c:5291
 dst_alloc+0x99/0x1a0 net/core/dst.c:89
 rt_dst_alloc+0x35/0x3a0 net/ipv4/route.c:1646
 __mkroute_output net/ipv4/route.c:2650 [inline]
 ip_route_output_key_hash_rcu+0x87a/0x28e0 net/ipv4/route.c:2870
 ip_route_output_key_hash+0x10f/0x2b0 net/ipv4/route.c:2700
 __ip_route_output_key include/net/route.h:169 [inline]
 ip_route_output_flow+0x27/0x150 net/ipv4/route.c:2927
 ip_route_connect include/net/route.h:355 [inline]
 __ip4_datagram_connect+0x8bf/0x14c0 net/ipv4/datagram.c:49
 l2tp_ip_connect+0x151/0x3c0 net/l2tp/l2tp_ip.c:351
 inet_dgram_connect+0x143/0x200 net/ipv4/af_inet.c:594
 __sys_connect_file+0x141/0x1a0 net/socket.c:2102
 __sys_connect+0x13b/0x160 net/socket.c:2121
 __do_sys_connect net/socket.c:2127 [inline]
 __se_sys_connect net/socket.c:2124 [inline]
 __x64_sys_connect+0x72/0xb0 net/socket.c:2124
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 3:
 kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
 kasan_save_track+0x14/0x30 mm/kasan/common.c:77
 __kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:587
 kasan_save_free_info mm/kasan/kasan.h:406 [inline]
 poison_slab_object mm/kasan/common.c:252 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2539 [inline]
 slab_free mm/slub.c:6634 [inline]
 kmem_cache_free+0x2d4/0x6c0 mm/slub.c:6744
 dst_destroy+0x2c2/0x3f0 net/core/dst.c:121
 rcu_do_batch kernel/rcu/tree.c:2605 [inline]
 rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861
 handle_softirqs+0x219/0x8e0 kernel/softirq.c:622
 __do_softirq kernel/softirq.c:656 [inline]
 invoke_softirq kernel/softirq.c:496 [inline]
 __irq_exit_rcu+0x109/0x170 kernel/softirq.c:723
 irq_exit_rcu+0x9/0x30 kernel/softirq.c:739
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline]
 sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1052
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697

Last potentially related work creation:
 kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:559
 __call_rcu_common.constprop.0+0xa5/0xa10 kernel/rcu/tree.c:3123
 call_rcu_hurry include/linux/rcupdate.h:115 [inline]
 dst_release net/core/dst.c:177 [inline]
 dst_release+0x266/0x340 net/core/dst.c:165
 sk_dst_set include/net/sock.h:2206 [inline]
 sk_dst_reset include/net/sock.h:2218 [inline]
 __udp_disconnect+0x20d/0x5b0 net/ipv4/udp.c:2210
 l2tp_ip_disconnect+0x68/0x90 net/l2tp/l2tp_ip.c:373
 inet_dgram_connect+0x1af/0x200 net/ipv4/af_inet.c:584
 __sys_connect_file+0x141/0x1a0 net/socket.c:2102
 __sys_connect+0x13b/0x160 net/socket.c:2121
 __do_sys_connect net/socket.c:2127 [inline]
 __se_sys_connect net/socket.c:2124 [inline]
 __x64_sys_connect+0x72/0xb0 net/socket.c:2124
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff888067e0ee00
 which belongs to the cache rtable of size 184
The buggy address is located 180 bytes inside of
 freed 184-byte region [ffff888067e0ee00, ffff888067e0eeb8)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x67e0e
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000000 ffff888144ec1640 ffffea000168b000 0000000000000004
raw: 0000000000000000 0000000080100010 00000000f5000000 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 4932, tgid 4929 (syz.5.3605), ts 1189296388729, free_ts 1189195089376
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1850
 prep_new_page mm/page_alloc.c:1858 [inline]
 get_page_from_freelist+0x10a3/0x3a30 mm/page_alloc.c:3884
 __alloc_frozen_pages_noprof+0x25f/0x2470 mm/page_alloc.c:5183
 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2416
 alloc_slab_page mm/slub.c:3055 [inline]
 allocate_slab mm/slub.c:3228 [inline]
 new_slab+0x24a/0x360 mm/slub.c:3282
 ___slab_alloc+0xd79/0x1a50 mm/slub.c:4651
 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4774
 __slab_alloc_node mm/slub.c:4850 [inline]
 slab_alloc_node mm/slub.c:5272 [inline]
 kmem_cache_alloc_noprof+0x43f/0x6e0 mm/slub.c:5291
 dst_alloc+0x99/0x1a0 net/core/dst.c:89
 rt_dst_alloc+0x35/0x3a0 net/ipv4/route.c:1646
 __mkroute_output net/ipv4/route.c:2650 [inline]
 ip_route_output_key_hash_rcu+0x87a/0x28e0 net/ipv4/route.c:2870
 ip_route_output_key_hash+0x10f/0x2b0 net/ipv4/route.c:2700
 __ip_route_output_key include/net/route.h:169 [inline]
 ip_route_output_flow+0x27/0x150 net/ipv4/route.c:2927
 raw_sendmsg+0xd5b/0x38b0 net/ipv4/raw.c:628
 inet_sendmsg+0x11c/0x140 net/ipv4/af_inet.c:853
 sock_sendmsg_nosec net/socket.c:727 [inline]
 __sock_sendmsg net/socket.c:742 [inline]
 ____sys_sendmsg+0x973/0xc70 net/socket.c:2630
page last free pid 12182 tgid 12182 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1394 [inline]
 __free_frozen_pages+0x7df/0x1160 mm/page_alloc.c:2906
 pagetable_free include/linux/mm.h:2997 [inline]
 pagetable_dtor_free include/linux/mm.h:3100 [inline]
 __tlb_remove_table include/asm-generic/tlb.h:220 [inline]
 __tlb_remove_table_free mm/mmu_gather.c:227 [inline]
 tlb_remove_table_rcu+0x121/0x320 mm/mmu_gather.c:290
 rcu_do_batch kernel/rcu/tree.c:2605 [inline]
 rcu_core+0x79c/0x1530 kernel/rcu/tree.c:2861
 handle_softirqs+0x219/0x8e0 kernel/softirq.c:622
 do_softirq kernel/softirq.c:523 [inline]
 do_softirq+0xb2/0xf0 kernel/softirq.c:510
 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:450
 spin_unlock_bh include/linux/spinlock.h:396 [inline]
 nsim_dev_trap_report drivers/net/netdevsim/dev.c:835 [inline]
 nsim_dev_trap_report_work+0x8b5/0xcf0 drivers/net/netdevsim/dev.c:866
 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3263
 process_scheduled_works kernel/workqueue.c:3346 [inline]
 worker_thread+0x6c8/0xf10 kernel/workqueue.c:3427
 kthread+0x3c5/0x780 kernel/kthread.c:463
 ret_from_fork+0x675/0x7d0 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

Memory state around the buggy address:
 ffff888067e0ed80: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc
 ffff888067e0ee00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888067e0ee80: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc
                                     ^
 ffff888067e0ef00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888067e0ef80: fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/09 22:52 upstream 439fc29dfd3b 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto KASAN: slab-use-after-free Read in __ip_queue_xmit
* Struck through repros no longer work on HEAD.