KASAN: use-after-free Write in l2tp_session_delete (4)

Status: premoderation: reported on 2026/11/18 16:48
Reported-by: syzbot+1156e27fe0c3625d2dec@syzkaller.appspotmail.com
First crash: 16h21m, last: 16h21m
▶ ▼ Similar bugs (16)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 KASAN: use-after-free Write in l2tp_session_delete 22 2 758d 782d 0/2 auto-obsoleted due to no activity on 2025/01/19 22:14
android-5-10 KASAN: use-after-free Write in l2tp_session_delete (2) 22 3 557d 658d 0/2 auto-obsoleted due to no activity on 2025/08/08 12:20
android-5-10 KASAN: use-after-free Write in l2tp_session_delete (3) 22 5 314d 430d 0/2 auto-obsoleted due to no activity on 2026/04/09 06:46
android-6-1 KASAN: use-after-free Write in l2tp_session_delete (2) 22 1 271d 271d 0/2 auto-obsoleted due to no activity on 2026/05/22 02:12
android-6-1 KASAN: use-after-free Write in l2tp_session_delete (3) 22 6 107d 148d 0/2 auto-obsoleted due to no activity on 2026/11/01 15:16
linux-6.1 KASAN: use-after-free Write in l2tp_session_delete (2) 22 1 303d 303d 0/3 auto-obsoleted due to no activity on 2026/04/29 20:48
linux-6.1 KASAN: use-after-free Write in l2tp_session_delete (3) 22 1 72d 72d 0/3 upstream: reported on 2026/09/08 09:02
linux-6.1 KASAN: use-after-free Write in l2tp_session_delete 22 2 790d 812d 0/3 auto-obsoleted due to no activity on 2024/12/29 03:40
android-5-15 KASAN: use-after-free Write in l2tp_session_delete 22 2 875d 888d 0/2 auto-obsoleted due to no activity on 2024/09/25 05:09
android-5-15 KASAN: use-after-free Write in l2tp_session_delete (2) origin:downstream 22 syz, C error 36 34d 616d 0/2 upstream: reported C repro on 2025/03/13 02:24
linux-5.15 KASAN: use-after-free Write in l2tp_session_delete 22 2 1207d 1295d 0/3 auto-obsoleted due to no activity on 2023/11/08 00:22
linux-5.15 KASAN: use-after-free Write in l2tp_session_delete (2) 22 2 702d 790d 0/3 auto-obsoleted due to no activity on 2025/03/26 11:58
android-5-10 KASAN: use-after-free Write in l2tp_session_delete (4) 22 syz, C 32 4d16h 144d 0/2 upstream: reported C repro on 2026/06/28 05:46
android-6-1 KASAN: use-after-free Write in l2tp_session_delete origin:downstream 22 syz error 20 367d 771d 0/2 auto-obsoleted due to no activity on 2026/02/14 16:29
linux-5.15 KASAN: use-after-free Write in l2tp_session_delete (3) 22 1 482d 482d 0/3 auto-obsoleted due to no activity on 2025/11/02 00:17
upstream KASAN: slab-use-after-free Write in l2tp_session_delete net 22 syz, C done 1286 857d 876d 27/29 fixed on 2024/08/14 03:44

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in __hlist_del include/linux/list.h:886 [inline]
BUG: KASAN: use-after-free in hlist_del_init_rcu include/linux/rculist.h:184 [inline]
BUG: KASAN: use-after-free in l2tp_session_unhash net/l2tp/l2tp_core.c:1202 [inline]
BUG: KASAN: use-after-free in l2tp_session_delete+0x13d/0x4d0 net/l2tp/l2tp_core.c:1582
Write of size 8 at addr ffff888101b4a480 by task syz.2.1692/5979

CPU: 1 PID: 5979 Comm: syz.2.1692 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x24 lib/dump_stack.c:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x71/0x200 mm/kasan/report.c:316
 print_report+0x4a/0x60 mm/kasan/report.c:420
 kasan_report+0x122/0x150 mm/kasan/report.c:524
 __asan_report_store8_noabort+0x17/0x20 mm/kasan/report_generic.c:356
 __hlist_del include/linux/list.h:886 [inline]
 hlist_del_init_rcu include/linux/rculist.h:184 [inline]
 l2tp_session_unhash net/l2tp/l2tp_core.c:1202 [inline]
 l2tp_session_delete+0x13d/0x4d0 net/l2tp/l2tp_core.c:1582
 pppol2tp_release+0x169/0x2b0 net/l2tp/l2tp_ppp.c:438
 __sock_release net/socket.c:652 [inline]
 sock_close+0xc9/0x220 net/socket.c:1390
 __fput+0x1fd/0x8f0 fs/file_table.c:320
 ____fput+0x15/0x20 fs/file_table.c:348
 task_work_run+0x1e1/0x250 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x9b/0xb0 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:303
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f825a5a9559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd0b64c378 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f825a827da0 RCX: 00007f825a5a9559
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f825a827da0 R08: 0000000000000006 R09: 0000000000000000
R10: 000000000003fd40 R11: 0000000000000246 R12: 00000000000574da
R13: 00007f825a825fac R14: 00007f825a825fa8 R15: 00007f825a825fa0
 </TASK>

