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

Environment
qemu-arm64
qemu-x86_64

[   32.985287] ==================================================================
[   32.985563] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   32.985735] Read of size 1 at addr fff00000c9bb4890 by task kunit_try_catch/290
[   32.985828] 
[   32.985863] CPU: 0 UID: 0 PID: 290 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT 
[   32.986152] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.986196] Hardware name: linux,dummy-virt (DT)
[   32.986425] Call trace:
[   32.986461]  show_stack+0x20/0x38 (C)
[   32.986574]  dump_stack_lvl+0x8c/0xd0
[   32.986628]  print_report+0x118/0x5d0
[   32.986691]  kasan_report+0xdc/0x128
[   32.987049]  __asan_report_load1_noabort+0x20/0x30
[   32.987124]  kasan_strings+0x95c/0xb00
[   32.987308]  kunit_try_run_case+0x170/0x3f0
[   32.987520]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.987636]  kthread+0x328/0x630
[   32.987796]  ret_from_fork+0x10/0x20
[   32.987874] 
[   32.988022] Allocated by task 290:
[   32.988054]  kasan_save_stack+0x3c/0x68
[   32.988096]  kasan_save_track+0x20/0x40
[   32.988154]  kasan_save_alloc_info+0x40/0x58
[   32.988316]  __kasan_kmalloc+0xd4/0xd8
[   32.988398]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.988596]  kasan_strings+0xc8/0xb00
[   32.988645]  kunit_try_run_case+0x170/0x3f0
[   32.988698]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.988749]  kthread+0x328/0x630
[   32.988799]  ret_from_fork+0x10/0x20
[   32.988839] 
[   32.988869] Freed by task 290:
[   32.988909]  kasan_save_stack+0x3c/0x68
[   32.988948]  kasan_save_track+0x20/0x40
[   32.988992]  kasan_save_free_info+0x4c/0x78
[   32.989032]  __kasan_slab_free+0x6c/0x98
[   32.989071]  kfree+0x214/0x3c8
[   32.989116]  kasan_strings+0x24c/0xb00
[   32.989157]  kunit_try_run_case+0x170/0x3f0
[   32.989201]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.989258]  kthread+0x328/0x630
[   32.989294]  ret_from_fork+0x10/0x20
[   32.989339] 
[   32.989361] The buggy address belongs to the object at fff00000c9bb4880
[   32.989361]  which belongs to the cache kmalloc-32 of size 32
[   32.989432] The buggy address is located 16 bytes inside of
[   32.989432]  freed 32-byte region [fff00000c9bb4880, fff00000c9bb48a0)
[   32.989496] 
[   32.989565] The buggy address belongs to the physical page:
[   32.989618] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109bb4
[   32.990040] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.990493] page_type: f5(slab)
[   32.991530] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   32.991621] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   32.991694] page dumped because: kasan: bad access detected
[   32.991755] 
[   32.991811] Memory state around the buggy address:
[   32.992065]  fff00000c9bb4780: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   32.992252]  fff00000c9bb4800: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   32.992872] >fff00000c9bb4880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   32.993099]                          ^
[   32.993359]  fff00000c9bb4900: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   32.993584]  fff00000c9bb4980: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   32.993681] ==================================================================

