KASAN: use-after-free Read in seq_printf

Status: upstream: reported on 2026/10/23 08:35
Reported-by: syzbot+3fb9da7664a0b12b5f4a@syzkaller.appspotmail.com
First crash: 6d14h, last: 6d01h
▶ ▼ Similar bugs (15)
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 syz, C 18 1d01h 17d 0/2 upstream: reported C repro on 2026/10/12 05:38
linux-5.15 KASAN: use-after-free Read in seq_printf 19 2 21d 36d 0/3 upstream: reported on 2026/09/23 14:29
android-5-10 KASAN: use-after-free Read in seq_printf (3) 19 syz, C 51 2d05h 17d 0/2 upstream: reported C repro on 2026/10/12 19:47
android-5-10 KASAN: use-after-free Read in seq_printf 19 15 400d 508d 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 536d 641d 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 404d 409d 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 288d 288d 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 origin:lts 19 syz, C 21 3d12h 35d 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 405d 405d 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 1597d 1863d 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 208d 208d 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 origin:lts 19 syz, C 21 10d 36d 0/1 premoderation: reported C repro on 2026/09/23 06:02
upstream KMSAN: kernel-infoleak in __skb_datagram_iter net 9 68 1129d 1234d 23/29 fixed on 2023/09/28 17:51
upstream KASAN: slab-use-after-free Read in seq_printf prio:high fs 19 C 91 10h08m 40d 0/29 upstream: reported C repro on 2026/09/19 02:15
linux-6.6 KASAN: slab-use-after-free Read in seq_printf 19 2 16d 65d 0/2 upstream: reported on 2026/08/25 13:48

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in string_nocheck lib/vsprintf.c:643 [inline]
BUG: KASAN: use-after-free in string+0x204/0x290 lib/vsprintf.c:725
Read of size 1 at addr ffff888023aa9be0 by task syz.2.7120/27752

CPU: 0 PID: 27752 Comm: syz.2.7120 Tainted: G        W          syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026
Call Trace:
 <TASK>
 dump_stack_lvl+0x188/0x24e lib/dump_stack.c:106
 print_address_description mm/kasan/report.c:316 [inline]
 print_report+0xa8/0x210 mm/kasan/report.c:420
 kasan_report+0x10b/0x140 mm/kasan/report.c:524
 string_nocheck lib/vsprintf.c:643 [inline]
 string+0x204/0x290 lib/vsprintf.c:725
 vsnprintf+0x10db/0x1c20 lib/vsprintf.c:2805
 seq_vprintf fs/seq_file.c:391 [inline]
 seq_printf+0x185/0x280 fs/seq_file.c:406
 show_interrupts+0x956/0xaf0 kernel/irq/proc.c:527
 seq_read_iter+0x8af/0xc50 fs/seq_file.c:272
 proc_reg_read_iter+0x1a9/0x270 fs/proc/inode.c:305
 call_read_iter include/linux/fs.h:2265 [inline]
 new_sync_read fs/read_write.c:389 [inline]
 vfs_read+0x471/0x960 fs/read_write.c:470
 ksys_read+0x14d/0x260 fs/read_write.c:613
 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:0x7f6b2ed9f559
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:00007f6b2fce3028 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f6b2f025fa0 RCX: 00007f6b2ed9f559
RDX: 0000000000002020 RSI: 00002000000003c0 RDI: 0000000000000003
RBP: 00007f6b2ee36b20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f6b2f026038 R14: 00007f6b2f025fa0 R15: 00007ffd92856c48
 </TASK>

Allocated by task 26465:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 ____kasan_kmalloc mm/kasan/common.c:375 [inline]
 __kasan_kmalloc+0x8e/0xa0 mm/kasan/common.c:384
 kasan_kmalloc include/linux/kasan.h:211 [inline]
 __do_kmalloc_node mm/slab_common.c:936 [inline]
 __kmalloc_node_track_caller+0xb0/0x240 mm/slab_common.c:956
 kstrdup mm/util.c:61 [inline]
 kstrdup_const+0x56/0x90 mm/util.c:84
 __kernfs_new_node+0xa6/0x7f0 fs/kernfs/dir.c:610
 kernfs_new_node+0x148/0x250 fs/kernfs/dir.c:690
 __kernfs_create_file+0x47/0x2e0 fs/kernfs/file.c:1068
 sysfs_add_file_mode_ns+0x233/0x2f0 fs/sysfs/file.c:298
 create_files fs/sysfs/group.c:64 [inline]
 internal_create_group+0x490/0xce0 fs/sysfs/group.c:148
 internal_create_groups fs/sysfs/group.c:188 [inline]
 sysfs_create_groups+0x55/0x120 fs/sysfs/group.c:214
 setup_gid_attrs drivers/infiniband/core/sysfs.c:1170 [inline]
 ib_setup_port_attrs+0x1630/0x2290 drivers/infiniband/core/sysfs.c:1447
 add_one_compat_dev+0x3d8/0x5c0 drivers/infiniband/core/device.c:979
 rdma_dev_init_net+0x1e2/0x270 drivers/infiniband/core/device.c:1195
 ops_init+0x360/0x5e0 net/core/net_namespace.c:138
 setup_net+0x4f2/0xbd0 net/core/net_namespace.c:336
 copy_net_ns+0x33e/0x5b0 net/core/net_namespace.c:508
 create_new_namespaces+0x3ce/0x700 kernel/nsproxy.c:110
 unshare_nsproxy_namespaces+0x116/0x160 kernel/nsproxy.c:226
 ksys_unshare+0x4f6/0x8e0 kernel/fork.c:3285
 __do_sys_unshare kernel/fork.c:3359 [inline]
 __se_sys_unshare kernel/fork.c:3357 [inline]
 __x64_sys_unshare+0x34/0x40 kernel/fork.c:3357
 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 ffff888023aa9be0
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 8-byte region [ffff888023aa9be0, ffff888023aa9be8)

