Hay
Date
July 11, 2025, 10:11 a.m.

Environment
e850-96
qemu-x86_64

[   57.910466] ==================================================================
[   57.917501] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   57.923401] Read of size 1 at addr ffff0008016ffe10 by task kunit_try_catch/343
[   57.930693] 
[   57.932176] CPU: 5 UID: 0 PID: 343 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250711 #1 PREEMPT 
[   57.932232] Tainted: [B]=BAD_PAGE, [N]=TEST
[   57.932247] Hardware name: WinLink E850-96 board (DT)
[   57.932268] Call trace:
[   57.932282]  show_stack+0x20/0x38 (C)
[   57.932317]  dump_stack_lvl+0x8c/0xd0
[   57.932353]  print_report+0x118/0x5d0
[   57.932382]  kasan_report+0xdc/0x128
[   57.932411]  __asan_report_load1_noabort+0x20/0x30
[   57.932445]  strlen+0xa8/0xb0
[   57.932475]  kasan_strings+0x418/0xb00
[   57.932507]  kunit_try_run_case+0x170/0x3f0
[   57.932543]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   57.932577]  kthread+0x328/0x630
[   57.932605]  ret_from_fork+0x10/0x20
[   57.932640] 
[   57.998747] Allocated by task 343:
[   58.002134]  kasan_save_stack+0x3c/0x68
[   58.005952]  kasan_save_track+0x20/0x40
[   58.009771]  kasan_save_alloc_info+0x40/0x58
[   58.014025]  __kasan_kmalloc+0xd4/0xd8
[   58.017757]  __kmalloc_cache_noprof+0x16c/0x3c0
[   58.022271]  kasan_strings+0xc8/0xb00
[   58.025917]  kunit_try_run_case+0x170/0x3f0
[   58.030084]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   58.035552]  kthread+0x328/0x630
[   58.038764]  ret_from_fork+0x10/0x20
[   58.042323] 
[   58.043798] Freed by task 343:
[   58.046837]  kasan_save_stack+0x3c/0x68
[   58.050657]  kasan_save_track+0x20/0x40
[   58.054476]  kasan_save_free_info+0x4c/0x78
[   58.058642]  __kasan_slab_free+0x6c/0x98
[   58.062548]  kfree+0x214/0x3c8
[   58.065586]  kasan_strings+0x24c/0xb00
[   58.069319]  kunit_try_run_case+0x170/0x3f0
[   58.073485]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   58.078954]  kthread+0x328/0x630
[   58.082166]  ret_from_fork+0x10/0x20
[   58.085725] 
[   58.087201] The buggy address belongs to the object at ffff0008016ffe00
[   58.087201]  which belongs to the cache kmalloc-32 of size 32
[   58.099527] The buggy address is located 16 bytes inside of
[   58.099527]  freed 32-byte region [ffff0008016ffe00, ffff0008016ffe20)
[   58.111593] 
[   58.113070] The buggy address belongs to the physical page:
[   58.118628] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8816ff
[   58.126612] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   58.133122] page_type: f5(slab)
[   58.136255] raw: 0bfffe0000000000 ffff000800002780 dead000000000100 dead000000000122
[   58.143977] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000
[   58.151696] page dumped because: kasan: bad access detected
[   58.157252] 
[   58.158727] Memory state around the buggy address:
[   58.163506]  ffff0008016ffd00: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc
[   58.170710]  ffff0008016ffd80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   58.177916] >ffff0008016ffe00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   58.185116]                          ^
[   58.188852]  ffff0008016ffe80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   58.196057]  ffff0008016fff00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   58.203258] ==================================================================

