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: 7d23h, last: 6h36m
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 15 6h35m 20d 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 13h59m 11d 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 1240d 1306d 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 1675d 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 725d 739d 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 ffff88810dfbb880 by task kworker/u4:1/10

CPU: 1 PID: 10 Comm: kworker/u4:1 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 1184:
 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 1184:
 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 ffff88810dfbb800
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 128 bytes inside of
 512-byte region [ffff88810dfbb800, ffff88810dfbba00)
The buggy address belongs to the page:
page:ffffea000437ee00 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88810dfb9c00 pfn:0x10dfb8
head:ffffea000437ee00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea0004564c08 ffffea0004583e08 ffff888100042f00
raw: ffff88810dfb9c00 000000000010000e 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 105, ts 4210741351, 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]
 alloc_skb_with_frags+0xa8/0x620 net/core/skbuff.c:6207
 sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2542
 unix_dgram_sendmsg+0x6f3/0x19b0 net/unix/af_unix.c:1816
 sock_sendmsg_nosec net/socket.c:704 [inline]
 __sock_sendmsg net/socket.c:716 [inline]
 sock_write_iter+0x2a6/0x3a0 net/socket.c:1079
 call_write_iter include/linux/fs.h:2212 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0x831/0xfd0 fs/read_write.c:594
 ksys_write+0x14a/0x260 fs/read_write.c:647
 __do_sys_write fs/read_write.c:659 [inline]
 __se_sys_write fs/read_write.c:656 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:656
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88810dfbb780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88810dfbb800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88810dfbb880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff88810dfbb900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88810dfbb980: 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: 10 at lib/refcount.c:28 refcount_warn_saturate+0x120/0x1a0 lib/refcount.c:28
Modules linked in:
CPU: 0 PID: 10 Comm: kworker/u4:1 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:ffffc900000a7c40 EFLAGS: 00010246

RAX: 579595f58d7fc000 RBX: 0000000000000003 RCX: ffff888100270000
RDX: 0000000000000000 RSI: 0000000080000000 RDI: 0000000000000000
RBP: ffffc900000a7c50 R08: ffff8881f7032f3f R09: 1ffff1103ee065e7
R10: dffffc0000000000 R11: ffffed103ee065e8 R12: ffff888115d92020
R13: dffffc0000000000 R14: 0000000000000003 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2633c41d58 CR3: 000000010d69e000 CR4: 00000000003506b0
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 f2fdce0bb759a2f8 ]---

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.