KASAN: slab-use-after-free Read in seq_printf

Status: premoderation: reported on 2026/09/23 06:02
Reported-by: syzbot+2639b0a8b6a0d6cf6d3e@syzkaller.appspotmail.com
First crash: 7d08h, last: 1d02h
▶ ▼ Similar bugs (14)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in seq_printf fs 19 5 506d 612d 0/29 auto-obsoleted due to no activity on 2025/08/09 17:54
upstream KASAN: slab-use-after-free Read in seq_printf prio:high fs 19 74 17h29m 11d 0/29 upstream: reported on 2026/09/19 02:15
linux-6.6 KASAN: slab-use-after-free Read in seq_printf 19 1 36d 36d 0/2 upstream: reported on 2026/08/25 13:48
android-5-15 KASAN: use-after-free Read in seq_printf (2) 19 10 3d04h 35d 0/2 premoderation: reported on 2026/08/26 02:30
upstream KMSAN: uninit-value in seq_printf (2) fs 7 syz, C 99 1567d 1834d 0/29 auto-closed as invalid on 2022/09/30 02:43
linux-5.15 KASAN: use-after-free Read in seq_printf 19 1 6d23h 6d23h 0/3 upstream: reported on 2026/09/23 14:29
android-6-1 KASAN: slab-out-of-bounds Read in seq_printf (2) 17 1 178d 178d 0/2 auto-obsoleted due to no activity on 2026/07/03 17:29
android-5-10 KASAN: use-after-free Read in seq_printf (3) 19 25 3h17m 31d 0/2 premoderation: reported on 2026/08/30 00:45
android-5-10 KASAN: use-after-free Read in seq_printf 19 15 371d 478d 0/2 auto-obsoleted due to no activity on 2025/12/23 06:43
upstream KMSAN: kernel-infoleak in __skb_datagram_iter net 9 68 1100d 1205d 23/29 fixed on 2023/09/28 17:51
android-6-1 KASAN: slab-out-of-bounds Read in seq_printf 19 2 375d 380d 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 258d 258d 0/2 auto-obsoleted due to no activity on 2026/04/14 16:00
android-6-1 KASAN: use-after-free Read in seq_printf 19 syz, C 17 1d00h 5d16h 0/2 upstream: reported C repro on 2026/09/24 21:21
android-5-15 KASAN: use-after-free Read in seq_printf 19 1 376d 376d 0/2 auto-obsoleted due to no activity on 2025/12/17 23:30

Sample crash report:
==================================================================
BUG: KASAN: slab-use-after-free in string_nocheck lib/vsprintf.c:646 [inline]
BUG: KASAN: slab-use-after-free in string+0x20f/0x2b0 lib/vsprintf.c:728
Read of size 1 at addr ffff88810a666700 by task syz.1.268/1407

CPU: 0 UID: 0 PID: 1407 Comm: syz.1.268 Not tainted syzkaller #0 93cd2a7db6251899ee82c41fb24ebb4b8e8a6534
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
Call Trace:
 <TASK>
 __dump_stack+0x21/0x30 lib/dump_stack.c:94
 dump_stack_lvl+0x140/0x1c0 lib/dump_stack.c:120
 print_address_description+0x71/0x210 mm/kasan/report.c:377
 print_report+0x4a/0x70 mm/kasan/report.c:481
 kasan_report+0x162/0x1a0 mm/kasan/report.c:594
 __asan_report_load1_noabort+0x18/0x20 mm/kasan/report_generic.c:378
 string_nocheck lib/vsprintf.c:646 [inline]
 string+0x20f/0x2b0 lib/vsprintf.c:728
 vsnprintf+0xe65/0x1ad0 lib/vsprintf.c:2803
 seq_vprintf fs/seq_file.c:391 [inline]
 seq_printf+0x189/0x290 fs/seq_file.c:406
 show_interrupts+0x6d2/0x7f0 kernel/irq/proc.c:524
 seq_read_iter+0xa7d/0xf30 fs/seq_file.c:272
 proc_reg_read_iter+0x1ea/0x2c0 fs/proc/inode.c:299
 new_sync_read fs/read_write.c:489 [inline]
 vfs_read+0x60b/0xc70 fs/read_write.c:570
 ksys_read+0x145/0x260 fs/read_write.c:713
 __do_sys_read fs/read_write.c:723 [inline]
 __se_sys_read fs/read_write.c:721 [inline]
 __x64_sys_read+0x7f/0x90 fs/read_write.c:721
 x64_sys_call+0x2638/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:1
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f846c39e159
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:00007f846d2c9028 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f846c625fa0 RCX: 00007f846c39e159
RDX: 00000000000000bd RSI: 0000200000006a00 RDI: 0000000000000003
RBP: 00007f846c43506b R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f846c626038 R14: 00007f846c625fa0 R15: 00007ffc49c7f8d8
 </TASK>

