syzbot


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

Status: moderation: reported on 2025/10/07 11:49
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+3366add91c4b8d9822cf@syzkaller.appspotmail.com
First crash: 81d, last: 4d15h
Similar bugs (6)
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 225d 331d 0/29 auto-obsoleted due to no activity on 2025/08/09 17:54
upstream KMSAN: uninit-value in seq_printf (2) fs 7 C 99 1286d 1553d 0/29 auto-closed as invalid on 2022/09/30 02:43
android-5-10 KASAN: use-after-free Read in seq_printf 19 15 90d 197d 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 818d 924d 23/29 fixed on 2023/09/28 17:51
android-6-1 KASAN: slab-out-of-bounds Read in seq_printf 19 2 94d 99d 0/2 auto-obsoleted due to no activity on 2025/12/19 00:57
android-5-15 KASAN: use-after-free Read in seq_printf 19 1 95d 95d 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:654 [inline]
BUG: KASAN: slab-use-after-free in string+0x4a4/0x4f0 lib/vsprintf.c:736
Read of size 1 at addr ffff888057839220 by task syz.3.5914/29539

CPU: 0 UID: 0 PID: 29539 Comm: syz.3.5914 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
 print_address_description mm/kasan/report.c:378 [inline]
 print_report+0xcd/0x630 mm/kasan/report.c:482
 kasan_report+0xe0/0x110 mm/kasan/report.c:595
 string_nocheck lib/vsprintf.c:654 [inline]
 string+0x4a4/0x4f0 lib/vsprintf.c:736
 vsnprintf+0x4d5/0x11e0 lib/vsprintf.c:2947
 seq_vprintf fs/seq_file.c:391 [inline]
 seq_printf+0x1a4/0x250 fs/seq_file.c:406
 input_devices_seq_show+0x20d/0x1130 drivers/input/input.c:1099
 seq_read_iter+0xb25/0x12d0 fs/seq_file.c:272
 seq_read+0x3a3/0x570 fs/seq_file.c:162
 pde_read fs/proc/inode.c:308 [inline]
 proc_reg_read+0x240/0x330 fs/proc/inode.c:320
 vfs_read+0x1e4/0xcf0 fs/read_write.c:570
 ksys_read+0x12a/0x250 fs/read_write.c:715
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fac3d18f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fac3dfff038 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 00007fac3d3e5fa0 RCX: 00007fac3d18f749
RDX: 000000000000fcdd RSI: 0000200000002300 RDI: 0000000000000003
RBP: 00007fac3d213f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fac3d3e6038 R14: 00007fac3d3e5fa0 R15: 00007ffcf08b4b78
 </TASK>

Allocated by task 19448:
 kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
 kasan_save_track+0x14/0x30 mm/kasan/common.c:77
 poison_kmalloc_redzone mm/kasan/common.c:397 [inline]
 __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:414
 kasan_kmalloc include/linux/kasan.h:262 [inline]
 __do_kmalloc_node mm/slub.c:5657 [inline]
 __kmalloc_noprof+0x33d/0x910 mm/slub.c:5669
 kmalloc_noprof include/linux/slab.h:961 [inline]
 kzalloc_noprof include/linux/slab.h:1094 [inline]
 ieee802_11_parse_elems_full+0x1db/0x3780 net/mac80211/parse.c:1031
 ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2469 [inline]
 ieee80211_inform_bss+0x15a/0x1150 net/mac80211/scan.c:79
 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
 cfg80211_inform_single_bss_data+0x8e9/0x1d30 net/wireless/scan.c:2373
 cfg80211_inform_bss_data+0x22b/0x3be0 net/wireless/scan.c:3228
 cfg80211_inform_bss_frame_data+0x26f/0x720 net/wireless/scan.c:3319
 ieee80211_bss_info_update+0x310/0xab0 net/mac80211/scan.c:230
 ieee80211_rx_bss_info net/mac80211/ibss.c:1094 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1575 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x1927/0x2fc0 net/mac80211/ibss.c:1602
 ieee80211_iface_process_skb net/mac80211/iface.c:1736 [inline]
 ieee80211_iface_work+0xe28/0x1350 net/mac80211/iface.c:1790
 cfg80211_wiphy_work+0x3fb/0x560 net/wireless/core.c:438
 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
 process_scheduled_works kernel/workqueue.c:3340 [inline]
 worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
 kthread+0x3c5/0x780 kernel/kthread.c:463
 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

Freed by task 19448:
 kasan_save_stack+0x33/0x60 mm/kasan/common.c:56
 kasan_save_track+0x14/0x30 mm/kasan/common.c:77
 kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:584
 poison_slab_object mm/kasan/common.c:252 [inline]
 __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:284
 kasan_slab_free include/linux/kasan.h:234 [inline]
 slab_free_hook mm/slub.c:2540 [inline]
 slab_free mm/slub.c:6668 [inline]
 kfree+0x2f8/0x6e0 mm/slub.c:6876
 ieee80211_inform_bss+0x7c3/0x1150 net/mac80211/scan.c:164
 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline]
 cfg80211_inform_single_bss_data+0x8e9/0x1d30 net/wireless/scan.c:2373
 cfg80211_inform_bss_data+0x22b/0x3be0 net/wireless/scan.c:3228
 cfg80211_inform_bss_frame_data+0x26f/0x720 net/wireless/scan.c:3319
 ieee80211_bss_info_update+0x310/0xab0 net/mac80211/scan.c:230
 ieee80211_rx_bss_info net/mac80211/ibss.c:1094 [inline]
 ieee80211_rx_mgmt_probe_beacon net/mac80211/ibss.c:1575 [inline]
 ieee80211_ibss_rx_queued_mgmt+0x1927/0x2fc0 net/mac80211/ibss.c:1602
 ieee80211_iface_process_skb net/mac80211/iface.c:1736 [inline]
 ieee80211_iface_work+0xe28/0x1350 net/mac80211/iface.c:1790
 cfg80211_wiphy_work+0x3fb/0x560 net/wireless/core.c:438
 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
 process_scheduled_works kernel/workqueue.c:3340 [inline]
 worker_thread+0x6c8/0xf10 kernel/workqueue.c:3421
 kthread+0x3c5/0x780 kernel/kthread.c:463
 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

