Hay
Date
July 17, 2025, 11:11 p.m.

Environment
qemu-x86_64

[   14.286690] ==================================================================
[   14.287203] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   14.287469] Read of size 1 at addr ffff8881026c3d90 by task kunit_try_catch/276
[   14.287872] 
[   14.287973] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.288017] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.288028] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.288062] Call Trace:
[   14.288077]  <TASK>
[   14.288092]  dump_stack_lvl+0x73/0xb0
[   14.288118]  print_report+0xd1/0x610
[   14.288139]  ? __virt_addr_valid+0x1db/0x2d0
[   14.288161]  ? strlen+0x8f/0xb0
[   14.288177]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.288200]  ? strlen+0x8f/0xb0
[   14.288216]  kasan_report+0x141/0x180
[   14.288238]  ? strlen+0x8f/0xb0
[   14.288260]  __asan_report_load1_noabort+0x18/0x20
[   14.288284]  strlen+0x8f/0xb0
[   14.288301]  kasan_strings+0x57b/0xe80
[   14.288320]  ? trace_hardirqs_on+0x37/0xe0
[   14.288344]  ? __pfx_kasan_strings+0x10/0x10
[   14.288363]  ? finish_task_switch.isra.0+0x153/0x700
[   14.288385]  ? __switch_to+0x47/0xf50
[   14.288411]  ? __schedule+0x10cc/0x2b60
[   14.288433]  ? __pfx_read_tsc+0x10/0x10
[   14.288452]  ? ktime_get_ts64+0x86/0x230
[   14.288476]  kunit_try_run_case+0x1a5/0x480
[   14.288500]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.288521]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.288545]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.288568]  ? __kthread_parkme+0x82/0x180
[   14.288588]  ? preempt_count_sub+0x50/0x80
[   14.288625]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.288648]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.288672]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.288696]  kthread+0x337/0x6f0
[   14.288713]  ? trace_preempt_on+0x20/0xc0
[   14.288735]  ? __pfx_kthread+0x10/0x10
[   14.288754]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.288775]  ? calculate_sigpending+0x7b/0xa0
[   14.288800]  ? __pfx_kthread+0x10/0x10
[   14.288820]  ret_from_fork+0x116/0x1d0
[   14.288838]  ? __pfx_kthread+0x10/0x10
[   14.288857]  ret_from_fork_asm+0x1a/0x30
[   14.288889]  </TASK>
[   14.288899] 
[   14.297369] Allocated by task 276:
[   14.297509]  kasan_save_stack+0x45/0x70
[   14.297696]  kasan_save_track+0x18/0x40
[   14.297892]  kasan_save_alloc_info+0x3b/0x50
[   14.298120]  __kasan_kmalloc+0xb7/0xc0
[   14.298312]  __kmalloc_cache_noprof+0x189/0x420
[   14.298531]  kasan_strings+0xc0/0xe80
[   14.298893]  kunit_try_run_case+0x1a5/0x480
[   14.299117]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.299328]  kthread+0x337/0x6f0
[   14.299450]  ret_from_fork+0x116/0x1d0
[   14.299688]  ret_from_fork_asm+0x1a/0x30
[   14.300070] 
[   14.300177] Freed by task 276:
[   14.300310]  kasan_save_stack+0x45/0x70
[   14.300500]  kasan_save_track+0x18/0x40
[   14.300704]  kasan_save_free_info+0x3f/0x60
[   14.300981]  __kasan_slab_free+0x56/0x70
[   14.301168]  kfree+0x222/0x3f0
[   14.301336]  kasan_strings+0x2aa/0xe80
[   14.301511]  kunit_try_run_case+0x1a5/0x480
[   14.301706]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.301982]  kthread+0x337/0x6f0
[   14.302154]  ret_from_fork+0x116/0x1d0
[   14.302321]  ret_from_fork_asm+0x1a/0x30
[   14.302519] 
[   14.302593] The buggy address belongs to the object at ffff8881026c3d80
[   14.302593]  which belongs to the cache kmalloc-32 of size 32
[   14.303225] The buggy address is located 16 bytes inside of
[   14.303225]  freed 32-byte region [ffff8881026c3d80, ffff8881026c3da0)
[   14.303698] 
[   14.303791] The buggy address belongs to the physical page:
[   14.304031] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026c3
[   14.304342] flags: 0x200000000000000(node=0|zone=2)
[   14.304580] page_type: f5(slab)
[   14.304957] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.305294] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.305574] page dumped because: kasan: bad access detected
[   14.305809] 
[   14.305911] Memory state around the buggy address:
[   14.306077]  ffff8881026c3c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.306393]  ffff8881026c3d00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.306612] >ffff8881026c3d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.306870]                          ^
[   14.307062]  ffff8881026c3e00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.307376]  ffff8881026c3e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.307648] ==================================================================