syzbot


KASAN: slab-out-of-bounds Read in seq_printf (2)

Status: premoderation: reported on 2026/04/04 17:28
Reported-by: syzbot+6eff6dd0201687199d7e@syzkaller.appspotmail.com
First crash: 7d19h, last: 7d19h
Similar bugs (8)
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 200d 307d 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 335d 441d 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 204d 209d 0/2 auto-obsoleted due to no activity on 2025/12/19 00:57
upstream KMSAN: uninit-value in seq_printf (2) fs 7 C 99 1396d 1663d 0/29 auto-closed as invalid on 2022/09/30 02:43
upstream KMSAN: kernel-infoleak in __skb_datagram_iter net 9 68 928d 1033d 23/29 fixed on 2023/09/28 17:51
upstream KASAN: slab-use-after-free Read in seq_printf fs 19 6 18d 187d 0/29 moderation: reported on 2025/10/07 11:49
android-5-10 KASAN: use-after-free Read in seq_printf (2) 19 1 87d 87d 0/2 premoderation: reported on 2026/01/14 15:56
android-5-15 KASAN: use-after-free Read in seq_printf 19 1 205d 205d 0/2 auto-obsoleted due to no activity on 2025/12/17 23:30

Sample crash report:
device macsec2 entered promiscuous mode
==================================================================
BUG: KASAN: slab-out-of-bounds in string_nocheck lib/vsprintf.c:643 [inline]
BUG: KASAN: slab-out-of-bounds in string+0x21f/0x2b0 lib/vsprintf.c:725
Read of size 1 at addr ffff88813c6b2178 by task syz.1.1170/4717

CPU: 0 PID: 4717 Comm: syz.1.1170 Tainted: G        W          syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/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+0x21f/0x2b0 lib/vsprintf.c:725
 vsnprintf+0xec4/0x1990 lib/vsprintf.c:2805
 seq_vprintf fs/seq_file.c:391 [inline]
 seq_printf+0x185/0x280 fs/seq_file.c:406
 input_devices_seq_show+0x14b/0x650 drivers/input/input.c:1202
 seq_read_iter+0x9c8/0xdd0 fs/seq_file.c:272
 seq_read+0x171/0x210 fs/seq_file.c:162
 pde_read fs/proc/inode.c:316 [inline]
 proc_reg_read+0x1e4/0x2d0 fs/proc/inode.c:328
 vfs_read+0x27a/0x910 fs/read_write.c:468
 ksys_read+0x149/0x250 fs/read_write.c:613
 __do_sys_read fs/read_write.c:623 [inline]
 __se_sys_read fs/read_write.c:621 [inline]
 __x64_sys_read+0x7b/0x90 fs/read_write.c:621
 x64_sys_call+0x2f/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:1
 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:0x7f4b26f9c819
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:00007f4b27ece028 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007f4b27215fa0 RCX: 00007f4b26f9c819
RDX: 0000000000002020 RSI: 0000200000000040 RDI: 0000000000000004
RBP: 00007f4b27032c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4b27216038 R14: 00007f4b27215fa0 R15: 00007ffcd1c91348
 </TASK>

Allocated by task 3639:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_alloc_info+0x25/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]
 kmalloc_trace+0x40/0xb0 mm/slab_common.c:1033
 kmalloc include/linux/slab.h:563 [inline]
 audit_log_d_path+0xc6/0x240 kernel/audit.c:2151
 dump_common_audit_data security/lsm_audit.c:236 [inline]
 common_lsm_audit+0x330/0x1730 security/lsm_audit.c:457
 slow_avc_audit+0x1c4/0x240 security/selinux/avc.c:804
 avc_audit security/selinux/include/avc.h:136 [inline]
 avc_has_perm+0x1fb/0x250 security/selinux/avc.c:1201
 inode_has_perm security/selinux/hooks.c:1638 [inline]
 file_has_perm+0x52d/0x700 security/selinux/hooks.c:1730
 selinux_file_ioctl+0x1e1/0x4d0 security/selinux/hooks.c:-1
 security_file_ioctl+0x85/0xc0 security/security.c:1568
 __do_sys_ioctl fs/ioctl.c:864 [inline]
 __se_sys_ioctl+0x53/0x1b0 fs/ioctl.c:856
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
 x64_sys_call+0x58b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 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 3639:
 kasan_save_stack mm/kasan/common.c:46 [inline]
 kasan_set_track+0x4b/0x70 mm/kasan/common.c:53
 kasan_save_free_info+0x31/0x50 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
 audit_log_d_path+0x1f4/0x240 kernel/audit.c:2162
 dump_common_audit_data security/lsm_audit.c:236 [inline]
 common_lsm_audit+0x330/0x1730 security/lsm_audit.c:457
 slow_avc_audit+0x1c4/0x240 security/selinux/avc.c:804
 avc_audit security/selinux/include/avc.h:136 [inline]
 avc_has_perm+0x1fb/0x250 security/selinux/avc.c:1201
 inode_has_perm security/selinux/hooks.c:1638 [inline]
 file_has_perm+0x52d/0x700 security/selinux/hooks.c:1730
 selinux_file_ioctl+0x1e1/0x4d0 security/selinux/hooks.c:-1
 security_file_ioctl+0x85/0xc0 security/security.c:1568
 __do_sys_ioctl fs/ioctl.c:864 [inline]
 __se_sys_ioctl+0x53/0x1b0 fs/ioctl.c:856
 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
 x64_sys_call+0x58b/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:17
 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 ffff88813c6b0000
 which belongs to the cache kmalloc-8k of size 8192