Allocated by task 1:
 kasan_save_stack mm/kasan/common.c:49 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
 kasan_save_alloc_info+0x3a/0x50 mm/kasan/generic.c:565
 poison_kmalloc_redzone mm/kasan/common.c:379 [inline]
 __kasan_kmalloc+0x96/0xb0 mm/kasan/common.c:396
 kasan_kmalloc include/linux/kasan.h:261 [inline]
 __do_kmalloc_node mm/slub.c:4395 [inline]
 __kmalloc_node_track_caller_noprof+0x24e/0x4f0 mm/slub.c:4414
 kvasprintf+0xf1/0x260 lib/kasprintf.c:25
 kasprintf+0xe3/0x140 lib/kasprintf.c:59
 serial_core_add_one_port drivers/tty/serial/serial_core.c:3171 [inline]
 serial_core_register_port+0x83b/0x23c0 drivers/tty/serial/serial_core.c:3414
 serial_ctrl_register_port+0x21/0x30 drivers/tty/serial/serial_ctrl.c:41
 uart_add_one_port+0x21/0x30 drivers/tty/serial/serial_port.c:143
 serial8250_register_8250_port+0x17ab/0x21d0 drivers/tty/serial/8250/8250_core.c:823
 serial_pnp_probe+0x54b/0x750 drivers/tty/serial/8250/8250_pnp.c:490
 pnp_device_probe+0x319/0x4e0 drivers/pnp/driver.c:111
 call_driver_probe drivers/base/dd.c:-1 [inline]
 really_probe+0x2e4/0x8b0 drivers/base/dd.c:657
 __driver_probe_device+0x193/0x280 drivers/base/dd.c:799
 driver_probe_device+0x54/0x3f0 drivers/base/dd.c:829
 __driver_attach+0x422/0x5e0 drivers/base/dd.c:1215
 bus_for_each_dev+0x249/0x2d0 drivers/base/bus.c:370
 driver_attach+0x46/0x50 drivers/base/dd.c:1233
 bus_add_driver+0x393/0x730 drivers/base/bus.c:675
 driver_register+0x2b7/0x3c0 drivers/base/driver.c:246
 pnp_register_driver+0x81/0x90 drivers/pnp/driver.c:280
 serial8250_pnp_init+0x19/0x20 drivers/tty/serial/8250/8250_pnp.c:540
 serial8250_init+0xcc/0x1d0 drivers/tty/serial/8250/8250_platform.c:324
 do_one_initcall+0x1e8/0x6a0 init/main.c:1406
 do_initcall_level+0x174/0x2e5 init/main.c:1468
 do_initcalls+0x7e/0x160 init/main.c:1484
 do_basic_setup+0x95/0xb0 init/main.c:1503
 kernel_init_freeable+0x2b1/0x400 init/main.c:1717
 kernel_init+0x21/0x1e0 init/main.c:1606
 ret_from_fork+0x67/0xa0 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

Freed by task 1085:
 kasan_save_stack mm/kasan/common.c:49 [inline]
 kasan_save_track+0x3e/0x80 mm/kasan/common.c:70
 kasan_save_free_info+0x44/0x50 mm/kasan/generic.c:579
 poison_slab_object mm/kasan/common.c:249 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:266
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2445 [inline]
 slab_free mm/slub.c:4714 [inline]
 kfree+0x158/0x440 mm/slub.c:4875
 serial_core_remove_one_port drivers/tty/serial/serial_core.c:3273 [inline]
 serial_core_unregister_port+0x469/0xa50 drivers/tty/serial/serial_core.c:3449
 serial_ctrl_unregister_port+0x21/0x30 drivers/tty/serial/serial_ctrl.c:46
 uart_remove_one_port+0x21/0x30 drivers/tty/serial/serial_port.c:149
 serial8250_unregister_port+0x1cc/0x6b0 drivers/tty/serial/8250/8250_core.c:886
 serial_pnp_remove+0x5d/0xa0 drivers/tty/serial/8250/8250_pnp.c:507
 pnp_device_remove+0x8a/0x270 drivers/pnp/driver.c:133
 device_remove drivers/base/dd.c:567 [inline]
 __device_release_driver drivers/base/dd.c:1272 [inline]
 device_release_driver_internal+0x4aa/0x830 drivers/base/dd.c:1295
 device_driver_detach+0x3f/0x50 drivers/base/dd.c:1331
 unbind_store+0x1ab/0x1f0 drivers/base/bus.c:244
 drv_attr_store+0x8e/0xb0 drivers/base/bus.c:125
 sysfs_kf_write+0x13e/0x160 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x316/0x510 fs/kernfs/file.c:352
 new_sync_write fs/read_write.c:591 [inline]
 vfs_write+0x75f/0xfd0 fs/read_write.c:684
 ksys_write+0x145/0x260 fs/read_write.c:737
 __do_sys_write fs/read_write.c:749 [inline]
 __se_sys_write fs/read_write.c:746 [inline]
 __x64_sys_write+0x7f/0x90 fs/read_write.c:746
 x64_sys_call+0x271c/0x2ee0 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:47 [inline]
 do_syscall_64+0x57/0xf0 arch/x86/entry/common.c:78
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

