syzbot


KASAN: use-after-free Read in l2tp_tunnel_del_work

Status: premoderation: reported on 2026/06/27 08:43
Reported-by: syzbot+31aa91209c33be05babb@syzkaller.appspotmail.com
First crash: 1d11h, last: 1d11h
Similar bugs (5)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-6-1 KASAN: use-after-free Read in l2tp_tunnel_del_work 19 12 7h09m 14d 0/2 premoderation: reported on 2026/06/14 19:53
android-5-10 KASAN: use-after-free Read in l2tp_tunnel_del_work 19 11 2h49m 5d10h 0/2 premoderation: reported on 2026/06/23 09:58
upstream KASAN: use-after-free Write in l2tp_tunnel_del_work (2) net 22 syz unreliable done 2 1234d 1300d 0/29 auto-obsoleted due to no activity on 2023/06/10 16:21
upstream KASAN: use-after-free Write in l2tp_tunnel_del_work net 22 1 1669d 1664d 0/29 auto-closed as invalid on 2022/04/01 19:17
upstream KASAN: slab-use-after-free Read in l2tp_tunnel_del_work net 19 C done 99 719d 733d 27/29 fixed on 2024/08/14 03:44

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in hlist_unhashed include/linux/list.h:826 [inline]
BUG: KASAN: use-after-free in hlist_del_init include/linux/list.h:883 [inline]
BUG: KASAN: use-after-free in l2tp_tunnel_closeall net/l2tp/l2tp_core.c:1232 [inline]
BUG: KASAN: use-after-free in l2tp_tunnel_del_work+0xcd/0x3d0 net/l2tp/l2tp_core.c:1273
Read of size 8 at addr ffff88812c2bc880 by task kworker/u4:4/308

CPU: 0 PID: 308 Comm: kworker/u4:4 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Workqueue: l2tp l2tp_tunnel_del_work

Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0x10f/0x150 mm/kasan/report.c:444
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:309
 hlist_unhashed include/linux/list.h:826 [inline]
 hlist_del_init include/linux/list.h:883 [inline]
 l2tp_tunnel_closeall net/l2tp/l2tp_core.c:1232 [inline]
 l2tp_tunnel_del_work+0xcd/0x3d0 net/l2tp/l2tp_core.c:1273
 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328
 worker_thread+0xaa0/0x1250 kernel/workqueue.c:2475
 kthread+0x3f5/0x4f0 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>

