Hay
Date
July 20, 2025, 8:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.480611] ==================================================================
[   17.480782] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   17.480857] Read of size 1 at addr fff00000c767da50 by task kunit_try_catch/260
[   17.481167] 
[   17.481220] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   17.481597] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.481665] Hardware name: linux,dummy-virt (DT)
[   17.481724] Call trace:
[   17.482011]  show_stack+0x20/0x38 (C)
[   17.482518]  dump_stack_lvl+0x8c/0xd0
[   17.482607]  print_report+0x118/0x5d0
[   17.483219]  kasan_report+0xdc/0x128
[   17.483305]  __asan_report_load1_noabort+0x20/0x30
[   17.483397]  strlen+0xa8/0xb0
[   17.483589]  kasan_strings+0x418/0xb00
[   17.483978]  kunit_try_run_case+0x170/0x3f0
[   17.484144]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.484299]  kthread+0x328/0x630
[   17.484387]  ret_from_fork+0x10/0x20
[   17.484479] 
[   17.484579] Allocated by task 260:
[   17.484657]  kasan_save_stack+0x3c/0x68
[   17.484864]  kasan_save_track+0x20/0x40
[   17.485076]  kasan_save_alloc_info+0x40/0x58
[   17.485171]  __kasan_kmalloc+0xd4/0xd8
[   17.485289]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.485348]  kasan_strings+0xc8/0xb00
[   17.485682]  kunit_try_run_case+0x170/0x3f0
[   17.485831]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.485976]  kthread+0x328/0x630
[   17.486065]  ret_from_fork+0x10/0x20
[   17.486123] 
[   17.486404] Freed by task 260:
[   17.486471]  kasan_save_stack+0x3c/0x68
[   17.486518]  kasan_save_track+0x20/0x40
[   17.486857]  kasan_save_free_info+0x4c/0x78
[   17.486931]  __kasan_slab_free+0x6c/0x98
[   17.487035]  kfree+0x214/0x3c8
[   17.487074]  kasan_strings+0x24c/0xb00
[   17.487157]  kunit_try_run_case+0x170/0x3f0
[   17.487482]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.487758]  kthread+0x328/0x630
[   17.487829]  ret_from_fork+0x10/0x20
[   17.487941] 
[   17.487993] The buggy address belongs to the object at fff00000c767da40
[   17.487993]  which belongs to the cache kmalloc-32 of size 32
[   17.488065] The buggy address is located 16 bytes inside of
[   17.488065]  freed 32-byte region [fff00000c767da40, fff00000c767da60)
[   17.488140] 
[   17.488196] The buggy address belongs to the physical page:
[   17.488231] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10767d
[   17.488292] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.488344] page_type: f5(slab)
[   17.488383] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   17.488454] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   17.488507] page dumped because: kasan: bad access detected
[   17.488551] 
[   17.488572] Memory state around the buggy address:
[   17.488614]  fff00000c767d900: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.488669]  fff00000c767d980: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.488716] >fff00000c767da00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   17.488766]                                                  ^
[   17.488821]  fff00000c767da80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   17.488906]  fff00000c767db00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   17.489497] ==================================================================

