KASAN: use-after-free Read in l2tp_xmit_skb (2)

Status: premoderation: reported on 2026/10/11 21:04
Reported-by: syzbot+41bd4d7f434b8e877465@syzkaller.appspotmail.com
First crash: 3d15h, last: 3d15h
▶ ▼ Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: use-after-free Read in l2tp_xmit_skb 19 1 1d05h 1d05h 0/2 premoderation: reported on 2026/10/14 07:15
android-5-10 KASAN: use-after-free Read in l2tp_xmit_skb 19 1 47d 47d 0/2 premoderation: reported on 2026/08/28 15:04
android-6-1 KASAN: use-after-free Read in l2tp_xmit_skb 19 2 108d 120d 0/2 auto-obsoleted due to no activity on 2026/09/26 16:10

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in l2tp_xmit_core net/l2tp/l2tp_core.c:1031 [inline]
BUG: KASAN: use-after-free in l2tp_xmit_skb+0x47/0x1820 net/l2tp/l2tp_core.c:1137
Read of size 8 at addr ffff88810faef410 by task syz.0.141/1029

CPU: 1 PID: 1029 Comm: syz.0.141 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/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_load8_noabort+0x14/0x20 mm/kasan/report_generic.c:351
 l2tp_xmit_core net/l2tp/l2tp_core.c:1031 [inline]
 l2tp_xmit_skb+0x47/0x1820 net/l2tp/l2tp_core.c:1137
 pppol2tp_sendmsg+0x357/0x5d0 net/l2tp/l2tp_ppp.c:307
 sock_sendmsg_nosec net/socket.c:716 [inline]
 __sock_sendmsg net/socket.c:728 [inline]
 ____sys_sendmsg+0x5fb/0x9c0 net/socket.c:2509
 ___sys_sendmsg+0x2a2/0x360 net/socket.c:2563
 __sys_sendmmsg+0x2cc/0x4e0 net/socket.c:2649
 __do_sys_sendmmsg net/socket.c:2678 [inline]
 __se_sys_sendmmsg net/socket.c:2675 [inline]
 __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2675
 x64_sys_call+0x3f5/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:308
 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
RIP: 0033:0x7f7b1219e1d9
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:00007f7b12fd6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f7b12425fa0 RCX: 00007f7b1219e1d9
RDX: 0000000000034000 RSI: 0000200000004380 RDI: 0000000000000003
RBP: 00007f7b12235888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7b12426038 R14: 00007f7b12425fa0 R15: 00007ffe8e7c5d68
 </TASK>

Allocated by task 1029:
 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 309:
 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
 l2tp_session_delete+0x3df/0x4d0 net/l2tp/l2tp_core.c:1587
 l2tp_tunnel_closeall net/l2tp/l2tp_core.c:1233 [inline]
 l2tp_tunnel_del_work+0x199/0x410 net/l2tp/l2tp_core.c:1271
 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

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

The buggy address belongs to the physical page:
page:ffffea00043ebb00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10faec
head:ffffea00043ebb00 order:2 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 ffffea0004541d00 dead000000000002 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 141, tgid 141 (dhcpcd), ts 37255394003, free_ts 25233549317
 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_node_track_caller+0xa1/0x1e0 mm/slab_common.c:958
 kmalloc_reserve net/core/skbuff.c:449 [inline]
 __alloc_skb+0x226/0x4a0 net/core/skbuff.c:518
 alloc_skb include/linux/skbuff.h:1322 [inline]
 alloc_skb_with_frags+0xa8/0x620 net/core/skbuff.c:6176
 sock_alloc_send_pskb+0x87f/0x9a0 net/core/sock.c:2770
 unix_dgram_sendmsg+0x5c1/0x1710 net/unix/af_unix.c:1949
 unix_seqpacket_sendmsg+0x118/0x1e0 net/unix/af_unix.c:2410
 sock_sendmsg_nosec net/socket.c:716 [inline]
 __sock_sendmsg net/socket.c:728 [inline]
 sock_write_iter+0x2ea/0x3f0 net/socket.c:1134
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_pcp_prepare mm/page_alloc.c:1655 [inline]
 free_unref_page_prepare+0x81b/0x820 mm/page_alloc.c:3622
 free_unref_page+0x93/0x530 mm/page_alloc.c:3720
 free_the_page mm/page_alloc.c:863 [inline]
 __free_pages+0x67/0x100 mm/page_alloc.c:6021
 __free_slab+0xc7/0x1a0 mm/slub.c:2044
 free_slab mm/slub.c:2059 [inline]
 discard_slab+0x29/0x40 mm/slub.c:2065
 __slab_free+0x201/0x280 mm/slub.c:3625
 do_slab_free mm/slub.c:3666 [inline]
 ___cache_free+0xbf/0xd0 mm/slub.c:3722
 qlink_free mm/kasan/quarantine.c:168 [inline]
 qlist_free_all+0xc6/0x140 mm/kasan/quarantine.c:187
 kasan_quarantine_reduce+0x14a/0x170 mm/kasan/quarantine.c:294
 __kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:311
 kasan_slab_alloc include/linux/kasan.h:202 [inline]
 slab_post_alloc_hook+0x4f/0x2d0 mm/slab.h:768
 slab_alloc_node mm/slub.c:3382 [inline]
 __kmem_cache_alloc_node+0x194/0x2d0 mm/slub.c:3423
 kmalloc_trace+0x29/0xb0 mm/slab_common.c:1028
 kmalloc include/linux/slab.h:563 [inline]
 kzalloc include/linux/slab.h:699 [inline]
 ref_tracker_alloc+0x16b/0x4a0 lib/ref_tracker.c:85
 __netdev_tracker_alloc include/linux/netdevice.h:4085 [inline]
 netdev_hold include/linux/netdevice.h:4114 [inline]
 netdev_queue_add_kobject net/core/net-sysfs.c:1657 [inline]
 netdev_queue_update_kobjects+0x181/0x470 net/core/net-sysfs.c:1712
 register_queue_kobjects net/core/net-sysfs.c:1773 [inline]
 netdev_register_kobject+0x281/0x330 net/core/net-sysfs.c:2013

