Hay
Date
July 19, 2025, 11:12 p.m.

Environment
qemu-x86_64

[   13.893254] ==================================================================
[   13.894845] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0
[   13.895087] Read of size 1 at addr ffff88810397b990 by task kunit_try_catch/276
[   13.895531] 
[   13.895633] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   13.895681] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.895692] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.895715] Call Trace:
[   13.895726]  <TASK>
[   13.895744]  dump_stack_lvl+0x73/0xb0
[   13.895773]  print_report+0xd1/0x610
[   13.895800]  ? __virt_addr_valid+0x1db/0x2d0
[   13.895825]  ? strcmp+0xb0/0xc0
[   13.895842]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.895863]  ? strcmp+0xb0/0xc0
[   13.895881]  kasan_report+0x141/0x180
[   13.895902]  ? strcmp+0xb0/0xc0
[   13.895924]  __asan_report_load1_noabort+0x18/0x20
[   13.895947]  strcmp+0xb0/0xc0
[   13.895965]  kasan_strings+0x431/0xe80
[   13.895985]  ? trace_hardirqs_on+0x37/0xe0
[   13.896022]  ? __pfx_kasan_strings+0x10/0x10
[   13.896042]  ? finish_task_switch.isra.0+0x153/0x700
[   13.896065]  ? __switch_to+0x47/0xf50
[   13.896092]  ? __schedule+0x10cc/0x2b60
[   13.896115]  ? __pfx_read_tsc+0x10/0x10
[   13.896135]  ? ktime_get_ts64+0x86/0x230
[   13.896160]  kunit_try_run_case+0x1a5/0x480
[   13.896186]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.896208]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.896231]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.896254]  ? __kthread_parkme+0x82/0x180
[   13.896274]  ? preempt_count_sub+0x50/0x80
[   13.896297]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.896320]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.896343]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.896365]  kthread+0x337/0x6f0
[   13.896383]  ? trace_preempt_on+0x20/0xc0
[   13.896405]  ? __pfx_kthread+0x10/0x10
[   13.896425]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.896445]  ? calculate_sigpending+0x7b/0xa0
[   13.896469]  ? __pfx_kthread+0x10/0x10
[   13.896490]  ret_from_fork+0x116/0x1d0
[   13.896508]  ? __pfx_kthread+0x10/0x10
[   13.896527]  ret_from_fork_asm+0x1a/0x30
[   13.896557]  </TASK>
[   13.896569] 
[   13.903906] Allocated by task 276:
[   13.904048]  kasan_save_stack+0x45/0x70
[   13.904193]  kasan_save_track+0x18/0x40
[   13.904336]  kasan_save_alloc_info+0x3b/0x50
[   13.904741]  __kasan_kmalloc+0xb7/0xc0
[   13.904934]  __kmalloc_cache_noprof+0x189/0x420
[   13.905172]  kasan_strings+0xc0/0xe80
[   13.905356]  kunit_try_run_case+0x1a5/0x480
[   13.905773]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.906046]  kthread+0x337/0x6f0
[   13.906215]  ret_from_fork+0x116/0x1d0
[   13.906456]  ret_from_fork_asm+0x1a/0x30
[   13.906624] 
[   13.906723] Freed by task 276:
[   13.906881]  kasan_save_stack+0x45/0x70
[   13.907039]  kasan_save_track+0x18/0x40
[   13.907220]  kasan_save_free_info+0x3f/0x60
[   13.907364]  __kasan_slab_free+0x56/0x70
[   13.907580]  kfree+0x222/0x3f0
[   13.907748]  kasan_strings+0x2aa/0xe80
[   13.907917]  kunit_try_run_case+0x1a5/0x480
[   13.908100]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.908277]  kthread+0x337/0x6f0
[   13.908546]  ret_from_fork+0x116/0x1d0
[   13.908740]  ret_from_fork_asm+0x1a/0x30
[   13.908935] 
[   13.909047] The buggy address belongs to the object at ffff88810397b980
[   13.909047]  which belongs to the cache kmalloc-32 of size 32
[   13.909743] The buggy address is located 16 bytes inside of
[   13.909743]  freed 32-byte region [ffff88810397b980, ffff88810397b9a0)
[   13.910213] 
[   13.910313] The buggy address belongs to the physical page:
[   13.910627] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10397b
[   13.910961] flags: 0x200000000000000(node=0|zone=2)
[   13.911150] page_type: f5(slab)
[   13.911270] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.911506] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.911733] page dumped because: kasan: bad access detected
[   13.911905] 
[   13.911973] Memory state around the buggy address:
[   13.912197]  ffff88810397b880: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc
[   13.912939]  ffff88810397b900: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.913276] >ffff88810397b980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.913585]                          ^
[   13.913766]  ffff88810397ba00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.914089]  ffff88810397ba80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.914651] ==================================================================