Hay
Date
July 3, 2025, 3:13 p.m.

Environment
qemu-x86_64

[   13.165957] ==================================================================
[   13.166576] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   13.167222] Read of size 1 at addr ffff88810314dfd0 by task kunit_try_catch/278
[   13.167585] 
[   13.167848] CPU: 0 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc1 #1 PREEMPT(voluntary) 
[   13.167906] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.167919] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.167943] Call Trace:
[   13.167962]  <TASK>
[   13.167981]  dump_stack_lvl+0x73/0xb0
[   13.168046]  print_report+0xd1/0x650
[   13.168071]  ? __virt_addr_valid+0x1db/0x2d0
[   13.168095]  ? strlen+0x8f/0xb0
[   13.168115]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.168140]  ? strlen+0x8f/0xb0
[   13.168159]  kasan_report+0x141/0x180
[   13.168182]  ? strlen+0x8f/0xb0
[   13.168207]  __asan_report_load1_noabort+0x18/0x20
[   13.168240]  strlen+0x8f/0xb0
[   13.168260]  kasan_strings+0x57b/0xe80
[   13.168281]  ? trace_hardirqs_on+0x37/0xe0
[   13.168304]  ? __pfx_kasan_strings+0x10/0x10
[   13.168325]  ? finish_task_switch.isra.0+0x153/0x700
[   13.168350]  ? __switch_to+0x5d9/0xf60
[   13.168370]  ? dequeue_task_fair+0x166/0x4e0
[   13.168394]  ? __schedule+0x10cc/0x2b60
[   13.168418]  ? __pfx_read_tsc+0x10/0x10
[   13.168438]  ? ktime_get_ts64+0x86/0x230
[   13.168464]  kunit_try_run_case+0x1a5/0x480
[   13.168488]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.168510]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.168534]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.168559]  ? __kthread_parkme+0x82/0x180
[   13.168581]  ? preempt_count_sub+0x50/0x80
[   13.168605]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.168629]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.168661]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.168684]  kthread+0x337/0x6f0
[   13.168702]  ? trace_preempt_on+0x20/0xc0
[   13.168724]  ? __pfx_kthread+0x10/0x10
[   13.168742]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.168764]  ? calculate_sigpending+0x7b/0xa0
[   13.168786]  ? __pfx_kthread+0x10/0x10
[   13.168804]  ret_from_fork+0x41/0x80
[   13.168825]  ? __pfx_kthread+0x10/0x10
[   13.168844]  ret_from_fork_asm+0x1a/0x30
[   13.168875]  </TASK>
[   13.168886] 
[   13.179781] Allocated by task 278:
[   13.179974]  kasan_save_stack+0x45/0x70
[   13.180180]  kasan_save_track+0x18/0x40
[   13.180338]  kasan_save_alloc_info+0x3b/0x50
[   13.180487]  __kasan_kmalloc+0xb7/0xc0
[   13.180626]  __kmalloc_cache_noprof+0x189/0x420
[   13.180856]  kasan_strings+0xc0/0xe80
[   13.181049]  kunit_try_run_case+0x1a5/0x480
[   13.181220]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.181423]  kthread+0x337/0x6f0
[   13.181601]  ret_from_fork+0x41/0x80
[   13.181873]  ret_from_fork_asm+0x1a/0x30
[   13.182057] 
[   13.182129] Freed by task 278:
[   13.182306]  kasan_save_stack+0x45/0x70
[   13.182489]  kasan_save_track+0x18/0x40
[   13.182626]  kasan_save_free_info+0x3f/0x60
[   13.182830]  __kasan_slab_free+0x56/0x70
[   13.183047]  kfree+0x222/0x3f0
[   13.183189]  kasan_strings+0x2aa/0xe80
[   13.183368]  kunit_try_run_case+0x1a5/0x480
[   13.183519]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.183692]  kthread+0x337/0x6f0
[   13.183857]  ret_from_fork+0x41/0x80
[   13.184047]  ret_from_fork_asm+0x1a/0x30
[   13.184258] 
[   13.184355] The buggy address belongs to the object at ffff88810314dfc0
[   13.184355]  which belongs to the cache kmalloc-32 of size 32
[   13.184927] The buggy address is located 16 bytes inside of
[   13.184927]  freed 32-byte region [ffff88810314dfc0, ffff88810314dfe0)
[   13.185355] 
[   13.185457] The buggy address belongs to the physical page:
[   13.185766] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10314d
[   13.186127] flags: 0x200000000000000(node=0|zone=2)
[   13.186340] page_type: f5(slab)
[   13.186510] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.186798] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000
[   13.187029] page dumped because: kasan: bad access detected
[   13.187215] 
[   13.187321] Memory state around the buggy address:
[   13.187557]  ffff88810314de80: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   13.187897]  ffff88810314df00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.188117] >ffff88810314df80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.188551]                                                  ^
[   13.189028]  ffff88810314e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   13.189351]  ffff88810314e080: fb fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb
[   13.189687] ==================================================================