================================================================== BUG: KASAN: slab-use-after-free in string_nocheck lib/vsprintf.c:639 [inline] BUG: KASAN: slab-use-after-free in string+0x227/0x2b0 lib/vsprintf.c:721 Read of size 1 at addr ffff888030f91220 by task syz.1.6675/29094 CPU: 1 UID: 0 PID: 29094 Comm: syz.1.6675 Not tainted 6.15.0-rc2-syzkaller-00400-g3088d26962e8 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0x16e/0x5b0 mm/kasan/report.c:521 kasan_report+0x143/0x180 mm/kasan/report.c:634 string_nocheck lib/vsprintf.c:639 [inline] string+0x227/0x2b0 lib/vsprintf.c:721 vsnprintf+0x8b6/0x1230 lib/vsprintf.c:2852 seq_vprintf fs/seq_file.c:391 [inline] seq_printf+0x174/0x270 fs/seq_file.c:406 input_devices_seq_show+0x153/0x650 drivers/input/input.c:1133 seq_read_iter+0x461/0xda0 fs/seq_file.c:230 seq_read+0x3ab/0x4f0 fs/seq_file.c:162 pde_read fs/proc/inode.c:308 [inline] proc_reg_read+0x201/0x2f0 fs/proc/inode.c:320 do_loop_readv_writev fs/read_write.c:845 [inline] vfs_readv+0x6be/0xa80 fs/read_write.c:1018 do_preadv fs/read_write.c:1130 [inline] __do_compat_sys_preadv fs/read_write.c:1233 [inline] __se_compat_sys_preadv fs/read_write.c:1227 [inline] __ia32_compat_sys_preadv+0x1d1/0x2d0 fs/read_write.c:1227 do_syscall_32_irqs_on arch/x86/entry/syscall_32.c:83 [inline] __do_fast_syscall_32+0xb4/0x110 arch/x86/entry/syscall_32.c:306 do_fast_syscall_32+0x34/0x80 arch/x86/entry/syscall_32.c:331 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf70fd539 Code: 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f50ed55c EFLAGS: 00000206 ORIG_RAX: 000000000000014d RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 0000000080000740 RDX: 0000000000000001 RSI: 0000000000000401 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 23: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x9d/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4341 [inline] __kmalloc_noprof+0x28e/0x4d0 mm/slub.c:4353 kmalloc_noprof include/linux/slab.h:909 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] ieee802_11_parse_elems_full+0x16d/0x2f10 net/mac80211/parse.c:1013 ieee802_11_parse_elems_crc net/mac80211/ieee80211_i.h:2402 [inline] ieee802_11_parse_elems net/mac80211/ieee80211_i.h:2409 [inline] ieee80211_inform_bss+0x166/0x10e0 net/mac80211/scan.c:79 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline] cfg80211_inform_single_bss_data+0xf5f/0x1ed0 net/wireless/scan.c:2367 cfg80211_inform_bss_data+0x3c5/0x5860 net/wireless/scan.c:3222 cfg80211_inform_bss_frame_data+0x3c5/0x720 net/wireless/scan.c:3317 ieee80211_bss_info_update+0x8ac/0xbc0 net/mac80211/scan.c:226 ieee80211_scan_rx+0x526/0x9c0 net/mac80211/scan.c:340 __ieee80211_rx_handle_packet net/mac80211/rx.c:5179 [inline] ieee80211_rx_list+0x28cd/0x3490 net/mac80211/rx.c:5416 ieee80211_rx_napi+0x187/0x3c0 net/mac80211/rx.c:5439 ieee80211_rx include/net/mac80211.h:5179 [inline] ieee80211_handle_queued_frames+0xe7/0x1e0 net/mac80211/main.c:441 tasklet_action_common+0x428/0x620 kernel/softirq.c:829 handle_softirqs+0x2d6/0x9b0 kernel/softirq.c:579 run_ksoftirqd+0xcf/0x130 kernel/softirq.c:968 smpboot_thread_fn+0x576/0xaa0 kernel/smpboot.c:164 kthread+0x7b7/0x940 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Freed by task 23: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x59/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2398 [inline] slab_free mm/slub.c:4656 [inline] kfree+0x198/0x430 mm/slub.c:4855 ieee80211_inform_bss+0xbfe/0x10e0 net/mac80211/scan.c:160 rdev_inform_bss net/wireless/rdev-ops.h:418 [inline] cfg80211_inform_single_bss_data+0xf5f/0x1ed0 net/wireless/scan.c:2367 cfg80211_inform_bss_data+0x3c5/0x5860 net/wireless/scan.c:3222 cfg80211_inform_bss_frame_data+0x3c5/0x720 net/wireless/scan.c:3317 ieee80211_bss_info_update+0x8ac/0xbc0 net/mac80211/scan.c:226 ieee80211_scan_rx+0x526/0x9c0 net/mac80211/scan.c:340 __ieee80211_rx_handle_packet net/mac80211/rx.c:5179 [inline] ieee80211_rx_list+0x28cd/0x3490 net/mac80211/rx.c:5416 ieee80211_rx_napi+0x187/0x3c0 net/mac80211/rx.c:5439 ieee80211_rx include/net/mac80211.h:5179 [inline] ieee80211_handle_queued_frames+0xe7/0x1e0 net/mac80211/main.c:441 tasklet_action_common+0x428/0x620 kernel/softirq.c:829 handle_softirqs+0x2d6/0x9b0 kernel/softirq.c:579 run_ksoftirqd+0xcf/0x130 kernel/softirq.c:968 smpboot_thread_fn+0x576/0xaa0 kernel/smpboot.c:164 kthread+0x7b7/0x940 kernel/kthread.c:464 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:153 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888030f91000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 544 bytes inside of freed 1024-byte region [ffff888030f91000, ffff888030f91400) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x30f90 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b041dc0 0000000000000000 dead000000000001 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b041dc0 0000000000000000 dead000000000001 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000003 ffffea0000c3e401 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 23804159757, free_ts 0 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f4/0x240 mm/page_alloc.c:1718 prep_new_page mm/page_alloc.c:1726 [inline] get_page_from_freelist+0x360a/0x37a0 mm/page_alloc.c:3700 __alloc_frozen_pages_noprof+0x211/0x5b0 mm/page_alloc.c:4982 alloc_pages_mpol+0x339/0x690 mm/mempolicy.c:2301 alloc_slab_page mm/slub.c:2468 [inline] allocate_slab+0x8f/0x3b0 mm/slub.c:2632 new_slab mm/slub.c:2686 [inline] ___slab_alloc+0xc3b/0x1500 mm/slub.c:3872 __slab_alloc+0x58/0xa0 mm/slub.c:3962 __slab_alloc_node mm/slub.c:4037 [inline] slab_alloc_node mm/slub.c:4198 [inline] __kmalloc_cache_noprof+0x26a/0x370 mm/slub.c:4367 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] fqdir_init+0x59/0x170 net/ipv4/inet_fragment.c:191 nf_ct_net_init+0x3b/0x2e0 net/ipv6/netfilter/nf_conntrack_reasm.c:509 ops_init+0x349/0x5b0 net/core/net_namespace.c:138 __register_pernet_operations net/core/net_namespace.c:1274 [inline] register_pernet_operations+0x31f/0x660 net/core/net_namespace.c:1350 register_pernet_subsys+0x28/0x40 net/core/net_namespace.c:1391 nf_ct_frag6_init+0x87/0xc0 net/ipv6/netfilter/nf_conntrack_reasm.c:567 nf_defrag_init+0xf/0xb0 net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:114 do_one_initcall+0x24a/0x940 init/main.c:1257 page_owner free stack trace missing Memory state around the buggy address: ffff888030f91100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888030f91180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888030f91200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888030f91280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888030f91300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== ---------------- Code disassembly (best guess): 0: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 4: 10 07 adc %al,(%rdi) 6: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi a: 10 08 adc %cl,(%rax) c: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 20: 00 51 52 add %dl,0x52(%rcx) 23: 55 push %rbp 24: 89 e5 mov %esp,%ebp 26: 0f 34 sysenter 28: cd 80 int $0x80 * 2a: 5d pop %rbp <-- trapping instruction 2b: 5a pop %rdx 2c: 59 pop %rcx 2d: c3 ret 2e: 90 nop 2f: 90 nop 30: 90 nop 31: 90 nop 32: 90 nop 33: 90 nop 34: 90 nop 35: 90 nop 36: 90 nop 37: 90 nop 38: 90 nop 39: 90 nop 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop