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: 8d20h, last: 1h24m
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 17 15h23m 21d 0/2 premoderation: reported on 2026/06/14 19:53
android-5-10 KASAN: use-after-free Read in l2tp_tunnel_del_work 19 17 1d11h 12d 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 1241d 1307d 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 1676d 1671d 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 726d 740d 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 ffff88812680d080 by task kworker/u4:3/315

CPU: 1 PID: 315 Comm: kworker/u4:3 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 1003:
 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 1006:
 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

The buggy address belongs to the object at ffff88812680d000
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 128 bytes inside of
 512-byte region [ffff88812680d000, ffff88812680d200)
The buggy address belongs to the page:
page:ffffea00049a0300 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x12680c
head:ffffea00049a0300 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea00043c5c00 0000000500000005 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 286, ts 23589774878, free_ts 0
 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_track_caller+0x169/0x2c0 mm/slub.c:4954
 kmalloc_reserve net/core/skbuff.c:357 [inline]
 __alloc_skb+0x210/0x730 net/core/skbuff.c:428
 alloc_skb include/linux/skbuff.h:1183 [inline]
 nlmsg_new include/net/netlink.h:953 [inline]
 inet_netconf_notify_devconf+0x169/0x220 net/ipv4/devinet.c:2122
 __devinet_sysctl_register+0x31c/0x390 net/ipv4/devinet.c:2610
 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_owner free stack trace missing

Memory state around the buggy address:
 ffff88812680cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88812680d000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88812680d080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88812680d100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88812680d180: 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: 1 PID: 315 at lib/refcount.c:28 refcount_warn_saturate+0x120/0x1a0 lib/refcount.c:28
Modules linked in:
CPU: 1 PID: 315 Comm: kworker/u4:3 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 c0 46 63 85 e8 ac 00 5a 02 0f 0b eb c3 e8 53 8f 19 ff c6 05 c0 01 96 04 01 48 c7 c7 20 47 63 85 e8 90 00 5a 02 <0f> 0b eb a7 e8 37 8f 19 ff c6 05 a1 01 96 04 01 48 c7 c7 60 46 63
RSP: 0018:ffffc90007867c40 EFLAGS: 00010246

RAX: 66234511fd376e00 RBX: 0000000000000003 RCX: ffff88810dca4f00
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc90007867c50 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52000f0cee8 R12: ffff888120565c20
R13: dffffc0000000000 R14: 0000000000000003 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff90d3ab2f8 CR3: 000000011e2cb000 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 d4e6f3a8a6fc9063 ]---

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/07/06 04:14 android13-5.15-lts a64de05eba09 fcece630 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in l2tp_tunnel_del_work
2026/07/05 01:57 android13-5.15-lts a64de05eba09 fcece630 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in l2tp_tunnel_del_work
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.