Hay
Date
July 18, 2025, 1:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   33.846917] ==================================================================
[   33.846973] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   33.847055] Read of size 1 at addr fff00000c907cb50 by task kunit_try_catch/290
[   33.847675] 
[   33.847723] CPU: 0 UID: 0 PID: 290 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   33.847938] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.847999] Hardware name: linux,dummy-virt (DT)
[   33.848127] Call trace:
[   33.848187]  show_stack+0x20/0x38 (C)
[   33.848289]  dump_stack_lvl+0x8c/0xd0
[   33.848355]  print_report+0x118/0x5e8
[   33.848545]  kasan_report+0xdc/0x128
[   33.848603]  __asan_report_load1_noabort+0x20/0x30
[   33.848654]  kasan_strings+0x95c/0xb00
[   33.848885]  kunit_try_run_case+0x170/0x3f0
[   33.849045]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.849260]  kthread+0x328/0x630
[   33.849356]  ret_from_fork+0x10/0x20
[   33.849511] 
[   33.849599] Allocated by task 290:
[   33.849631]  kasan_save_stack+0x3c/0x68
[   33.850001]  kasan_save_track+0x20/0x40
[   33.850087]  kasan_save_alloc_info+0x40/0x58
[   33.850201]  __kasan_kmalloc+0xd4/0xd8
[   33.850280]  __kmalloc_cache_noprof+0x16c/0x3c0
[   33.850358]  kasan_strings+0xc8/0xb00
[   33.850495]  kunit_try_run_case+0x170/0x3f0
[   33.850559]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.850900]  kthread+0x328/0x630
[   33.850967]  ret_from_fork+0x10/0x20
[   33.851042] 
[   33.851481] Freed by task 290:
[   33.851847]  kasan_save_stack+0x3c/0x68
[   33.851933]  kasan_save_track+0x20/0x40
[   33.852000]  kasan_save_free_info+0x4c/0x78
[   33.852133]  __kasan_slab_free+0x6c/0x98
[   33.856621]  fff00000c907cb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   33.861180]  __asan_report_load1_noabort+0x20/0x30
[   33.861532] 
[   33.861957]  ret_from_fork+0x10/0x20
[   33.863052]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.863960] 
[   33.864020] The buggy address belongs to the physical page:
[   33.864189] page_type: f5(slab)
[   33.865019] 
[   33.866006]  fff00000c907cb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   33.868453]  strnlen+0x80/0x88
[   33.869842]  kasan_save_stack+0x3c/0x68
[   33.869931]  kasan_save_track+0x20/0x40
[   33.870067]  kasan_save_alloc_info+0x40/0x58
[   33.870518]  kasan_strings+0xc8/0xb00
[   33.871401]  kasan_save_track+0x20/0x40
[   33.872039]  kunit_try_run_case+0x170/0x3f0
[   33.872277] 
[   33.872584] The buggy address is located 16 bytes inside of
[   33.872584]  freed 32-byte region [fff00000c907cb40, fff00000c907cb60)
[   33.873308] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   33.876984]     not ok 62 kasan_strings
[   33.881621] CPU: 0 UID: 0 PID: 292 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   33.881959]  dump_stack_lvl+0x8c/0xd0
[   33.882569]  kasan_bitops_generic+0x110/0x1c8
[   33.883341]  kasan_save_stack+0x3c/0x68
[   33.883835]  kunit_try_run_case+0x170/0x3f0
[   33.884562]  ret_from_fork+0x10/0x20
[   33.884693] The buggy address is located 8 bytes inside of
[   33.884693]  allocated 9-byte region [fff00000c907e120, fff00000c907e129)
[   33.886853]  fff00000c907e000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   33.887447] ==================================================================