The buggy address belongs to the physical page:
page:ffffea00008eaa40 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff888023aa9d70 pfn:0x23aa9
flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000200 ffffea0000652f08 ffffea0001818dc8 ffff888018441280
raw: ffff888023aa9d70 0000000000660061 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 8844770045, free_ts 8843855296
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x173/0x1a0 mm/page_alloc.c:2560
 prep_new_page mm/page_alloc.c:2567 [inline]
 get_page_from_freelist+0x206b/0x2180 mm/page_alloc.c:4358
 __alloc_pages+0x1ec/0x4f0 mm/page_alloc.c:5658
 alloc_page_interleave+0x24/0x1e0 mm/mempolicy.c:2115
 alloc_slab_page+0x5d/0x180 mm/slub.c:1799
 allocate_slab mm/slub.c:1944 [inline]
 new_slab+0x87/0x2d0 mm/slub.c:1997
 ___slab_alloc+0xbc5/0x1240 mm/slub.c:3154
 __slab_alloc mm/slub.c:3240 [inline]
 slab_alloc_node mm/slub.c:3325 [inline]
 __kmem_cache_alloc_node+0x126/0x270 mm/slub.c:3398
 __do_kmalloc_node mm/slab_common.c:935 [inline]
 __kmalloc_node_track_caller+0xa0/0x240 mm/slab_common.c:956
 kstrdup mm/util.c:61 [inline]
 kstrdup_const+0x56/0x90 mm/util.c:84
 kobject_set_name_vargs+0x5d/0x110 lib/kobject.c:265
 dev_set_name+0xdf/0x130 drivers/base/core.c:3485
 tty_register_device_attr+0x3c7/0x9d0 drivers/tty/tty_io.c:3246
 tty_register_device drivers/tty/tty_io.c:3187 [inline]
 tty_register_driver+0x5d4/0xb80 drivers/tty/tty_io.c:3451
 legacy_pty_init+0x3c1/0x5fd drivers/tty/pty.c:581
 pty_init+0xa/0x12 drivers/tty/pty.c:943
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1487 [inline]
 free_pcp_prepare mm/page_alloc.c:1537 [inline]
 free_unref_page_prepare+0x8e5/0x9e0 mm/page_alloc.c:3414
 free_unref_page+0x2e/0x3f0 mm/page_alloc.c:3509
 __vunmap+0x874/0xa40 mm/vmalloc.c:2783
 free_work+0x56/0x80 mm/vmalloc.c:97
 process_one_work+0x8ab/0x1160 kernel/workqueue.c:2292
 worker_thread+0xaf5/0x12a0 kernel/workqueue.c:2439
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Memory state around the buggy address:
 ffff888023aa9a80: fc fc fc fc 06 fc fc fc fc 06 fc fc fc fc 06 fc
 ffff888023aa9b00: fc fc fc 06 fc fc fc fc 00 fc fc fc fc 00 fc fc
>ffff888023aa9b80: fc fc 04 fc fc fc fc fb fc fc fc fc fb fc fc fc
                                                       ^
 ffff888023aa9c00: fc 04 fc fc fc fc 04 fc fc fc fc 04 fc fc fc fc
 ffff888023aa9c80: 04 fc fc fc fc 04 fc fc fc fc 04 fc fc fc fc 04
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/10/23 21:25 linux-6.1.y 79807e970724 1d9ca40b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in seq_printf
2026/10/23 21:25 linux-6.1.y 79807e970724 1d9ca40b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in seq_printf
2026/10/23 08:34 linux-6.1.y 79807e970724 d566bfda .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan KASAN: use-after-free Read in seq_printf
* Struck through repros no longer work on HEAD.