KASAN: use-after-free Read in seq_printf

Status: upstream: reported C repro on 2026/09/24 21:21
Reported-by: syzbot+4d22df02206f4110f41f@syzkaller.appspotmail.com
First crash: 3d18h, last: 9h55m
▶ ▼ Similar bugs (14)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-15 KASAN: use-after-free Read in seq_printf (2) 19 4 18h40m 30d 0/2 premoderation: reported on 2026/08/26 02:30
linux-5.15 KASAN: use-after-free Read in seq_printf 19 1 1d16h 1d16h 0/3 upstream: reported on 2026/09/23 14:29
android-5-10 KASAN: use-after-free Read in seq_printf (3) 19 6 7h39m 26d 0/2 premoderation: reported on 2026/08/30 00:45
android-5-10 KASAN: use-after-free Read in seq_printf 19 15 366d 473d 0/2 auto-obsoleted due to no activity on 2025/12/23 06:43
upstream KASAN: slab-out-of-bounds Read in seq_printf fs 19 5 501d 606d 0/29 auto-obsoleted due to no activity on 2025/08/09 17:54
android-6-1 KASAN: slab-out-of-bounds Read in seq_printf 19 2 370d 374d 0/2 auto-obsoleted due to no activity on 2025/12/19 00:57
android-5-10 KASAN: use-after-free Read in seq_printf (2) 19 1 253d 253d 0/2 auto-obsoleted due to no activity on 2026/04/14 16:00
android-5-15 KASAN: use-after-free Read in seq_printf 19 1 371d 371d 0/2 auto-obsoleted due to no activity on 2025/12/17 23:30
upstream KMSAN: uninit-value in seq_printf (2) fs 7 syz, C 99 1562d 1829d 0/29 auto-closed as invalid on 2022/09/30 02:43
android-6-1 KASAN: slab-out-of-bounds Read in seq_printf (2) 17 1 173d 173d 0/2 auto-obsoleted due to no activity on 2026/07/03 17:29
android-6-12 KASAN: slab-use-after-free Read in seq_printf 19 3 9m 2d01h 0/1 premoderation: reported on 2026/09/23 06:02
upstream KMSAN: kernel-infoleak in __skb_datagram_iter net 9 68 1094d 1199d 23/29 fixed on 2023/09/28 17:51
upstream KASAN: slab-use-after-free Read in seq_printf prio:high fs 19 67 8h49m 6d04h 0/29 upstream: reported on 2026/09/19 02:15
linux-6.6 KASAN: slab-use-after-free Read in seq_printf 19 1 30d 30d 0/2 upstream: reported on 2026/08/25 13:48

Sample crash report:
printk: console [ttyS0] disabled
printk: console [ttyS0] enabled
==================================================================
BUG: KASAN: use-after-free in string_nocheck lib/vsprintf.c:643 [inline]
BUG: KASAN: use-after-free in string+0x20f/0x2a0 lib/vsprintf.c:725
Read of size 1 at addr ffff88810b4b2ac8 by task syz-executor245/305

CPU: 0 PID: 305 Comm: syz-executor245 Not tainted syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/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_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:348
 string_nocheck lib/vsprintf.c:643 [inline]
 string+0x20f/0x2a0 lib/vsprintf.c:725
 vsnprintf+0xec5/0x1990 lib/vsprintf.c:2805
 seq_vprintf fs/seq_file.c:391 [inline]
 seq_printf+0x185/0x280 fs/seq_file.c:406
 show_interrupts+0x8f9/0xa00 kernel/irq/proc.c:527
 seq_read_iter+0x992/0xd80 fs/seq_file.c:272
 proc_reg_read_iter+0x1e0/0x2b0 fs/proc/inode.c:305
 call_read_iter include/linux/fs.h:2276 [inline]
 generic_file_splice_read+0x1d9/0x530 fs/splice.c:308
 do_splice_to fs/splice.c:792 [inline]
 splice_direct_to_actor+0x3d0/0xb30 fs/splice.c:864
 do_splice_direct+0x1c2/0x2d0 fs/splice.c:973
 do_sendfile+0x515/0xe20 fs/read_write.c:1255
 __do_sys_sendfile64 fs/read_write.c:1323 [inline]
 __se_sys_sendfile64 fs/read_write.c:1309 [inline]
 __x64_sys_sendfile64+0x199/0x1f0 fs/read_write.c:1309
 x64_sys_call+0x62c/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:41
 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:0x7f529a49fdf9
Code: c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 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 d8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffea0a88058 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 636f7270796d2f2e RCX: 00007f529a49fdf9
RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000007
RBP: 0000000000000001 R08: 00007ffea0a88198 R09: 00007ffea0a88198
R10: 00000000000007ff R11: 0000000000000246 R12: 00007ffea0a88188
R13: 0000000000000002 R14: 00007f529a530ca0 R15: 0000200000000004
 </TASK>

