Hay
Date
July 22, 2025, 2:40 p.m.

Environment
qemu-x86_64

[   13.134675] ==================================================================
[   13.135095] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   13.135659] Read of size 1 at addr ffff8881028ca790 by task kunit_try_catch/279
[   13.136129] 
[   13.136252] CPU: 1 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT(voluntary) 
[   13.136297] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.136308] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.136468] Call Trace:
[   13.136503]  <TASK>
[   13.136533]  dump_stack_lvl+0x73/0xb0
[   13.136573]  print_report+0xd1/0x610
[   13.136609]  ? __virt_addr_valid+0x1db/0x2d0
[   13.136644]  ? strlen+0x8f/0xb0
[   13.136662]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.136698]  ? strlen+0x8f/0xb0
[   13.136730]  kasan_report+0x141/0x180
[   13.136765]  ? strlen+0x8f/0xb0
[   13.136802]  __asan_report_load1_noabort+0x18/0x20
[   13.136837]  strlen+0x8f/0xb0
[   13.136856]  kasan_strings+0x57b/0xe80
[   13.136890]  ? trace_hardirqs_on+0x37/0xe0
[   13.136931]  ? __pfx_kasan_strings+0x10/0x10
[   13.136967]  ? __kasan_check_write+0x18/0x20
[   13.136999]  ? queued_spin_lock_slowpath+0x116/0xb40
[   13.137022]  ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[   13.137094]  ? __pfx_read_tsc+0x10/0x10
[   13.137117]  ? ktime_get_ts64+0x86/0x230
[   13.137142]  kunit_try_run_case+0x1a5/0x480
[   13.137163]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.137181]  ? _raw_spin_lock_irqsave+0xf9/0x100
[   13.137200]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.137238]  ? __kthread_parkme+0x82/0x180
[   13.137259]  ? preempt_count_sub+0x50/0x80
[   13.137284]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.137304]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.137326]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.137349]  kthread+0x337/0x6f0
[   13.137365]  ? trace_preempt_on+0x20/0xc0
[   13.137387]  ? __pfx_kthread+0x10/0x10
[   13.137405]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.137427]  ? calculate_sigpending+0x7b/0xa0
[   13.137448]  ? __pfx_kthread+0x10/0x10
[   13.137466]  ret_from_fork+0x41/0x80
[   13.137486]  ? __pfx_kthread+0x10/0x10
[   13.137503]  ret_from_fork_asm+0x1a/0x30
[   13.137534]  </TASK>
[   13.137544] 
[   13.146164] Allocated by task 279:
[   13.146368]  kasan_save_stack+0x45/0x70
[   13.146590]  kasan_save_track+0x18/0x40
[   13.146743]  kasan_save_alloc_info+0x3b/0x50
[   13.146945]  __kasan_kmalloc+0xb7/0xc0
[   13.147111]  __kmalloc_cache_noprof+0x189/0x420
[   13.147348]  kasan_strings+0xc0/0xe80
[   13.147492]  kunit_try_run_case+0x1a5/0x480
[   13.147690]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.147954]  kthread+0x337/0x6f0
[   13.148069]  ret_from_fork+0x41/0x80
[   13.148197]  ret_from_fork_asm+0x1a/0x30
[   13.148398] 
[   13.148490] Freed by task 279:
[   13.148649]  kasan_save_stack+0x45/0x70
[   13.148839]  kasan_save_track+0x18/0x40
[   13.149033]  kasan_save_free_info+0x3f/0x60
[   13.149258]  __kasan_slab_free+0x56/0x70
[   13.149452]  kfree+0x222/0x3f0
[   13.149602]  kasan_strings+0x2aa/0xe80
[   13.149730]  kunit_try_run_case+0x1a5/0x480
[   13.149867]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.150047]  kthread+0x337/0x6f0
[   13.150250]  ret_from_fork+0x41/0x80
[   13.150519]  ret_from_fork_asm+0x1a/0x30
[   13.150736] 
[   13.150828] The buggy address belongs to the object at ffff8881028ca780
[   13.150828]  which belongs to the cache kmalloc-32 of size 32
[   13.151354] The buggy address is located 16 bytes inside of
[   13.151354]  freed 32-byte region [ffff8881028ca780, ffff8881028ca7a0)
[   13.151838] 
[   13.151945] The buggy address belongs to the physical page:
[   13.152153] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028ca
[   13.152553] flags: 0x200000000000000(node=0|zone=2)
[   13.152739] page_type: f5(slab)
[   13.152929] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.153249] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.153583] page dumped because: kasan: bad access detected
[   13.153816] 
[   13.153905] Memory state around the buggy address:
[   13.154126]  ffff8881028ca680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.154437]  ffff8881028ca700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.154743] >ffff8881028ca780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.155040]                          ^
[   13.155221]  ffff8881028ca800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.155514]  ffff8881028ca880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.155818] ==================================================================