Memory state around the buggy address:
 ffff88810faef300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88810faef380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88810faef400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                         ^
 ffff88810faef480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88810faef500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1029 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: 1029 Comm: syz.0.141 Tainted: G    B              syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
RIP: 0010:pppol2tp_sock_to_session+0x167/0x1b0 net/l2tp/l2tp_ppp.c:156
Code: 5d c3 e8 dc 3c d5 fc be 02 00 00 00 eb 0a e8 d0 3c d5 fc be 01 00 00 00 4c 89 f7 e8 83 01 cd fd e9 0f ff ff ff e8 b9 3c d5 fc <0f> 0b 48 89 df e8 ff 00 00 00 eb bd e8 a8 3c d5 fc 4c 89 f7 be 03
RSP: 0018:ffffc90000d87838 EFLAGS: 00010246
RAX: ffffffff849c3187 RBX: ffff888114c97000 RCX: 0000000000080000
RDX: ffffc9000168a000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffffc90000d87858 R08: ffff888114c97083 R09: 1ffff11022992e10
R10: dffffc0000000000 R11: ffffed1022992e11 R12: dffffc0000000000
R13: 0000000000000000 R14: 00000000361b9990 R15: ffff88810faef400
FS:  00007f7b12fd66c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f522e87fff8 CR3: 000000012ab85000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 pppol2tp_sendmsg+0xdf/0x5d0 net/l2tp/l2tp_ppp.c:270
 sock_sendmsg_nosec net/socket.c:716 [inline]
 __sock_sendmsg net/socket.c:728 [inline]
 ____sys_sendmsg+0x5fb/0x9c0 net/socket.c:2509
 ___sys_sendmsg+0x2a2/0x360 net/socket.c:2563
 __sys_sendmmsg+0x2cc/0x4e0 net/socket.c:2649
 __do_sys_sendmmsg net/socket.c:2678 [inline]
 __se_sys_sendmmsg net/socket.c:2675 [inline]
 __x64_sys_sendmmsg+0xa0/0xb0 net/socket.c:2675
 x64_sys_call+0x3f5/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:308
 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
RIP: 0033:0x7f7b1219e1d9
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:00007f7b12fd6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 00007f7b12425fa0 RCX: 00007f7b1219e1d9
RDX: 0000000000034000 RSI: 0000200000004380 RDI: 0000000000000003
RBP: 00007f7b12235888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7b12426038 R14: 00007f7b12425fa0 R15: 00007ffe8e7c5d68
 </TASK>
---[ end trace 0000000000000000 ]---
------------[ cut here ]------------
WARNING: CPU: 1 PID: 1029 at net/l2tp/l2tp_ppp.c:156 pppol2tp_sock_to_session+0x167/0x1b0 net/l2tp/l2tp_ppp.c:156
Modules linked in:
CPU: 1 PID: 1029 Comm: syz.0.141 Tainted: G    B   W          syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
RIP: 0010:pppol2tp_sock_to_session+0x167/0x1b0 net/l2tp/l2tp_ppp.c:156
Code: 5d c3 e8 dc 3c d5 fc be 02 00 00 00 eb 0a e8 d0 3c d5 fc be 01 00 00 00 4c 89 f7 e8 83 01 cd fd e9 0f ff ff ff e8 b9 3c d5 fc <0f> 0b 48 89 df e8 ff 00 00 00 eb bd e8 a8 3c d5 fc 4c 89 f7 be 03
RSP: 0018:ffffc90000d87930 EFLAGS: 00010246
RAX: ffffffff849c3187 RBX: ffff888114c97000 RCX: 0000000000080000
RDX: ffffc9000168a000 RSI: 000000000007ffff RDI: 0000000000080000
RBP: ffffc90000d87950 R08: ffff888114c97083 R09: 1ffff11022992e10
R10: dffffc0000000000 R11: ffffed1022992e11 R12: dffffc0000000000
R13: dffffc0000000000 R14: 00000000361b9990 R15: ffff88810faef400
FS:  00007f7b12fd66c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f522dbf12f8 CR3: 000000012ab85000 CR4: 00000000003506a0
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
 get_signal+0x12e8/0x1700 kernel/signal.c:2677
 arch_do_signal_or_restart+0xd1/0x11c0 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x7a/0xb0 kernel/entry/common.c:174
 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:0x7f7b1219e1d9
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:00007f7b12fd6028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: 000000000000036f RBX: 00007f7b12425fa0 RCX: 00007f7b1219e1d9
RDX: 0000000000034000 RSI: 0000200000004380 RDI: 0000000000000003
RBP: 00007f7b12235888 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f7b12426038 R14: 00007f7b12425fa0 R15: 00007ffe8e7c5d68
 </TASK>
---[ end trace 0000000000000000 ]---

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/11 21:03 android14-6.1 9ea8d8374e5e 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in l2tp_xmit_skb
* Struck through repros no longer work on HEAD.