The buggy address is located 376 bytes to the right of
 8192-byte region [ffff88813c6b0000, ffff88813c6b2000)

The buggy address belongs to the physical page:
page:ffffea0004f1ac00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x13c6b0
head:ffffea0004f1ac00 order:3 compound_mapcount:0 compound_pincount:0
flags: 0x4000000000010200(slab|head|zone=1)
raw: 4000000000010200 0000000000000000 dead000000000122 ffff888100043500
raw: 0000000000000000 0000000000020002 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x152a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_HARDWALL), pid 3639, tgid 3639 (syz-executor), ts 182189717919, free_ts 182188885654
 set_page_owner include/linux/page_owner.h:33 [inline]
 post_alloc_hook+0x1f5/0x210 mm/page_alloc.c:2670
 prep_new_page+0x1c/0x110 mm/page_alloc.c:2677
 get_page_from_freelist+0x2d12/0x2d80 mm/page_alloc.c:4583
 __alloc_pages+0x1fa/0x610 mm/page_alloc.c:5924
 alloc_slab_page+0x6e/0xf0 include/linux/gfp.h:-1
 allocate_slab mm/slub.c:1967 [inline]
 new_slab+0x98/0x3d0 mm/slub.c:2020
 ___slab_alloc+0x6bd/0xb20 mm/slub.c:3177
 __slab_alloc+0x5e/0xa0 mm/slub.c:3263
 slab_alloc_node mm/slub.c:3348 [inline]
 __kmem_cache_alloc_node+0x203/0x2c0 mm/slub.c:3423
 kmalloc_trace+0x29/0xb0 mm/slab_common.c:1028
 kmalloc include/linux/slab.h:563 [inline]
 audit_log_d_path+0xc6/0x240 kernel/audit.c:2151
 dump_common_audit_data security/lsm_audit.c:236 [inline]
 common_lsm_audit+0x330/0x1730 security/lsm_audit.c:457
 slow_avc_audit+0x1c4/0x240 security/selinux/avc.c:804
 avc_audit security/selinux/include/avc.h:136 [inline]
 avc_has_perm+0x1fb/0x250 security/selinux/avc.c:1201
 inode_has_perm security/selinux/hooks.c:1638 [inline]
 file_has_perm+0x52d/0x700 security/selinux/hooks.c:1730
 selinux_file_ioctl+0x1e1/0x4d0 security/selinux/hooks.c:-1
page last free stack trace:
 reset_page_owner include/linux/page_owner.h:26 [inline]
 free_pages_prepare mm/page_alloc.c:1578 [inline]
 free_pcp_prepare mm/page_alloc.c:1652 [inline]
 free_unref_page_prepare+0x742/0x750 mm/page_alloc.c:3618
 free_unref_page+0x95/0x540 mm/page_alloc.c:3716
 free_the_page mm/page_alloc.c:863 [inline]
 __free_pages+0x67/0x100 mm/page_alloc.c:6014
 __free_slab+0xca/0x1a0 mm/slub.c:2044
 free_slab mm/slub.c:2059 [inline]
 discard_slab mm/slub.c:2065 [inline]
 __unfreeze_partials+0x160/0x190 mm/slub.c:2614
 put_cpu_partial+0xa9/0x100 mm/slub.c:2690
 __slab_free+0x1c4/0x280 mm/slub.c:3589
 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]
 slab_alloc mm/slub.c:3392 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3399 [inline]
 kmem_cache_alloc+0x16e/0x330 mm/slub.c:3408
 getname_flags+0xb9/0x500 fs/namei.c:139
 getname fs/namei.c:218 [inline]
 __do_sys_unlink fs/namei.c:4445 [inline]
 __se_sys_unlink fs/namei.c:4443 [inline]
 __x64_sys_unlink+0x3c/0x50 fs/namei.c:4443
 x64_sys_call+0x958/0x9a0 arch/x86/include/generated/asm/syscalls_64.h:88

Memory state around the buggy address:
 ffff88813c6b2000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88813c6b2080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88813c6b2100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                                ^
 ffff88813c6b2180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88813c6b2200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/04/04 17:27 android14-6.1 9ab204675a62 4440e7c2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-android-6-1 KASAN: slab-out-of-bounds Read in seq_printf
* Struck through repros no longer work on HEAD.