Hay
Date
July 18, 2025, 1:09 p.m.

Environment
qemu-x86_64

[   26.819461] ==================================================================
[   26.819763] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   26.820095] Read of size 1 at addr ffff8881053c84d0 by task kunit_try_catch/307
[   26.820327] 
[   26.820412] CPU: 0 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   26.820462] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.820475] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.820842] Call Trace:
[   26.820862]  <TASK>
[   26.820879]  dump_stack_lvl+0x73/0xb0
[   26.820926]  print_report+0xd1/0x640
[   26.820951]  ? __virt_addr_valid+0x1db/0x2d0
[   26.820974]  ? strlen+0x8f/0xb0
[   26.821006]  ? kasan_complete_mode_report_info+0x64/0x200
[   26.821031]  ? strlen+0x8f/0xb0
[   26.821050]  kasan_report+0x141/0x180
[   26.821084]  ? strlen+0x8f/0xb0
[   26.821107]  __asan_report_load1_noabort+0x18/0x20
[   26.821131]  strlen+0x8f/0xb0
[   26.821163]  kasan_strings+0x57b/0xe80
[   26.821182]  ? trace_hardirqs_on+0x37/0xe0
[   26.821205]  ? __pfx_kasan_strings+0x10/0x10
[   26.821235]  ? finish_task_switch.isra.0+0x153/0x700
[   26.821259]  ? __switch_to+0x47/0xf80
[   26.821302]  ? __schedule+0x10da/0x2b60
[   26.821325]  ? __pfx_read_tsc+0x10/0x10
[   26.821347]  ? ktime_get_ts64+0x86/0x230
[   26.821383]  kunit_try_run_case+0x1a5/0x480
[   26.821408]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.821430]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.821476]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.821509]  ? __kthread_parkme+0x82/0x180
[   26.821541]  ? preempt_count_sub+0x50/0x80
[   26.821564]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.821587]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.821638]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.821661]  kthread+0x337/0x6f0
[   26.821693]  ? trace_preempt_on+0x20/0xc0
[   26.821714]  ? __pfx_kthread+0x10/0x10
[   26.821735]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.821764]  ? calculate_sigpending+0x7b/0xa0
[   26.821788]  ? __pfx_kthread+0x10/0x10
[   26.821874]  ret_from_fork+0x116/0x1d0
[   26.821895]  ? __pfx_kthread+0x10/0x10
[   26.821915]  ret_from_fork_asm+0x1a/0x30
[   26.821946]  </TASK>
[   26.821958] 
[   26.830047] Allocated by task 307:
[   26.830238]  kasan_save_stack+0x45/0x70
[   26.830426]  kasan_save_track+0x18/0x40
[   26.830556]  kasan_save_alloc_info+0x3b/0x50
[   26.830705]  __kasan_kmalloc+0xb7/0xc0
[   26.830858]  __kmalloc_cache_noprof+0x189/0x420
[   26.831073]  kasan_strings+0xc0/0xe80
[   26.831256]  kunit_try_run_case+0x1a5/0x480
[   26.831582]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.831902]  kthread+0x337/0x6f0
[   26.832207]  ret_from_fork+0x116/0x1d0
[   26.832409]  ret_from_fork_asm+0x1a/0x30
[   26.832548] 
[   26.832611] Freed by task 307:
[   26.832717]  kasan_save_stack+0x45/0x70
[   26.833023]  kasan_save_track+0x18/0x40
[   26.833465]  kasan_save_free_info+0x3f/0x60
[   26.833724]  __kasan_slab_free+0x56/0x70
[   26.834009]  kfree+0x222/0x3f0
[   26.834128]  kasan_strings+0x2aa/0xe80
[   26.834254]  kunit_try_run_case+0x1a5/0x480
[   26.834476]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.834739]  kthread+0x337/0x6f0
[   26.834934]  ret_from_fork+0x116/0x1d0
[   26.835299]  ret_from_fork_asm+0x1a/0x30
[   26.835547] 
[   26.835666] The buggy address belongs to the object at ffff8881053c84c0
[   26.835666]  which belongs to the cache kmalloc-32 of size 32
[   26.836137] The buggy address is located 16 bytes inside of
[   26.836137]  freed 32-byte region [ffff8881053c84c0, ffff8881053c84e0)
[   26.836709] 
[   26.836803] The buggy address belongs to the physical page:
[   26.837071] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053c8
[   26.837319] flags: 0x200000000000000(node=0|zone=2)
[   26.837517] page_type: f5(slab)
[   26.837866] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   26.838360] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   26.839175] page dumped because: kasan: bad access detected
[   26.839393] 
[   26.839480] Memory state around the buggy address:
[   26.839698]  ffff8881053c8380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   26.840505]  ffff8881053c8400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   26.841548] >ffff8881053c8480: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   26.842242]                                                  ^
[   26.842740]  ffff8881053c8500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   26.843382]  ffff8881053c8580: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   26.843686] ==================================================================