[   14.932245] ==================================================================
[   14.932606] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   14.932948] Read of size 1 at addr ffff8881038b6250 by task kunit_try_catch/277
[   14.933390] 
[   14.933500] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   14.933545] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.933557] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.933578] Call Trace:
[   14.933593]  <TASK>
[   14.933607]  dump_stack_lvl+0x73/0xb0
[   14.933636]  print_report+0xd1/0x610
[   14.933660]  ? __virt_addr_valid+0x1db/0x2d0
[   14.933683]  ? strlen+0x8f/0xb0
[   14.933700]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.933723]  ? strlen+0x8f/0xb0
[   14.933742]  kasan_report+0x141/0x180
[   14.933765]  ? strlen+0x8f/0xb0
[   14.933790]  __asan_report_load1_noabort+0x18/0x20
[   14.933814]  strlen+0x8f/0xb0
[   14.933834]  kasan_strings+0x57b/0xe80
[   14.933854]  ? trace_hardirqs_on+0x37/0xe0
[   14.933878]  ? __pfx_kasan_strings+0x10/0x10
[   14.933898]  ? finish_task_switch.isra.0+0x153/0x700
[   14.933920]  ? __switch_to+0x47/0xf50
[   14.933948]  ? __schedule+0x10c6/0x2b60
[   14.933972]  ? __pfx_read_tsc+0x10/0x10
[   14.933993]  ? ktime_get_ts64+0x86/0x230
[   14.934019]  kunit_try_run_case+0x1a5/0x480
[   14.934044]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.934067]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.934091]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.934124]  ? __kthread_parkme+0x82/0x180
[   14.934145]  ? preempt_count_sub+0x50/0x80
[   14.934170]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.934194]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.934218]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.934242]  kthread+0x337/0x6f0
[   14.934262]  ? trace_preempt_on+0x20/0xc0
[   14.934285]  ? __pfx_kthread+0x10/0x10
[   14.934307]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.934329]  ? calculate_sigpending+0x7b/0xa0
[   14.934354]  ? __pfx_kthread+0x10/0x10
[   14.934376]  ret_from_fork+0x116/0x1d0
[   14.934394]  ? __pfx_kthread+0x10/0x10
[   14.934415]  ret_from_fork_asm+0x1a/0x30
[   14.934450]  </TASK>
[   14.934460] 
[   14.943001] Allocated by task 277:
[   14.943379]  kasan_save_stack+0x45/0x70
[   14.943605]  kasan_save_track+0x18/0x40
[   14.943766]  kasan_save_alloc_info+0x3b/0x50
[   14.944068]  __kasan_kmalloc+0xb7/0xc0
[   14.944226]  __kmalloc_cache_noprof+0x189/0x420
[   14.944388]  kasan_strings+0xc0/0xe80
[   14.944537]  kunit_try_run_case+0x1a5/0x480
[   14.944691]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.944872]  kthread+0x337/0x6f0
[   14.945044]  ret_from_fork+0x116/0x1d0
[   14.945235]  ret_from_fork_asm+0x1a/0x30
[   14.945431] 
[   14.945536] Freed by task 277:
[   14.945695]  kasan_save_stack+0x45/0x70
[   14.945888]  kasan_save_track+0x18/0x40
[   14.946084]  kasan_save_free_info+0x3f/0x60
[   14.946297]  __kasan_slab_free+0x56/0x70
[   14.946729]  kfree+0x222/0x3f0
[   14.946952]  kasan_strings+0x2aa/0xe80
[   14.947239]  kunit_try_run_case+0x1a5/0x480
[   14.947415]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.947687]  kthread+0x337/0x6f0
[   14.947887]  ret_from_fork+0x116/0x1d0
[   14.948055]  ret_from_fork_asm+0x1a/0x30
[   14.948245] 
[   14.948323] The buggy address belongs to the object at ffff8881038b6240
[   14.948323]  which belongs to the cache kmalloc-32 of size 32
[   14.949037] The buggy address is located 16 bytes inside of
[   14.949037]  freed 32-byte region [ffff8881038b6240, ffff8881038b6260)
[   14.949567] 
[   14.949674] The buggy address belongs to the physical page:
[   14.949987] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1038b6
[   14.950548] flags: 0x200000000000000(node=0|zone=2)
[   14.950747] page_type: f5(slab)
[   14.951029] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.951334] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.951582] page dumped because: kasan: bad access detected
[   14.951763] 
[   14.951996] Memory state around the buggy address:
[   14.952306]  ffff8881038b6100: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.952648]  ffff8881038b6180: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc
[   14.953014] >ffff8881038b6200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.953347]                                                  ^
[   14.953591]  ffff8881038b6280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.953903]  ffff8881038b6300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.954430] ==================================================================