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

Status: premoderation: reported on 2026/08/26 02:30
Reported-by: syzbot+04f6dc49bd64c43f7b30@syzkaller.appspotmail.com
First crash: 2d01h, last: 2d01h
Similar bugs (10)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 KASAN: use-after-free Read in seq_printf 19 15 337d 445d 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 473d 578d 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 342d 346d 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 225d 225d 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 343d 343d 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 1534d 1801d 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 145d 145d 0/2 auto-obsoleted due to no activity on 2026/07/03 17:29
upstream KMSAN: kernel-infoleak in __skb_datagram_iter net 9 68 1066d 1171d 23/29 fixed on 2023/09/28 17:51
upstream KASAN: slab-use-after-free Read in seq_printf prio:high fs 19 28 2d22h 324d 0/29 moderation: reported on 2025/10/07 11:49
linux-6.6 KASAN: slab-use-after-free Read in seq_printf 19 1 2d14h 2d14h 0/2 upstream: reported on 2026/08/25 13:48

Sample crash report:
==================================================================
BUG: KASAN: use-after-free in string_nocheck lib/vsprintf.c:642 [inline]
BUG: KASAN: use-after-free in string+0x20f/0x2a0 lib/vsprintf.c:724
Read of size 1 at addr ffff888101be4438 by task syz.5.2237/5932

CPU: 0 PID: 5932 Comm: syz.5.2237 Tainted: G        W         syzkaller #0
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:88
 dump_stack_lvl+0x110/0x170 lib/dump_stack.c:106
 print_address_description+0x7f/0x2c0 mm/kasan/report.c:248
 __kasan_report mm/kasan/report.c:427 [inline]
 kasan_report+0x10f/0x150 mm/kasan/report.c:444
 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report_generic.c:306
 string_nocheck lib/vsprintf.c:642 [inline]
 string+0x20f/0x2a0 lib/vsprintf.c:724
 vsnprintf+0xec5/0x1990 lib/vsprintf.c:2811
 seq_vprintf fs/seq_file.c:407 [inline]
 seq_printf+0x185/0x280 fs/seq_file.c:422
 show_interrupts+0x91d/0xa90 kernel/irq/proc.c:527
 seq_read_iter+0x908/0xce0 fs/seq_file.c:272
 proc_reg_read_iter+0x1be/0x290 fs/proc/inode.c:300
 call_read_iter include/linux/fs.h:2206 [inline]
 generic_file_splice_read+0x3ea/0x5f0 fs/splice.c:311
 do_splice_to fs/splice.c:796 [inline]
 splice_direct_to_actor+0x40f/0xb40 fs/splice.c:870
 do_splice_direct+0x1c2/0x2d0 fs/splice.c:979
 do_sendfile+0x515/0xe20 fs/read_write.c:1249
 __do_sys_sendfile64 fs/read_write.c:1311 [inline]
 __se_sys_sendfile64 fs/read_write.c:1303 [inline]
 __x64_sys_sendfile64+0x146/0x1f0 fs/read_write.c:1303
 x64_sys_call+0x88d/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7fa6de9d40d9
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:00007fa6dd42d028 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007fa6dec5bfa0 RCX: 00007fa6de9d40d9
RDX: 0000200000000080 RSI: 0000000000000003 RDI: 0000000000000004
RBP: 00007fa6dea6b024 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000000007ff R11: 0000000000000246 R12: 0000000000000000
R13: 00007fa6dec5c038 R14: 00007fa6dec5bfa0 R15: 00007ffdebfd03f8
 </TASK>

Allocated by task 5921:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:433 [inline]
 ____kasan_kmalloc mm/kasan/common.c:512 [inline]
 __kasan_kmalloc+0xd4/0x100 mm/kasan/common.c:521
 kasan_kmalloc include/linux/kasan.h:227 [inline]
 __kmalloc+0x13d/0x2c0 mm/slub.c:4436
 __kmalloc_node include/linux/slab.h:487 [inline]
 kmalloc_node include/linux/slab.h:642 [inline]
 __vmalloc_area_node mm/vmalloc.c:2967 [inline]
 __vmalloc_node_range+0x384/0xad0 mm/vmalloc.c:3147
 __vmalloc_node mm/vmalloc.c:3212 [inline]
 __vmalloc+0x79/0x90 mm/vmalloc.c:3226
 __vmalloc_array mm/util.c:720 [inline]
 __vcalloc+0x36/0x50 mm/util.c:743
 kvm_alloc_memslot_metadata arch/x86/kvm/x86.c:11908 [inline]
 kvm_arch_prepare_memory_region+0x5a0/0xb90 arch/x86/kvm/x86.c:11968
 kvm_set_memslot+0x552/0x1780 virt/kvm/kvm_main.c:1683
 __kvm_set_memory_region+0xbb7/0xdf0 virt/kvm/kvm_main.c:1843
 kvm_set_memory_region virt/kvm/kvm_main.c:1864 [inline]
 kvm_vm_ioctl_set_memory_region+0x74/0xa0 virt/kvm/kvm_main.c:1876
 kvm_vm_ioctl+0x8d4/0xb00 virt/kvm/kvm_main.c:4493
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl+0x121/0x1a0 fs/ioctl.c:860
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:860
 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