[   25.819600] ==================================================================
[   25.819983] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   25.820266] Read of size 1 at addr ffff88810613f2d0 by task kunit_try_catch/309
[   25.820501] 
[   25.821037] CPU: 1 UID: 0 PID: 309 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250711 #1 PREEMPT(voluntary) 
[   25.821096] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.821109] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.821133] Call Trace:
[   25.821154]  <TASK>
[   25.821170]  dump_stack_lvl+0x73/0xb0
[   25.821202]  print_report+0xd1/0x610
[   25.821224]  ? __virt_addr_valid+0x1db/0x2d0
[   25.821249]  ? strlen+0x8f/0xb0
[   25.821281]  ? kasan_complete_mode_report_info+0x64/0x200
[   25.821308]  ? strlen+0x8f/0xb0
[   25.821326]  kasan_report+0x141/0x180
[   25.821348]  ? strlen+0x8f/0xb0
[   25.821371]  __asan_report_load1_noabort+0x18/0x20
[   25.821396]  strlen+0x8f/0xb0
[   25.821415]  kasan_strings+0x57b/0xe80
[   25.821435]  ? trace_hardirqs_on+0x37/0xe0
[   25.821459]  ? __pfx_kasan_strings+0x10/0x10
[   25.821480]  ? finish_task_switch.isra.0+0x153/0x700
[   25.821503]  ? __switch_to+0x47/0xf80
[   25.821529]  ? __schedule+0x10cc/0x2b60
[   25.821554]  ? __pfx_read_tsc+0x10/0x10
[   25.821576]  ? ktime_get_ts64+0x86/0x230
[   25.821602]  kunit_try_run_case+0x1a5/0x480
[   25.821625]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.821645]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.821669]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.821694]  ? __kthread_parkme+0x82/0x180
[   25.821715]  ? preempt_count_sub+0x50/0x80
[   25.821751]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.821782]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.821806]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.821832]  kthread+0x337/0x6f0
[   25.821852]  ? trace_preempt_on+0x20/0xc0
[   25.821875]  ? __pfx_kthread+0x10/0x10
[   25.821896]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.821918]  ? calculate_sigpending+0x7b/0xa0
[   25.821942]  ? __pfx_kthread+0x10/0x10
[   25.821964]  ret_from_fork+0x116/0x1d0
[   25.821984]  ? __pfx_kthread+0x10/0x10
[   25.822005]  ret_from_fork_asm+0x1a/0x30
[   25.822036]  </TASK>
[   25.822046] 
[   25.829077] Allocated by task 309:
[   25.829253]  kasan_save_stack+0x45/0x70
[   25.829506]  kasan_save_track+0x18/0x40
[   25.829693]  kasan_save_alloc_info+0x3b/0x50
[   25.829852]  __kasan_kmalloc+0xb7/0xc0
[   25.829986]  __kmalloc_cache_noprof+0x189/0x420
[   25.830203]  kasan_strings+0xc0/0xe80
[   25.830382]  kunit_try_run_case+0x1a5/0x480
[   25.830578]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.830831]  kthread+0x337/0x6f0
[   25.830947]  ret_from_fork+0x116/0x1d0
[   25.831074]  ret_from_fork_asm+0x1a/0x30
[   25.831261] 
[   25.831351] Freed by task 309:
[   25.831610]  kasan_save_stack+0x45/0x70
[   25.831809]  kasan_save_track+0x18/0x40
[   25.831998]  kasan_save_free_info+0x3f/0x60
[   25.832164]  __kasan_slab_free+0x56/0x70
[   25.832334]  kfree+0x222/0x3f0
[   25.832446]  kasan_strings+0x2aa/0xe80
[   25.832641]  kunit_try_run_case+0x1a5/0x480
[   25.832851]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.833051]  kthread+0x337/0x6f0
[   25.833165]  ret_from_fork+0x116/0x1d0
[   25.833290]  ret_from_fork_asm+0x1a/0x30
[   25.833422] 
[   25.833486] The buggy address belongs to the object at ffff88810613f2c0
[   25.833486]  which belongs to the cache kmalloc-32 of size 32
[   25.835520] The buggy address is located 16 bytes inside of
[   25.835520]  freed 32-byte region [ffff88810613f2c0, ffff88810613f2e0)
[   25.837003] 
[   25.837333] The buggy address belongs to the physical page:
[   25.838153] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10613f
[   25.838899] flags: 0x200000000000000(node=0|zone=2)
[   25.839073] page_type: f5(slab)
[   25.839193] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.839704] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.840601] page dumped because: kasan: bad access detected
[   25.841271] 
[   25.841632] Memory state around the buggy address:
[   25.842233]  ffff88810613f180: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.843103]  ffff88810613f200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.843628] >ffff88810613f280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.843858]                                                  ^
[   25.844037]  ffff88810613f300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.844238]  ffff88810613f380: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.844901] ==================================================================