Hay
Date
June 23, 2025, 7:07 a.m.

Environment
qemu-x86_64

[   23.837650] ==================================================================
[   23.838805] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   23.839315] Read of size 1 at addr ffff8881023cba90 by task kunit_try_catch/288
[   23.839695] 
[   23.839818] CPU: 0 UID: 0 PID: 288 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250623 #1 PREEMPT(voluntary) 
[   23.839905] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.839923] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.839952] Call Trace:
[   23.839973]  <TASK>
[   23.839996]  dump_stack_lvl+0x73/0xb0
[   23.840045]  print_report+0xd1/0x650
[   23.840114]  ? __virt_addr_valid+0x1db/0x2d0
[   23.840146]  ? strcmp+0xb0/0xc0
[   23.840176]  ? kasan_complete_mode_report_info+0x64/0x200
[   23.840213]  ? strcmp+0xb0/0xc0
[   23.840243]  kasan_report+0x141/0x180
[   23.840333]  ? strcmp+0xb0/0xc0
[   23.840390]  __asan_report_load1_noabort+0x18/0x20
[   23.840447]  strcmp+0xb0/0xc0
[   23.840487]  kasan_strings+0x431/0xe80
[   23.840515]  ? trace_hardirqs_on+0x37/0xe0
[   23.840551]  ? __pfx_kasan_strings+0x10/0x10
[   23.840584]  ? finish_task_switch.isra.0+0x153/0x700
[   23.840619]  ? __switch_to+0x47/0xf50
[   23.840662]  ? __schedule+0x10cc/0x2b60
[   23.840702]  ? __pfx_read_tsc+0x10/0x10
[   23.840739]  ? ktime_get_ts64+0x86/0x230
[   23.840797]  kunit_try_run_case+0x1a5/0x480
[   23.840868]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.840907]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   23.840941]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.840962]  ? __kthread_parkme+0x82/0x180
[   23.840989]  ? preempt_count_sub+0x50/0x80
[   23.841021]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.841055]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.841093]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.841150]  kthread+0x337/0x6f0
[   23.841183]  ? trace_preempt_on+0x20/0xc0
[   23.841221]  ? __pfx_kthread+0x10/0x10
[   23.841256]  ? _raw_spin_unlock_irq+0x47/0x80
[   23.841291]  ? calculate_sigpending+0x7b/0xa0
[   23.841333]  ? __pfx_kthread+0x10/0x10
[   23.841400]  ret_from_fork+0x116/0x1d0
[   23.841434]  ? __pfx_kthread+0x10/0x10
[   23.841466]  ret_from_fork_asm+0x1a/0x30
[   23.841517]  </TASK>
[   23.841539] 
[   23.851829] Allocated by task 288:
[   23.852120]  kasan_save_stack+0x45/0x70
[   23.852308]  kasan_save_track+0x18/0x40
[   23.852516]  kasan_save_alloc_info+0x3b/0x50
[   23.852710]  __kasan_kmalloc+0xb7/0xc0
[   23.852868]  __kmalloc_cache_noprof+0x189/0x420
[   23.853062]  kasan_strings+0xc0/0xe80
[   23.853309]  kunit_try_run_case+0x1a5/0x480
[   23.853623]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.854039]  kthread+0x337/0x6f0
[   23.854306]  ret_from_fork+0x116/0x1d0
[   23.854551]  ret_from_fork_asm+0x1a/0x30
[   23.854718] 
[   23.854806] Freed by task 288:
[   23.855041]  kasan_save_stack+0x45/0x70
[   23.855314]  kasan_save_track+0x18/0x40
[   23.855613]  kasan_save_free_info+0x3f/0x60
[   23.855921]  __kasan_slab_free+0x56/0x70
[   23.856084]  kfree+0x222/0x3f0
[   23.856217]  kasan_strings+0x2aa/0xe80
[   23.856368]  kunit_try_run_case+0x1a5/0x480
[   23.856694]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.857160]  kthread+0x337/0x6f0
[   23.857419]  ret_from_fork+0x116/0x1d0
[   23.857609]  ret_from_fork_asm+0x1a/0x30
[   23.857791] 
[   23.857881] The buggy address belongs to the object at ffff8881023cba80
[   23.857881]  which belongs to the cache kmalloc-32 of size 32
[   23.858280] The buggy address is located 16 bytes inside of
[   23.858280]  freed 32-byte region [ffff8881023cba80, ffff8881023cbaa0)
[   23.859091] 
[   23.859248] The buggy address belongs to the physical page:
[   23.859631] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1023cb
[   23.860291] flags: 0x200000000000000(node=0|zone=2)
[   23.860641] page_type: f5(slab)
[   23.860780] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   23.861373] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   23.861730] page dumped because: kasan: bad access detected
[   23.861912] 
[   23.862071] Memory state around the buggy address:
[   23.862449]  ffff8881023cb980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   23.862781]  ffff8881023cba00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   23.863253] >ffff8881023cba80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   23.863635]                          ^
[   23.863891]  ffff8881023cbb00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   23.864191]  ffff8881023cbb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   23.864585] ==================================================================