Allocated by task 5980:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_alloc_info+0x1f/0x30 mm/kasan/generic.c:505
 ____kasan_kmalloc mm/kasan/common.c:380 [inline]
 __kasan_kmalloc+0x95/0xb0 mm/kasan/common.c:389
 kasan_kmalloc include/linux/kasan.h:212 [inline]
 __do_kmalloc_node mm/slab_common.c:938 [inline]
 __kmalloc+0xb4/0x1e0 mm/slab_common.c:951
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 l2tp_session_create+0x38/0xbd0 net/l2tp/l2tp_core.c:1614
 pppol2tp_connect+0xbf5/0x1640 net/l2tp/l2tp_ppp.c:771
 __sys_connect_file net/socket.c:2001 [inline]
 __sys_connect+0x3da/0x460 net/socket.c:2018
 __do_sys_connect net/socket.c:2028 [inline]
 __se_sys_connect net/socket.c:2025 [inline]
 __x64_sys_connect+0x7a/0x90 net/socket.c:2025
 x64_sys_call+0x88d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:43
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Freed by task 5981:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:516
 ____kasan_slab_free+0x132/0x180 mm/kasan/common.c:242
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:250
 kasan_slab_free include/linux/kasan.h:178 [inline]
 slab_free_hook mm/slub.c:1750 [inline]
 slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1776
 slab_free mm/slub.c:3712 [inline]
 __kmem_cache_free+0xb7/0x1b0 mm/slub.c:3728
 kfree+0x6f/0xf0 mm/slab_common.c:990
 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+0x1f6/0x330 drivers/net/ppp/pppox.c:93
 sock_do_ioctl+0x114/0x330 net/socket.c:1192
 sock_ioctl+0x475/0x700 net/socket.c:1311
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:870 [inline]
 __se_sys_ioctl+0x12f/0x1b0 fs/ioctl.c:856
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
 x64_sys_call+0x58b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

Last potentially related work creation:
 kasan_save_stack+0x3a/0x60 mm/kasan/common.c:46
 __kasan_record_aux_stack+0xb6/0xc0 mm/kasan/generic.c:486
 kasan_record_aux_stack_noalloc+0xb/0x10 mm/kasan/generic.c:496
 __call_rcu_common kernel/rcu/tree.c:2807 [inline]
 call_rcu+0xcf/0xf50 kernel/rcu/tree.c:2926
 fib6_info_release include/net/ip6_fib.h:350 [inline]
 ip6_route_info_create+0xaa8/0x14d0 net/ipv6/route.c:3881
 ip6_route_add+0x27/0x130 net/ipv6/route.c:3895
 addrconf_add_mroute net/ipv6/addrconf.c:2530 [inline]
 addrconf_add_dev+0x388/0x4a0 net/ipv6/addrconf.c:2548
 inet6_addr_add+0x1a8/0x9c0 net/ipv6/addrconf.c:3007
 inet6_rtm_newaddr+0x74a/0xa10 net/ipv6/addrconf.c:4999
 rtnetlink_rcv_msg+0xb28/0xde0 net/core/rtnetlink.c:6162
 netlink_rcv_skb+0x200/0x450 net/netlink/af_netlink.c:2526
 rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:6180
 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline]
 netlink_unicast+0x8c1/0xa60 net/netlink/af_netlink.c:1345
 netlink_sendmsg+0x8b9/0xbd0 net/netlink/af_netlink.c:1878
 sock_sendmsg_nosec net/socket.c:716 [inline]
 __sock_sendmsg net/socket.c:728 [inline]
 __sys_sendto+0x4ac/0x660 net/socket.c:2143
 __do_sys_sendto net/socket.c:2155 [inline]
 __se_sys_sendto net/socket.c:2151 [inline]
 __x64_sys_sendto+0xe5/0x100 net/socket.c:2151
 x64_sys_call+0x83/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:45
 do_syscall_x64 arch/x86/entry/common.c:46 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:76
 entry_SYSCALL_64_after_hwframe+0x68/0xd2

The buggy address belongs to the object at ffff888101b4a400
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 128 bytes inside of
 512-byte region [ffff888101b4a400, ffff888101b4a600)