[   26.794769] ==================================================================
[   26.795180] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   26.795469] Read of size 1 at addr ffff8881053c84d0 by task kunit_try_catch/307
[   26.795788] 
[   26.795954] CPU: 0 UID: 0 PID: 307 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   26.796005] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.796018] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.796041] Call Trace:
[   26.796060]  <TASK>
[   26.796078]  dump_stack_lvl+0x73/0xb0
[   26.796109]  print_report+0xd1/0x640
[   26.796133]  ? __virt_addr_valid+0x1db/0x2d0
[   26.796156]  ? kasan_strings+0xcbc/0xe80
[   26.796178]  ? kasan_complete_mode_report_info+0x64/0x200
[   26.796204]  ? kasan_strings+0xcbc/0xe80
[   26.796224]  kasan_report+0x141/0x180
[   26.796246]  ? kasan_strings+0xcbc/0xe80
[   26.796281]  __asan_report_load1_noabort+0x18/0x20
[   26.796306]  kasan_strings+0xcbc/0xe80
[   26.796325]  ? trace_hardirqs_on+0x37/0xe0
[   26.796349]  ? __pfx_kasan_strings+0x10/0x10
[   26.796369]  ? finish_task_switch.isra.0+0x153/0x700
[   26.796392]  ? __switch_to+0x47/0xf80
[   26.796419]  ? __schedule+0x10da/0x2b60
[   26.796443]  ? __pfx_read_tsc+0x10/0x10
[   26.796464]  ? ktime_get_ts64+0x86/0x230
[   26.796488]  kunit_try_run_case+0x1a5/0x480
[   26.796513]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.796535]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   26.796568]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.796601]  ? __kthread_parkme+0x82/0x180
[   26.796620]  ? preempt_count_sub+0x50/0x80
[   26.796644]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.796667]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.796689]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.796712]  kthread+0x337/0x6f0
[   26.796731]  ? trace_preempt_on+0x20/0xc0
[   26.796752]  ? __pfx_kthread+0x10/0x10
[   26.796772]  ? _raw_spin_unlock_irq+0x47/0x80
[   26.796852]  ? calculate_sigpending+0x7b/0xa0
[   26.796879]  ? __pfx_kthread+0x10/0x10
[   26.796900]  ret_from_fork+0x116/0x1d0
[   26.796920]  ? __pfx_kthread+0x10/0x10
[   26.796939]  ret_from_fork_asm+0x1a/0x30
[   26.796970]  </TASK>
[   26.796980] 
[   26.804313] Allocated by task 307:
[   26.804467]  kasan_save_stack+0x45/0x70
[   26.804658]  kasan_save_track+0x18/0x40
[   26.804829]  kasan_save_alloc_info+0x3b/0x50
[   26.805021]  __kasan_kmalloc+0xb7/0xc0
[   26.805174]  __kmalloc_cache_noprof+0x189/0x420
[   26.805390]  kasan_strings+0xc0/0xe80
[   26.805570]  kunit_try_run_case+0x1a5/0x480
[   26.805715]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.805884]  kthread+0x337/0x6f0
[   26.805999]  ret_from_fork+0x116/0x1d0
[   26.806126]  ret_from_fork_asm+0x1a/0x30
[   26.806265] 
[   26.806338] Freed by task 307:
[   26.806442]  kasan_save_stack+0x45/0x70
[   26.806573]  kasan_save_track+0x18/0x40
[   26.806706]  kasan_save_free_info+0x3f/0x60
[   26.806844]  __kasan_slab_free+0x56/0x70
[   26.806975]  kfree+0x222/0x3f0
[   26.807083]  kasan_strings+0x2aa/0xe80
[   26.807208]  kunit_try_run_case+0x1a5/0x480
[   26.807460]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.807727]  kthread+0x337/0x6f0
[   26.808013]  ret_from_fork+0x116/0x1d0
[   26.808687]  ret_from_fork_asm+0x1a/0x30
[   26.809036] 
[   26.809187] The buggy address belongs to the object at ffff8881053c84c0
[   26.809187]  which belongs to the cache kmalloc-32 of size 32
[   26.809737] The buggy address is located 16 bytes inside of
[   26.809737]  freed 32-byte region [ffff8881053c84c0, ffff8881053c84e0)
[   26.811280] 
[   26.811389] The buggy address belongs to the physical page:
[   26.811636] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053c8
[   26.813033] flags: 0x200000000000000(node=0|zone=2)
[   26.814491] page_type: f5(slab)
[   26.814744] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   26.815526] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   26.816023] page dumped because: kasan: bad access detected
[   26.816355] 
[   26.816420] Memory state around the buggy address:
[   26.816620]  ffff8881053c8380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   26.817023]  ffff8881053c8400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   26.817449] >ffff8881053c8480: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   26.817829]                                                  ^
[   26.818058]  ffff8881053c8500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   26.818406]  ffff8881053c8580: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   26.818728] ==================================================================