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

Environment
qemu-x86_64

[   13.113274] ==================================================================
[   13.113721] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   13.113968] Read of size 1 at addr ffff8881028ca790 by task kunit_try_catch/279
[   13.114315] 
[   13.114461] CPU: 1 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT(voluntary) 
[   13.114528] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.114540] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.114560] Call Trace:
[   13.114574]  <TASK>
[   13.114588]  dump_stack_lvl+0x73/0xb0
[   13.114614]  print_report+0xd1/0x610
[   13.114637]  ? __virt_addr_valid+0x1db/0x2d0
[   13.114657]  ? kasan_strings+0xcbc/0xe80
[   13.114677]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.114717]  ? kasan_strings+0xcbc/0xe80
[   13.114738]  kasan_report+0x141/0x180
[   13.114774]  ? kasan_strings+0xcbc/0xe80
[   13.114813]  __asan_report_load1_noabort+0x18/0x20
[   13.114834]  kasan_strings+0xcbc/0xe80
[   13.114854]  ? trace_hardirqs_on+0x37/0xe0
[   13.114877]  ? __pfx_kasan_strings+0x10/0x10
[   13.114899]  ? __kasan_check_write+0x18/0x20
[   13.114919]  ? queued_spin_lock_slowpath+0x116/0xb40
[   13.114942]  ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[   13.114963]  ? __pfx_read_tsc+0x10/0x10
[   13.114983]  ? ktime_get_ts64+0x86/0x230
[   13.115007]  kunit_try_run_case+0x1a5/0x480
[   13.115028]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.115047]  ? _raw_spin_lock_irqsave+0xf9/0x100
[   13.115066]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.115090]  ? __kthread_parkme+0x82/0x180
[   13.115111]  ? preempt_count_sub+0x50/0x80
[   13.115137]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.115156]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.115179]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.115203]  kthread+0x337/0x6f0
[   13.115219]  ? trace_preempt_on+0x20/0xc0
[   13.115251]  ? __pfx_kthread+0x10/0x10
[   13.115269]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.115309]  ? calculate_sigpending+0x7b/0xa0
[   13.115331]  ? __pfx_kthread+0x10/0x10
[   13.115349]  ret_from_fork+0x41/0x80
[   13.115382]  ? __pfx_kthread+0x10/0x10
[   13.115399]  ret_from_fork_asm+0x1a/0x30
[   13.115430]  </TASK>
[   13.115440] 
[   13.123195] Allocated by task 279:
[   13.123334]  kasan_save_stack+0x45/0x70
[   13.123478]  kasan_save_track+0x18/0x40
[   13.123613]  kasan_save_alloc_info+0x3b/0x50
[   13.123818]  __kasan_kmalloc+0xb7/0xc0
[   13.124068]  __kmalloc_cache_noprof+0x189/0x420
[   13.124318]  kasan_strings+0xc0/0xe80
[   13.124689]  kunit_try_run_case+0x1a5/0x480
[   13.124888]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.125138]  kthread+0x337/0x6f0
[   13.125311]  ret_from_fork+0x41/0x80
[   13.125527]  ret_from_fork_asm+0x1a/0x30
[   13.125689] 
[   13.125790] Freed by task 279:
[   13.125956]  kasan_save_stack+0x45/0x70
[   13.126172]  kasan_save_track+0x18/0x40
[   13.126375]  kasan_save_free_info+0x3f/0x60
[   13.126613]  __kasan_slab_free+0x56/0x70
[   13.126806]  kfree+0x222/0x3f0
[   13.126963]  kasan_strings+0x2aa/0xe80
[   13.127151]  kunit_try_run_case+0x1a5/0x480
[   13.127366]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.127623]  kthread+0x337/0x6f0
[   13.127784]  ret_from_fork+0x41/0x80
[   13.128081]  ret_from_fork_asm+0x1a/0x30
[   13.128220] 
[   13.128299] The buggy address belongs to the object at ffff8881028ca780
[   13.128299]  which belongs to the cache kmalloc-32 of size 32
[   13.129114] The buggy address is located 16 bytes inside of
[   13.129114]  freed 32-byte region [ffff8881028ca780, ffff8881028ca7a0)
[   13.129777] 
[   13.129875] The buggy address belongs to the physical page:
[   13.130156] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028ca
[   13.130597] flags: 0x200000000000000(node=0|zone=2)
[   13.130846] page_type: f5(slab)
[   13.131012] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.131253] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.131570] page dumped because: kasan: bad access detected
[   13.131839] 
[   13.131931] Memory state around the buggy address:
[   13.132165]  ffff8881028ca680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.132528]  ffff8881028ca700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.132870] >ffff8881028ca780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.133186]                          ^
[   13.133336]  ffff8881028ca800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.133595]  ffff8881028ca880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.133939] ==================================================================