The buggy address belongs to the object at ffff88810a666700
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 freed 8-byte region [ffff88810a666700, ffff88810a666708)

The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88810a6669e0 pfn:0x10a666
flags: 0x4000000000000200(workingset|zone=1)
page_type: f5(slab)
raw: 4000000000000200 ffff888100041500 ffffea000419f650 ffffea000465f350
raw: ffff88810a6669e0 000000000080007a 00000001f5000000 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 0x52cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 1, tgid 1 (swapper/0), ts 1648895891, free_ts 0
 set_page_owner include/linux/page_owner.h:35 [inline]
 post_alloc_hook+0x37d/0x3b0 mm/page_alloc.c:1864
 prep_new_page+0x2d/0x180 mm/page_alloc.c:1872
 get_page_from_freelist+0x4aea/0x4ba0 mm/page_alloc.c:3949
 __alloc_pages_noprof+0x35a/0x7e0 mm/page_alloc.c:5316
 alloc_slab_page+0x6b/0x1e0 mm/slub.c:-1
 allocate_slab+0x69/0x430 mm/slub.c:2687
 new_slab mm/slub.c:2741 [inline]
 ___slab_alloc+0x591/0x8c0 mm/slub.c:3934
 __slab_alloc mm/slub.c:4025 [inline]
 __slab_alloc_node mm/slub.c:4078 [inline]
 slab_alloc_node mm/slub.c:4239 [inline]
 __do_kmalloc_node mm/slub.c:4394 [inline]
 __kmalloc_node_track_caller_noprof+0x2e3/0x4f0 mm/slub.c:4414
 kstrdup+0x4d/0x130 mm/util.c:70
 kstrdup_const+0x45/0x60 mm/util.c:93
 __kernfs_new_node+0xaa/0x740 fs/kernfs/dir.c:624
 kernfs_new_node+0x154/0x280 fs/kernfs/dir.c:704
 __kernfs_create_file+0x52/0x280 fs/kernfs/file.c:1053
 sysfs_add_file_mode_ns+0x1d2/0x280 fs/sysfs/file.c:307
 create_files fs/sysfs/group.c:76 [inline]
 internal_create_group+0x66c/0xe70 fs/sysfs/group.c:180
 sysfs_create_group+0x23/0x40 fs/sysfs/group.c:206
page_owner free stack trace missing

Memory state around the buggy address:
 ffff88810a666600: 05 fc fc fc 05 fc fc fc 05 fc fc fc fa fc fc fc
 ffff88810a666680: 04 fc fc fc 00 fc fc fc 06 fc fc fc 05 fc fc fc
>ffff88810a666700: fa fc fc fc 06 fc fc fc 05 fc fc fc 05 fc fc fc
                   ^
 ffff88810a666780: 06 fc fc fc 06 fc fc fc 00 fc fc fc 05 fc fc fc
 ffff88810a666800: 05 fc fc fc 00 fc fc fc 07 fc fc fc 00 fc fc fc
==================================================================
netlink: 5 bytes leftover after parsing attributes in process `syz.1.268'.

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/09/29 12:04 android16-6.12 da245f6c05a1 7bf4ea23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in seq_printf
2026/09/29 11:34 android16-6.12 da245f6c05a1 7bf4ea23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in seq_printf
2026/09/29 02:46 android16-6.12 da245f6c05a1 7bf4ea23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in seq_printf
2026/09/25 07:02 android16-6.12 558b94a8d268 f281d9d2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in seq_printf
2026/09/25 01:53 android16-6.12 558b94a8d268 3c3cdf19 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in seq_printf
2026/09/23 06:01 android16-6.12 c8909f7cf138 5207b90e .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-12-rust KASAN: slab-use-after-free Read in seq_printf
* Struck through repros no longer work on HEAD.