Allocated by task 1:
 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_node_track_caller+0xb1/0x1e0 mm/slab_common.c:958
 kvasprintf+0xe8/0x1a0 lib/kasprintf.c:25
 kasprintf+0xdf/0x130 lib/kasprintf.c:59
 uart_add_one_port+0x38b/0x1cf0 drivers/tty/serial/serial_core.c:3117
 serial8250_register_8250_port+0x1368/0x1b70 drivers/tty/serial/8250/8250_core.c:1092
 serial_pnp_probe+0x51e/0x710 drivers/tty/serial/8250/8250_pnp.c:478
 pnp_device_probe+0x312/0x4d0 drivers/pnp/driver.c:111
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2d7/0x9a0 drivers/base/dd.c:639
 __driver_probe_device+0x193/0x270 drivers/base/dd.c:808
 driver_probe_device+0x54/0x3e0 drivers/base/dd.c:838
 __driver_attach+0x41a/0x5d0 drivers/base/dd.c:1224
 bus_for_each_dev+0x18c/0x200 drivers/base/bus.c:303
 driver_attach+0x42/0x50 drivers/base/dd.c:1241
 bus_add_driver+0x322/0x560 drivers/base/bus.c:620
 driver_register+0x335/0x440 drivers/base/driver.c:246
 pnp_register_driver+0x7d/0x90 drivers/pnp/driver.c:273
 serial8250_pnp_init+0x15/0x20 drivers/tty/serial/8250/8250_pnp.c:533
 serial8250_init+0xa0/0x16e drivers/tty/serial/8250/8250_core.c:1191
 do_one_initcall+0x1d6/0x580 init/main.c:1433
 do_initcall_level+0x174/0x2df init/main.c:1506
 do_initcalls+0x50/0x92 init/main.c:1522
 do_basic_setup+0x92/0x99 init/main.c:1541
 kernel_init_freeable+0x2d1/0x42d init/main.c:1761
 kernel_init+0x1d/0x1c0 init/main.c:1649
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Freed by task 305:
 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
 uart_remove_one_port+0x36a/0x720 drivers/tty/serial/serial_core.c:3235
 serial8250_unregister_port+0xad/0x250 drivers/tty/serial/8250/8250_core.c:1154
 serial_pnp_remove+0x6b/0x90 drivers/tty/serial/8250/8250_pnp.c:496
 pnp_device_remove+0x84/0x260 drivers/pnp/driver.c:133
 device_remove drivers/base/dd.c:548 [inline]
 __device_release_driver drivers/base/dd.c:1283 [inline]
 device_release_driver_internal+0x486/0x7e0 drivers/base/dd.c:1309
 device_driver_detach+0x3b/0x40 drivers/base/dd.c:1345
 unbind_store+0x2e5/0x300 drivers/base/bus.c:193
 drv_attr_store+0x88/0xb0 drivers/base/bus.c:77
 sysfs_kf_write+0x137/0x150 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x307/0x470 fs/kernfs/file.c:352
 call_write_iter include/linux/fs.h:2282 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x5ef/0xd00 fs/read_write.c:584
 ksys_write+0x14a/0x260 fs/read_write.c:637
 __do_sys_write fs/read_write.c:649 [inline]
 __se_sys_write fs/read_write.c:646 [inline]
 __x64_sys_write+0x7b/0x90 fs/read_write.c:646
 x64_sys_call+0x27b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:2
 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 ffff88810b4b2ac8
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 8-byte region [ffff88810b4b2ac8, ffff88810b4b2ad0)

The buggy address belongs to the physical page:
page:ffffea00042d2c80 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88810b4b26e0 pfn:0x10b4b2
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea0004371dc8 ffffea00042d7008 ffff888100042300
raw: ffff88810b4b26e0 0000000000660021 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, tgid 1 (swapper/0), ts 2374775325, free_ts 0
 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
 kstrdup mm/util.c:66 [inline]
 kstrdup_const+0x5a/0xa0 mm/util.c:89
 __kernfs_new_node+0xa6/0x670 fs/kernfs/dir.c:610
 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:690
 kernfs_create_dir_ns+0x47/0x130 fs/kernfs/dir.c:1046
 sysfs_create_dir_ns+0x128/0x290 fs/sysfs/dir.c:59
 create_dir lib/kobject.c:63 [inline]
 kobject_add_internal+0x718/0xc20 lib/kobject.c:231
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88810b4b2980: fc fb fc fc fc fc 04 fc fc fc fc fb fc fc fc fc
 ffff88810b4b2a00: 00 fc fc fc fc fb fc fc fc fc fb fc fc fc fc 00
>ffff88810b4b2a80: fc fc fc fc 06 fc fc fc fc fa fc fc fc fc fb fc
                      

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/24 21:16 android14-6.1 d687308775e6 3c3cdf19 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in seq_printf
2026/09/24 19:06 android14-6.1 d687308775e6 3c3cdf19 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in seq_printf
2026/09/21 12:43 android14-6.1 8cef8b5b11b7 853b104b .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: use-after-free Read in seq_printf
* Struck through repros no longer work on HEAD.