[   25.240624] ==================================================================
[   25.240976] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   25.242224] Read of size 1 at addr ffff8881053b8d50 by task kunit_try_catch/308
[   25.242475] 
[   25.242575] CPU: 0 UID: 0 PID: 308 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250716 #1 PREEMPT(voluntary) 
[   25.242632] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.242646] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.242669] Call Trace:
[   25.242691]  <TASK>
[   25.242711]  dump_stack_lvl+0x73/0xb0
[   25.242745]  print_report+0xd1/0x610
[   25.242770]  ? __virt_addr_valid+0x1db/0x2d0
[   25.242795]  ? kasan_strings+0xcbc/0xe80
[   25.242816]  ? kasan_complete_mode_report_info+0x64/0x200
[   25.242842]  ? kasan_strings+0xcbc/0xe80
[   25.242863]  kasan_report+0x141/0x180
[   25.242885]  ? kasan_strings+0xcbc/0xe80
[   25.242909]  __asan_report_load1_noabort+0x18/0x20
[   25.242934]  kasan_strings+0xcbc/0xe80
[   25.242952]  ? trace_hardirqs_on+0x37/0xe0
[   25.242976]  ? __pfx_kasan_strings+0x10/0x10
[   25.242995]  ? finish_task_switch.isra.0+0x153/0x700
[   25.243017]  ? __switch_to+0x47/0xf80
[   25.243042]  ? __schedule+0x10c6/0x2b60
[   25.243065]  ? __pfx_read_tsc+0x10/0x10
[   25.243090]  ? ktime_get_ts64+0x86/0x230
[   25.243115]  kunit_try_run_case+0x1a5/0x480
[   25.243140]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.243161]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   25.243184]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.243207]  ? __kthread_parkme+0x82/0x180
[   25.243228]  ? preempt_count_sub+0x50/0x80
[   25.243250]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.243272]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.243337]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.243364]  kthread+0x337/0x6f0
[   25.243383]  ? trace_preempt_on+0x20/0xc0
[   25.243405]  ? __pfx_kthread+0x10/0x10
[   25.243424]  ? _raw_spin_unlock_irq+0x47/0x80
[   25.243445]  ? calculate_sigpending+0x7b/0xa0
[   25.243469]  ? __pfx_kthread+0x10/0x10
[   25.243489]  ret_from_fork+0x116/0x1d0
[   25.243508]  ? __pfx_kthread+0x10/0x10
[   25.243529]  ret_from_fork_asm+0x1a/0x30
[   25.243575]  </TASK>
[   25.243588] 
[   25.259905] Allocated by task 308:
[   25.260282]  kasan_save_stack+0x45/0x70
[   25.260436]  kasan_save_track+0x18/0x40
[   25.260570]  kasan_save_alloc_info+0x3b/0x50
[   25.260713]  __kasan_kmalloc+0xb7/0xc0
[   25.260838]  __kmalloc_cache_noprof+0x189/0x420
[   25.260985]  kasan_strings+0xc0/0xe80
[   25.261109]  kunit_try_run_case+0x1a5/0x480
[   25.261251]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.261986]  kthread+0x337/0x6f0
[   25.262331]  ret_from_fork+0x116/0x1d0
[   25.262698]  ret_from_fork_asm+0x1a/0x30
[   25.263126] 
[   25.263315] Freed by task 308:
[   25.263631]  kasan_save_stack+0x45/0x70
[   25.264059]  kasan_save_track+0x18/0x40
[   25.264418]  kasan_save_free_info+0x3f/0x60
[   25.264677]  __kasan_slab_free+0x56/0x70
[   25.264813]  kfree+0x222/0x3f0
[   25.265292]  kasan_strings+0x2aa/0xe80
[   25.265737]  kunit_try_run_case+0x1a5/0x480
[   25.266186]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.266481]  kthread+0x337/0x6f0
[   25.266722]  ret_from_fork+0x116/0x1d0
[   25.267149]  ret_from_fork_asm+0x1a/0x30
[   25.267498] 
[   25.267566] The buggy address belongs to the object at ffff8881053b8d40
[   25.267566]  which belongs to the cache kmalloc-32 of size 32
[   25.268394] The buggy address is located 16 bytes inside of
[   25.268394]  freed 32-byte region [ffff8881053b8d40, ffff8881053b8d60)
[   25.268746] 
[   25.268894] The buggy address belongs to the physical page:
[   25.269581] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1053b8
[   25.270370] flags: 0x200000000000000(node=0|zone=2)
[   25.270843] page_type: f5(slab)
[   25.271211] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.271953] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.272388] page dumped because: kasan: bad access detected
[   25.272556] 
[   25.272733] Memory state around the buggy address:
[   25.273382]  ffff8881053b8c00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.274088]  ffff8881053b8c80: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   25.274319] >ffff8881053b8d00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.274526]                                                  ^
[   25.275122]  ffff8881053b8d80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.275752]  ffff8881053b8e00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.276419] ==================================================================