Allocated by task 844:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:433 [inline]
 ____kasan_kmalloc mm/kasan/common.c:512 [inline]
 __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:521
 kasan_kmalloc include/linux/kasan.h:227 [inline]
 __kmalloc+0x13d/0x2c0 mm/slub.c:4436
 kmalloc include/linux/slab.h:624 [inline]
 kzalloc include/linux/slab.h:750 [inline]
 l2tp_session_create+0x39/0xb60 net/l2tp/l2tp_core.c:1616
 pppol2tp_connect+0xbf5/0x1640 net/l2tp/l2tp_ppp.c:772
 __sys_connect_file net/socket.c:1922 [inline]
 __sys_connect+0x3cb/0x450 net/socket.c:1939
 __do_sys_connect net/socket.c:1949 [inline]
 __se_sys_connect net/socket.c:1946 [inline]
 __x64_sys_connect+0x7a/0x90 net/socket.c:1946
 x64_sys_call+0x7c/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:43
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Freed by task 844:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
 kasan_slab_free include/linux/kasan.h:193 [inline]
 slab_free_hook mm/slub.c:1728 [inline]
 slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754
 slab_free mm/slub.c:3526 [inline]
 kfree+0xc4/0x270 mm/slub.c:4588
 l2tp_session_free net/l2tp/l2tp_core.c:168 [inline]
 l2tp_session_put+0xaf/0x1a0 net/l2tp/l2tp_core.c:193
 pppol2tp_ioctl+0x748/0x960 net/l2tp/l2tp_ppp.c:-1
 pppox_ioctl+0x1e4/0x320 drivers/net/ppp/pppox.c:93
 sock_do_ioctl+0x103/0x310 net/socket.c:1137
 sock_ioctl+0x459/0x6d0 net/socket.c:1256
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:860
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860
 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:38
 __kasan_record_aux_stack+0xd2/0x100 mm/kasan/generic.c:348
 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:358
 kvfree_call_rcu+0xb6/0x860 kernel/rcu/tree.c:3648
 drop_sysctl_table+0x2f5/0x430 fs/proc/proc_sysctl.c:1687
 drop_sysctl_table+0x2e4/0x430 fs/proc/proc_sysctl.c:1690
 unregister_sysctl_table+0x7a/0x120 fs/proc/proc_sysctl.c:1725
 unregister_net_sysctl_table+0x15/0x20 net/sysctl_net.c:175
 neigh_sysctl_unregister+0x78/0x90 net/core/neighbour.c:3737
 addrconf_sysctl_unregister net/ipv6/addrconf.c:7223 [inline]
 addrconf_ifdown+0x1650/0x1910 net/ipv6/addrconf.c:3952
 addrconf_notify+0x3bd/0xe00 net/ipv6/addrconf.c:-1
 notifier_call_chain kernel/notifier.c:83 [inline]
 raw_notifier_call_chain+0x90/0x100 kernel/notifier.c:391
 call_netdevice_notifiers_info net/core/dev.c:2070 [inline]
 call_netdevice_notifiers_extack net/core/dev.c:2082 [inline]
 call_netdevice_notifiers net/core/dev.c:2096 [inline]
 unregister_netdevice_many+0x103d/0x1a00 net/core/dev.c:11176
 vti6_exit_batch_net+0x273/0x2c0 net/ipv6/ip6_vti.c:1190
 ops_exit_list net/core/net_namespace.c:177 [inline]
 cleanup_net+0x605/0xae0 net/core/net_namespace.c:599
 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328
 worker_thread+0xaa0/0x1250 kernel/workqueue.c:2475
 kthread+0x3f5/0x4f0 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287

The buggy address belongs to the object at ffff88812c2bc800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 128 bytes inside of
 512-byte region [ffff88812c2bc800, ffff88812c2bca00)
The buggy address belongs to the page:
page:ffffea0004b0af00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12c2bc
head:ffffea0004b0af00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea0004b0aa00 0000000400000004 ffff888100042f00
raw: 0000000000000000 0000000000100010 00000001ffffffff 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 380, ts 31781479560, free_ts 31781336899
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613
 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487
 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1937 [inline]
 new_slab+0xa0/0x4d0 mm/slub.c:2000
 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033
 __slab_alloc+0x49/0x90 mm/slub.c:3120
 slab_alloc_node mm/slub.c:3211 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 __kmalloc+0x16a/0x2c0 mm/slub.c:4432
 kmalloc include/linux/slab.h:624 [inline]
 kzalloc include/linux/slab.h:750 [inline]
 new_dir fs/proc/proc_sysctl.c:961 [inline]
 get_subdir fs/proc/proc_sysctl.c:1006 [inline]
 __register_sysctl_table+0xa35/0x1240 fs/proc/proc_sysctl.c:1355
 register_net_sysctl+0x21d/0x230 net/sysctl_net.c:169
 __devinet_sysctl_register+0x2bd/0x390 net/ipv4/devinet.c:2604
 devinet_sysctl_register+0x169/0x1e0 net/ipv4/devinet.c:2644
 inetdev_init+0x2b2/0x500 net/ipv4/devinet.c:284
 inetdev_event+0x1f4/0x1060 net/ipv4/devinet.c:1544
 notifier_call_chain kernel/notifier.c:83 [inline]
 raw_notifier_call_chain+0x90/0x100 kernel/notifier.c:391
 call_netdevice_notifiers_info net/core/dev.c:2070 [inline]
 call_netdevice_notifiers_extack net/core/dev.c:2082 [inline]
 call_netdevice_notifiers+0x119/0x190 net/core/dev.c:2096
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1474 [inline]
 free_pcp_prepare mm/page_alloc.c:1546 [inline]
 free_unref_page_prepare+0x5fa/0x600 mm/page_alloc.c:3536
 free_unref_page+0xae/0x540 mm/page_alloc.c:3618
 free_the_page mm/page_alloc.c:805 [inline]
 __free_pages+0x6c/0x100 mm/page_alloc.c:5900
 free_pages+0x82/0x90 mm/page_alloc.c:5911
 __stack_depot_save+0x453/0x480 lib/stackdepot.c:358
 kasan_save_stack mm/kasan/common.c:39 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:433 [inline]
 ____kasan_kmalloc mm/kasan/common.c:512 [inline]
 __kasan_kmalloc+0xe6/0x100 mm/kasan/common.c:521
 kasan_kmalloc include/linux/kasan.h:227 [inline]
 __kmalloc+0x13d/0x2c0 mm/slub.c:4436
 kmalloc include/linux/slab.h:624 [inline]
 kzalloc include/linux/slab.h:750 [inline]
 kobject_get_path+0xbf/0x1f0 lib/kobject.c:184
 kobject_uevent_env+0x28a/0x700 lib/kobject_uevent.c:544
 kobject_uevent+0x1d/0x30 lib/kobject_uevent.c:657
 netdev_queue_add_kobject net/core/net-sysfs.c:1677 [inline]
 netdev_queue_update_kobjects+0x1c9/0x3e0 net/core/net-sysfs.c:1711
 register_queue_kobjects net/core/net-sysfs.c:1772 [inline]
 netdev_register_kobject+0x281/0x330 net/core/net-sysfs.c:2018
 register_netdevice+0xeaa/0x1490 net/core/dev.c:10431
 register_netdev+0x3e/0x50 net/core/dev.c:10555
 vti6_init_net+0x2dc/0x3a0 net/ipv6/ip6_vti.c:1164
 ops_init+0x2c0/0x470 net/core/net_namespace.c:138

