Hay
Date
July 17, 2025, 10:12 a.m.

Environment
qemu-x86_64

[   27.573724] ==================================================================
[   27.574008] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   27.574222] Read of size 1 at addr ffff88810618c690 by task kunit_try_catch/308
[   27.574867] 
[   27.574952] CPU: 0 UID: 0 PID: 308 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250717 #1 PREEMPT(voluntary) 
[   27.574997] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.575008] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.575028] Call Trace:
[   27.575040]  <TASK>
[   27.575054]  dump_stack_lvl+0x73/0xb0
[   27.575092]  print_report+0xd1/0x610
[   27.575113]  ? __virt_addr_valid+0x1db/0x2d0
[   27.575135]  ? kasan_strings+0xcbc/0xe80
[   27.575154]  ? kasan_complete_mode_report_info+0x64/0x200
[   27.575179]  ? kasan_strings+0xcbc/0xe80
[   27.575199]  kasan_report+0x141/0x180
[   27.575221]  ? kasan_strings+0xcbc/0xe80
[   27.575285]  __asan_report_load1_noabort+0x18/0x20
[   27.575311]  kasan_strings+0xcbc/0xe80
[   27.575330]  ? trace_hardirqs_on+0x37/0xe0
[   27.575354]  ? __pfx_kasan_strings+0x10/0x10
[   27.575373]  ? finish_task_switch.isra.0+0x153/0x700
[   27.575393]  ? __switch_to+0x47/0xf80
[   27.575419]  ? __schedule+0x10c6/0x2b60
[   27.575441]  ? __pfx_read_tsc+0x10/0x10
[   27.575461]  ? ktime_get_ts64+0x86/0x230
[   27.575485]  kunit_try_run_case+0x1a5/0x480
[   27.575508]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.575529]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   27.575551]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.575574]  ? __kthread_parkme+0x82/0x180
[   27.575598]  ? preempt_count_sub+0x50/0x80
[   27.575620]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.575643]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.575665]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.575688]  kthread+0x337/0x6f0
[   27.575706]  ? trace_preempt_on+0x20/0xc0
[   27.575728]  ? __pfx_kthread+0x10/0x10
[   27.575748]  ? _raw_spin_unlock_irq+0x47/0x80
[   27.575769]  ? calculate_sigpending+0x7b/0xa0
[   27.575792]  ? __pfx_kthread+0x10/0x10
[   27.575813]  ret_from_fork+0x116/0x1d0
[   27.575831]  ? __pfx_kthread+0x10/0x10
[   27.575851]  ret_from_fork_asm+0x1a/0x30
[   27.575882]  </TASK>
[   27.575891] 
[   27.583069] Allocated by task 308:
[   27.583201]  kasan_save_stack+0x45/0x70
[   27.583331]  kasan_save_track+0x18/0x40
[   27.583454]  kasan_save_alloc_info+0x3b/0x50
[   27.583588]  __kasan_kmalloc+0xb7/0xc0
[   27.583764]  __kmalloc_cache_noprof+0x189/0x420
[   27.584202]  kasan_strings+0xc0/0xe80
[   27.584579]  kunit_try_run_case+0x1a5/0x480
[   27.584776]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.585021]  kthread+0x337/0x6f0
[   27.585187]  ret_from_fork+0x116/0x1d0
[   27.585468]  ret_from_fork_asm+0x1a/0x30
[   27.585899] 
[   27.585990] Freed by task 308:
[   27.586148]  kasan_save_stack+0x45/0x70
[   27.586355]  kasan_save_track+0x18/0x40
[   27.586483]  kasan_save_free_info+0x3f/0x60
[   27.586618]  __kasan_slab_free+0x56/0x70
[   27.586742]  kfree+0x222/0x3f0
[   27.586847]  kasan_strings+0x2aa/0xe80
[   27.586967]  kunit_try_run_case+0x1a5/0x480
[   27.587165]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.587729]  kthread+0x337/0x6f0
[   27.587997]  ret_from_fork+0x116/0x1d0
[   27.588200]  ret_from_fork_asm+0x1a/0x30
[   27.588606] 
[   27.588778] The buggy address belongs to the object at ffff88810618c680
[   27.588778]  which belongs to the cache kmalloc-32 of size 32
[   27.589134] The buggy address is located 16 bytes inside of
[   27.589134]  freed 32-byte region [ffff88810618c680, ffff88810618c6a0)
[   27.589818] 
[   27.589915] The buggy address belongs to the physical page:
[   27.590167] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10618c
[   27.590394] flags: 0x200000000000000(node=0|zone=2)
[   27.590544] page_type: f5(slab)
[   27.590895] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   27.591284] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   27.591631] page dumped because: kasan: bad access detected
[   27.591876] 
[   27.591957] Memory state around the buggy address:
[   27.592164]  ffff88810618c580: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   27.592691]  ffff88810618c600: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   27.592995] >ffff88810618c680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   27.593234]                          ^
[   27.593353]  ffff88810618c700: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   27.593553]  ffff88810618c780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   27.593749] ==================================================================