Freed by task 5920:
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track+0x4a/0x70 mm/kasan/common.c:45
 kasan_set_free_info+0x23/0x40 mm/kasan/generic.c:370
 ____kasan_slab_free+0x125/0x160 mm/kasan/common.c:365
 __kasan_slab_free+0x11/0x20 mm/kasan/common.c:373
 kasan_slab_free include/linux/kasan.h:193 [inline]
 slab_free_hook mm/slub.c:1728 [inline]
 slab_free_freelist_hook+0xc2/0x190 mm/slub.c:1754
 slab_free mm/slub.c:3526 [inline]
 kfree+0xc4/0x270 mm/slub.c:4588
 kvfree+0x35/0x40 mm/util.c:661
 __vunmap+0x8e6/0x980 mm/vmalloc.c:2666
 __vfree mm/vmalloc.c:2709 [inline]
 vfree+0x8b/0xc0 mm/vmalloc.c:2740
 kvfree+0x26/0x40 mm/util.c:659
 kvm_arch_free_memslot+0x123/0x150 arch/x86/kvm/x86.c:11807
 kvm_free_memslot virt/kvm/kvm_main.c:934 [inline]
 kvm_free_memslots virt/kvm/kvm_main.c:948 [inline]
 kvm_destroy_vm virt/kvm/kvm_main.c:1254 [inline]
 kvm_put_kvm+0xc58/0x1190 virt/kvm/kvm_main.c:1283
 kvm_vm_release+0x46/0x50 virt/kvm/kvm_main.c:1306
 __fput+0x22b/0x900 fs/file_table.c:311
 ____fput+0x15/0x20 fs/file_table.c:339
 task_work_run+0x127/0x190 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0xd0/0xe0 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0x87/0xd0 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x1a/0x30 kernel/entry/common.c:307
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0

The buggy address belongs to the object at ffff888101be4438
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 8-byte region [ffff888101be4438, ffff888101be4440)
The buggy address belongs to the page:
page:ffffea000406f900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101be4
flags: 0x4000000000000200(slab|zone=1)
raw: 4000000000000200 ffffea00049c8880 0000000200000002 ffff888100042300
raw: 0000000000000000 0000000000660066 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, ts 2077893656, free_ts 0
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x192/0x1b0 mm/page_alloc.c:2607
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2613
 get_page_from_freelist+0x2c3a/0x2cd0 mm/page_alloc.c:4487
 __alloc_pages+0x1a2/0x460 mm/page_alloc.c:5824
 alloc_slab_page mm/slub.c:-1 [inline]
 allocate_slab mm/slub.c:1937 [inline]
 new_slab+0xa0/0x4d0 mm/slub.c:2000
 ___slab_alloc+0x3ac/0x840 mm/slub.c:3033
 __slab_alloc+0x49/0x90 mm/slub.c:3120
 slab_alloc_node mm/slub.c:3211 [inline]
 slab_alloc mm/slub.c:3255 [inline]
 __kmalloc_track_caller+0x169/0x2c0 mm/slub.c:4954
 kstrdup mm/util.c:64 [inline]
 kstrdup_const+0x55/0x90 mm/util.c:87
 __kernfs_new_node+0xa6/0x670 fs/kernfs/dir.c:589
 kernfs_new_node+0x150/0x260 fs/kernfs/dir.c:669
 kernfs_create_link+0xa4/0x200 fs/kernfs/symlink.c:39
 sysfs_do_create_link_sd+0x8a/0x110 fs/sysfs/symlink.c:44
 sysfs_do_create_link fs/sysfs/symlink.c:80 [inline]
 sysfs_create_link+0x68/0x80 fs/sysfs/symlink.c:92
 device_add_class_symlinks drivers/base/core.c:3164 [inline]
 device_add+0x734/0xe90 drivers/base/core.c:3370
 wakeup_source_device_create drivers/base/power/wakeup_stats.c:161 [inline]
 wakeup_source_sysfs_add+0x1f7/0x2e0 drivers/base/power/wakeup_stats.c:181
page_owner free stack trace missing

Memory state around the buggy address:
 ffff888101be4300: fc fc fc fc 05 fc fc fc fc 00 fc fc fc fc 05 fc
 ffff888101be4380: fc fc fc 00 fc fc fc fc 05 fc fc fc fc fa fc fc
>ffff888101be4400: fc fc 05 fc fc fc fc fa fc fc fc fc 05 fc fc fc
                                        ^
 ffff888101be4480: fc 05 fc fc fc fc 04 fc fc fc fc 00 fc fc fc fc
 ffff888101be4500: 00 fc fc fc fc 00 fc fc fc fc 05 fc fc fc fc 05
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/08/26 02:29 android13-5.15-lts 771777348d20 6a91adb4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in seq_printf
2026/08/26 02:29 android13-5.15-lts 771777348d20 6a91adb4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-5-15 KASAN: use-after-free Read in seq_printf
* Struck through repros no longer work on HEAD.