The buggy address belongs to the physical page:
page:ffffea000406d200 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101b48
head:ffffea000406d200 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 dead000000000001 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 0x152a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 845, tgid 845 (kworker/u4:9), ts 222146931421, free_ts 137386950912
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2673
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2680
 get_page_from_freelist+0x2ca9/0x2d20 mm/page_alloc.c:4587
 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5931
 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
 allocate_slab mm/slub.c:1967 [inline]
 new_slab+0x98/0x3e0 mm/slub.c:2020
 ___slab_alloc+0x70f/0xb70 mm/slub.c:3177
 __slab_alloc+0x5e/0xa0 mm/slub.c:3263
 slab_alloc_node mm/slub.c:3348 [inline]
 __kmem_cache_alloc_node+0x204/0x2d0 mm/slub.c:3423
 __do_kmalloc_node mm/slab_common.c:937 [inline]
 __kmalloc+0xa4/0x1e0 mm/slab_common.c:951
 kmalloc include/linux/slab.h:568 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 fib6_info_alloc+0x34/0xe0 net/ipv6/ip6_fib.c:156
 ip6_route_info_create+0x51b/0x14d0 net/ipv6/route.c:3799
 ip6_route_add+0x27/0x130 net/ipv6/route.c:3895
 addrconf_prefix_route net/ipv6/addrconf.c:2466 [inline]
 addrconf_add_linklocal+0x3d2/0x660 net/ipv6/addrconf.c:3285
 addrconf_addr_gen+0x542/0x690 net/ipv6/addrconf.c:3414
 addrconf_dev_config net/ipv6/addrconf.c:3459 [inline]
 addrconf_init_auto_addrs+0x872/0xbc0 net/ipv6/addrconf.c:3538
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1581 [inline]
 __free_pages_ok+0xbb0/0xca0 mm/page_alloc.c:1839
 free_the_page mm/page_alloc.c:865 [inline]
 free_compound_page+0xaa/0xd0 mm/page_alloc.c:886
 destroy_large_folio+0x68/0xa0 mm/page_alloc.c:923
 __folio_put_large mm/swap.c:113 [inline]
 __folio_put+0xd1/0xe0 mm/swap.c:121
 folio_put include/linux/mm.h:1442 [inline]
 put_page include/linux/mm.h:1494 [inline]
 io_pages_unmap+0x249/0x3a0 io_uring/io_uring.c:2523
 io_rings_free+0x51/0xe0 io_uring/io_uring.c:2534
 io_ring_ctx_free+0x76b/0x987 io_uring/io_uring.c:2764
 io_ring_exit_work+0x6cd/0x724 io_uring/io_uring.c:2938
 process_one_work+0x717/0xc30 kernel/workqueue.c:2302
 worker_thread+0xa4d/0x11d0 kernel/workqueue.c:2449
 kthread+0x281/0x320 kernel/kthread.c:386
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Memory state around the buggy address:
 ffff888101b4a380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888101b4a400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888101b4a480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff888101b4a500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888101b4a580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5979 at net/l2tp/l2tp_ppp.c:156 pppol2tp_sock_to_session+0x167/0x1b0 net/l2tp/l2tp_ppp.c:156
Modules linked in:
CPU: 0 PID: 5979 Comm: syz.2.1692 Tainted: G    B              syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
RIP: 0010:pppol2tp_sock_to_session+0x167/0x1b0 net/l2tp/l2tp_ppp.c:156
Code: 5d c3 e8 6c b0 d4 fc be 02 00 00 00 eb 0a e8 60 b0 d4 fc be 01 00 00 00 4c 89 f7 e8 33 b6 cc fd e9 0f ff ff ff e8 49 b0 d4 fc <0f> 0b 48 89 df e8 ff 00 00 00 eb bd e8 38 b0 d4 fc 4c 89 f7 be 03
RSP: 0018:ffffc900122dfcb0 EFLAGS: 00010293
RAX: ffffffff849cc1d7 RBX: ffff888110fbd000 RCX: ffff88813e3a3cc0
RDX: 0000000000000000 RSI: 0000000039cfa098 RDI: 000000000c04eb7d
RBP: ffffc900122dfcd0 R08: ffff888110fbd083 R09: 1ffff110221f7a10
R10: dffffc0000000000 R11: ffffed10221f7a11 R12: dffffc0000000000
R13: dffffc0000000000 R14: 0000000039cfa098 R15: ffff888101b4a400
FS:  000055557a18f500(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2fc08ff8 CR3: 000000011393a000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 pppol2tp_release+0x150/0x2b0 net/l2tp/l2tp_ppp.c:434
 __sock_release net/socket.c:652 [inline]
 sock_close+0xc9/0x220 net/socket.c:1390
 __fput+0x1fd/0x8f0 fs/file_table.c:320
 ____fput+0x15/0x20 fs/file_table.c:348
 task_work_run+0x1e1/0x250 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0x9b/0xb0 kernel/entry/common.c:177
 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:303
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f825a5a9559
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd0b64c378 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f825a827da0 RCX: 00007f825a5a9559
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f825a827da0 R08: 0000000000000006 R09: 0000000000000000
R10: 000000000003fd40 R11: 0000000000000246 R12: 00000000000574da
R13: 00007f825a825fac R14: 00007f825a825fa8 R15: 00007f825a825fa0
 </TASK>
---[ end trace 0000000000000000 ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/18 16:48 android14-6.1 b07b626eb822 eb4895d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Write in l2tp_session_delete
* Struck through repros no longer work on HEAD.