The buggy address belongs to the object at ffff888057839000
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 544 bytes inside of
 freed 1024-byte region [ffff888057839000, ffff888057839400)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88805783c800 pfn:0x57838
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000240 ffff88813ff26dc0 ffffea0001e89610 ffffea0000acec10
raw: ffff88805783c800 0000000000100005 00000000f5000000 0000000000000000
head: 00fff00000000240 ffff88813ff26dc0 ffffea0001e89610 ffffea0000acec10
head: ffff88805783c800 0000000000100005 00000000f5000000 0000000000000000
head: 00fff00000000003 ffffea00015e0e01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5864, tgid 5864 (kworker/1:4), ts 58920831548, free_ts 14533484638
 set_page_owner include/linux/page_owner.h:32 [inline]
 post_alloc_hook+0x1af/0x220 mm/page_alloc.c:1846
 prep_new_page mm/page_alloc.c:1854 [inline]
 get_page_from_freelist+0xd0b/0x31a0 mm/page_alloc.c:3915
 __alloc_frozen_pages_noprof+0x25f/0x2430 mm/page_alloc.c:5210
 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2486
 alloc_slab_page mm/slub.c:3075 [inline]
 allocate_slab mm/slub.c:3248 [inline]
 new_slab+0x2c3/0x430 mm/slub.c:3302
 ___slab_alloc+0xe18/0x1c90 mm/slub.c:4656
 __slab_alloc.constprop.0+0x63/0x110 mm/slub.c:4779
 __slab_alloc_node mm/slub.c:4855 [inline]
 slab_alloc_node mm/slub.c:5251 [inline]
 __do_kmalloc_node mm/slub.c:5656 [inline]
 __kmalloc_noprof+0x4fc/0x910 mm/slub.c:5669
 kmalloc_noprof include/linux/slab.h:961 [inline]
 kzalloc_noprof include/linux/slab.h:1094 [inline]
 neigh_alloc net/core/neighbour.c:522 [inline]
 ___neigh_create+0x14ec/0x2920 net/core/neighbour.c:656
 ip6_finish_output2+0x11aa/0x1cf0 net/ipv6/ip6_output.c:128
 __ip6_finish_output+0x3cd/0x1010 net/ipv6/ip6_output.c:209
 ip6_finish_output net/ipv6/ip6_output.c:220 [inline]
 NF_HOOK_COND include/linux/netfilter.h:307 [inline]
 ip6_output+0x253/0x710 net/ipv6/ip6_output.c:247
 dst_output+0xa8/0x4b0 include/net/dst.h:464
 NF_HOOK include/linux/netfilter.h:318 [inline]
 NF_HOOK include/linux/netfilter.h:312 [inline]
 mld_sendpack+0xa30/0xed0 net/ipv6/mcast.c:1855
 mld_send_cr net/ipv6/mcast.c:2154 [inline]
 mld_ifc_work+0x740/0xbf0 net/ipv6/mcast.c:2693
 process_one_work+0x9ba/0x1b20 kernel/workqueue.c:3257
page last free pid 1 tgid 1 stack trace:
 reset_page_owner include/linux/page_owner.h:25 [inline]
 free_pages_prepare mm/page_alloc.c:1395 [inline]
 __free_frozen_pages+0x7df/0x1170 mm/page_alloc.c:2943
 __free_pages mm/page_alloc.c:5329 [inline]
 free_contig_range+0x183/0x4a0 mm/page_alloc.c:7197
 destroy_args+0xb95/0x14e0 mm/debug_vm_pgtable.c:983
 debug_vm_pgtable+0x2220/0x38d0 mm/debug_vm_pgtable.c:1372
 do_one_initcall+0x123/0x680 init/main.c:1378
 do_initcall_level init/main.c:1440 [inline]
 do_initcalls init/main.c:1456 [inline]
 do_basic_setup init/main.c:1475 [inline]
 kernel_init_freeable+0x5c8/0x920 init/main.c:1688
 kernel_init+0x1c/0x2b0 init/main.c:1578
 ret_from_fork+0x983/0xb10 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246

Memory state around the buggy address:
 ffff888057839100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888057839180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888057839200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                               ^
 ffff888057839280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888057839300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/12/18 22:23 upstream ea1013c15392 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root KASAN: slab-use-after-free Read in seq_printf
2025/10/26 18:17 upstream 72761a7e3122 c0460fcd .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in seq_printf
2025/10/03 11:42 upstream e406d57be7bd 49379ee0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce KASAN: slab-use-after-free Read in seq_printf
* Struck through repros no longer work on HEAD.