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

Environment
qemu-x86_64

[   14.308038] ==================================================================
[   14.308548] BUG: KASAN: slab-use-after-free in strnlen+0x73/0x80
[   14.309009] Read of size 1 at addr ffff8881026c3d90 by task kunit_try_catch/276
[   14.309319] 
[   14.309405] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.309447] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.309458] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.309479] Call Trace:
[   14.309495]  <TASK>
[   14.309512]  dump_stack_lvl+0x73/0xb0
[   14.309539]  print_report+0xd1/0x610
[   14.309560]  ? __virt_addr_valid+0x1db/0x2d0
[   14.309583]  ? strnlen+0x73/0x80
[   14.309599]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.309622]  ? strnlen+0x73/0x80
[   14.309639]  kasan_report+0x141/0x180
[   14.309660]  ? strnlen+0x73/0x80
[   14.309682]  __asan_report_load1_noabort+0x18/0x20
[   14.309707]  strnlen+0x73/0x80
[   14.309725]  kasan_strings+0x615/0xe80
[   14.309743]  ? trace_hardirqs_on+0x37/0xe0
[   14.309768]  ? __pfx_kasan_strings+0x10/0x10
[   14.309787]  ? finish_task_switch.isra.0+0x153/0x700
[   14.309810]  ? __switch_to+0x47/0xf50
[   14.309836]  ? __schedule+0x10cc/0x2b60
[   14.309859]  ? __pfx_read_tsc+0x10/0x10
[   14.309878]  ? ktime_get_ts64+0x86/0x230
[   14.309902]  kunit_try_run_case+0x1a5/0x480
[   14.309925]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.309947]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.309970]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.309993]  ? __kthread_parkme+0x82/0x180
[   14.310013]  ? preempt_count_sub+0x50/0x80
[   14.310036]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.310069]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.310093]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.310117]  kthread+0x337/0x6f0
[   14.310135]  ? trace_preempt_on+0x20/0xc0
[   14.310156]  ? __pfx_kthread+0x10/0x10
[   14.310175]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.310196]  ? calculate_sigpending+0x7b/0xa0
[   14.310224]  ? __pfx_kthread+0x10/0x10
[   14.310245]  ret_from_fork+0x116/0x1d0
[   14.310263]  ? __pfx_kthread+0x10/0x10
[   14.310282]  ret_from_fork_asm+0x1a/0x30
[   14.310315]  </TASK>
[   14.310325] 
[   14.318964] Allocated by task 276:
[   14.319170]  kasan_save_stack+0x45/0x70
[   14.319345]  kasan_save_track+0x18/0x40
[   14.319482]  kasan_save_alloc_info+0x3b/0x50
[   14.319657]  __kasan_kmalloc+0xb7/0xc0
[   14.319849]  __kmalloc_cache_noprof+0x189/0x420
[   14.320242]  kasan_strings+0xc0/0xe80
[   14.320418]  kunit_try_run_case+0x1a5/0x480
[   14.320606]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.320963]  kthread+0x337/0x6f0
[   14.321108]  ret_from_fork+0x116/0x1d0
[   14.321245]  ret_from_fork_asm+0x1a/0x30
[   14.321386] 
[   14.321456] Freed by task 276:
[   14.321567]  kasan_save_stack+0x45/0x70
[   14.321721]  kasan_save_track+0x18/0x40
[   14.321915]  kasan_save_free_info+0x3f/0x60
[   14.322147]  __kasan_slab_free+0x56/0x70
[   14.322345]  kfree+0x222/0x3f0
[   14.322511]  kasan_strings+0x2aa/0xe80
[   14.322701]  kunit_try_run_case+0x1a5/0x480
[   14.322918]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.323289]  kthread+0x337/0x6f0
[   14.323446]  ret_from_fork+0x116/0x1d0
[   14.323652]  ret_from_fork_asm+0x1a/0x30
[   14.323997] 
[   14.324086] The buggy address belongs to the object at ffff8881026c3d80
[   14.324086]  which belongs to the cache kmalloc-32 of size 32
[   14.324510] The buggy address is located 16 bytes inside of
[   14.324510]  freed 32-byte region [ffff8881026c3d80, ffff8881026c3da0)
[   14.325157] 
[   14.325257] The buggy address belongs to the physical page:
[   14.325516] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026c3
[   14.325952] flags: 0x200000000000000(node=0|zone=2)
[   14.326176] page_type: f5(slab)
[   14.326316] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.326690] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.327108] page dumped because: kasan: bad access detected
[   14.327338] 
[   14.327433] Memory state around the buggy address:
[   14.327658]  ffff8881026c3c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.327940]  ffff8881026c3d00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.328247] >ffff8881026c3d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.328530]                          ^
[   14.328696]  ffff8881026c3e00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.328953]  ffff8881026c3e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.329406] ==================================================================