Memory state around the buggy address:
 ffff88812c2bc780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88812c2bc800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88812c2bc880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88812c2bc900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88812c2bc980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 308 at lib/refcount.c:28 refcount_warn_saturate+0x120/0x1a0 lib/refcount.c:28
Modules linked in:

CPU: 0 PID: 308 Comm: kworker/u4:4 Tainted: G    B             syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Workqueue: l2tp l2tp_tunnel_del_work
RIP: 0010:refcount_warn_saturate+0x120/0x1a0 lib/refcount.c:28
Code: 04 01 48 c7 c7 00 44 63 85 e8 2c 02 5a 02 0f 0b eb c3 e8 93 8f 19 ff c6 05 40 04 96 04 01 48 c7 c7 60 44 63 85 e8 10 02 5a 02 <0f> 0b eb a7 e8 77 8f 19 ff c6 05 21 04 96 04 01 48 c7 c7 a0 43 63
RSP: 0018:ffffc900077f7c40 EFLAGS: 00010246
RAX: f532f7efb1426e00 RBX: 0000000000000003 RCX: ffff88810ad00000
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900077f7c50 R08: ffff8881f7032f3f R09: 1ffff1103ee065e7
R10: dffffc0000000000 R11: ffffed103ee065e8 R12: ffff888113cba020
R13: dffffc0000000000 R14: 0000000000000003 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff3171c8000 CR3: 0000000127630000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __refcount_sub_and_test include/linux/refcount.h:283 [inline]
 __refcount_dec_and_test include/linux/refcount.h:315 [inline]
 refcount_dec_and_test include/linux/refcount.h:333 [inline]
 l2tp_session_put+0xc8/0x1a0 net/l2tp/l2tp_core.c:192
 l2tp_session_delete+0x3a9/0x4a0 net/l2tp/l2tp_core.c:1589
 l2tp_tunnel_closeall net/l2tp/l2tp_core.c:1235 [inline]
 l2tp_tunnel_del_work+0x180/0x3d0 net/l2tp/l2tp_core.c:1273
 process_one_work+0x6c8/0xbb0 kernel/workqueue.c:2328
 worker_thread+0xaa0/0x1250 kernel/workqueue.c:2475
 kthread+0x3f5/0x4f0 kernel/kthread.c:337
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
---[ end trace ad044ed78a89f25f ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/06/27 08:42 android13-5.15-lts c85054db4618 fb92f11c .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in l2tp_tunnel_del_work
* Struck through repros no longer work on HEAD.