Hay
Date
July 15, 2025, 2:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.129168] ==================================================================
[   20.129237] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   20.129296] Read of size 1 at addr fff00000c59caad0 by task kunit_try_catch/261
[   20.129538] 
[   20.129576] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.7-rc1 #1 PREEMPT 
[   20.129869] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.129983] Hardware name: linux,dummy-virt (DT)
[   20.130029] Call trace:
[   20.130071]  show_stack+0x20/0x38 (C)
[   20.130182]  dump_stack_lvl+0x8c/0xd0
[   20.130279]  print_report+0x118/0x5d0
[   20.130423]  kasan_report+0xdc/0x128
[   20.130489]  __asan_report_load1_noabort+0x20/0x30
[   20.130569]  kasan_strings+0x95c/0xb00
[   20.130953]  kunit_try_run_case+0x170/0x3f0
[   20.131068]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.131164]  kthread+0x328/0x630
[   20.131332]  ret_from_fork+0x10/0x20
[   20.131442] 
[   20.131601] Allocated by task 261:
[   20.131633]  kasan_save_stack+0x3c/0x68
[   20.131705]  kasan_save_track+0x20/0x40
[   20.132050]  kasan_save_alloc_info+0x40/0x58
[   20.132121]  __kasan_kmalloc+0xd4/0xd8
[   20.132249]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.132326]  kasan_strings+0xc8/0xb00
[   20.132384]  kunit_try_run_case+0x170/0x3f0
[   20.132685]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.132771]  kthread+0x328/0x630
[   20.133097]  ret_from_fork+0x10/0x20
[   20.133173] 
[   20.133396] Freed by task 261:
[   20.133541]  kasan_save_stack+0x3c/0x68
[   20.133614]  kasan_save_track+0x20/0x40
[   20.133715]  kasan_save_free_info+0x4c/0x78
[   20.133774]  __kasan_slab_free+0x6c/0x98
[   20.133814]  kfree+0x214/0x3c8
[   20.133849]  kasan_strings+0x24c/0xb00
[   20.133889]  kunit_try_run_case+0x170/0x3f0
[   20.133930]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.133978]  kthread+0x328/0x630
[   20.134016]  ret_from_fork+0x10/0x20
[   20.134234] 
[   20.134390] The buggy address belongs to the object at fff00000c59caac0
[   20.134390]  which belongs to the cache kmalloc-32 of size 32
[   20.134543] The buggy address is located 16 bytes inside of
[   20.134543]  freed 32-byte region [fff00000c59caac0, fff00000c59caae0)
[   20.134637] 
[   20.134734] The buggy address belongs to the physical page:
[   20.134804] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059ca
[   20.134968] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.135058] page_type: f5(slab)
[   20.135100] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.135167] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.135367] page dumped because: kasan: bad access detected
[   20.135622] 
[   20.135692] Memory state around the buggy address:
[   20.135759]  fff00000c59ca980: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.135914]  fff00000c59caa00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   20.135981] >fff00000c59caa80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.136024]                                                  ^
[   20.136073]  fff00000c59cab00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.136489]  fff00000c59cab80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.136551] ==================================================================

[   12.931084] ==================================================================
[   12.931401] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   12.931816] Read of size 1 at addr ffff8881022482d0 by task kunit_try_catch/278
[   12.932364] 
[   12.932497] CPU: 0 UID: 0 PID: 278 Comm: kunit_try_catch Tainted: G    B            N  6.15.7-rc1 #1 PREEMPT(voluntary) 
[   12.932557] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.932568] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.932588] Call Trace:
[   12.932602]  <TASK>
[   12.932617]  dump_stack_lvl+0x73/0xb0
[   12.932643]  print_report+0xd1/0x610
[   12.932664]  ? __virt_addr_valid+0x1db/0x2d0
[   12.932731]  ? kasan_strings+0xcbc/0xe80
[   12.932754]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.932778]  ? kasan_strings+0xcbc/0xe80
[   12.932799]  kasan_report+0x141/0x180
[   12.932822]  ? kasan_strings+0xcbc/0xe80
[   12.932847]  __asan_report_load1_noabort+0x18/0x20
[   12.932868]  kasan_strings+0xcbc/0xe80
[   12.932899]  ? trace_hardirqs_on+0x37/0xe0
[   12.932921]  ? __pfx_kasan_strings+0x10/0x10
[   12.932941]  ? finish_task_switch.isra.0+0x153/0x700
[   12.932963]  ? __switch_to+0x5d9/0xf60
[   12.932982]  ? dequeue_task_fair+0x166/0x4e0
[   12.933005]  ? __schedule+0x10cc/0x2b60
[   12.933027]  ? __pfx_read_tsc+0x10/0x10
[   12.933046]  ? ktime_get_ts64+0x86/0x230
[   12.933070]  kunit_try_run_case+0x1a5/0x480
[   12.933090]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.933108]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.933134]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.933158]  ? __kthread_parkme+0x82/0x180
[   12.933179]  ? preempt_count_sub+0x50/0x80
[   12.933203]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.933225]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.933248]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.933270]  kthread+0x337/0x6f0
[   12.933286]  ? trace_preempt_on+0x20/0xc0
[   12.933307]  ? __pfx_kthread+0x10/0x10
[   12.933325]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.933346]  ? calculate_sigpending+0x7b/0xa0
[   12.933367]  ? __pfx_kthread+0x10/0x10
[   12.933384]  ret_from_fork+0x41/0x80
[   12.933404]  ? __pfx_kthread+0x10/0x10
[   12.933420]  ret_from_fork_asm+0x1a/0x30
[   12.933450]  </TASK>
[   12.933460] 
[   12.941995] Allocated by task 278:
[   12.942120]  kasan_save_stack+0x45/0x70
[   12.942319]  kasan_save_track+0x18/0x40
[   12.942536]  kasan_save_alloc_info+0x3b/0x50
[   12.942776]  __kasan_kmalloc+0xb7/0xc0
[   12.943051]  __kmalloc_cache_noprof+0x189/0x420
[   12.943266]  kasan_strings+0xc0/0xe80
[   12.943393]  kunit_try_run_case+0x1a5/0x480
[   12.943612]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.944110]  kthread+0x337/0x6f0
[   12.944278]  ret_from_fork+0x41/0x80
[   12.944446]  ret_from_fork_asm+0x1a/0x30
[   12.944590] 
[   12.944668] Freed by task 278:
[   12.944836]  kasan_save_stack+0x45/0x70
[   12.944980]  kasan_save_track+0x18/0x40
[   12.945108]  kasan_save_free_info+0x3f/0x60
[   12.945250]  __kasan_slab_free+0x56/0x70
[   12.945460]  kfree+0x222/0x3f0
[   12.945617]  kasan_strings+0x2aa/0xe80
[   12.945801]  kunit_try_run_case+0x1a5/0x480
[   12.946024]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.946273]  kthread+0x337/0x6f0
[   12.946431]  ret_from_fork+0x41/0x80
[   12.946557]  ret_from_fork_asm+0x1a/0x30
[   12.946692] 
[   12.946761] The buggy address belongs to the object at ffff8881022482c0
[   12.946761]  which belongs to the cache kmalloc-32 of size 32
[   12.947413] The buggy address is located 16 bytes inside of
[   12.947413]  freed 32-byte region [ffff8881022482c0, ffff8881022482e0)
[   12.947784] 
[   12.947854] The buggy address belongs to the physical page:
[   12.948070] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102248
[   12.948468] flags: 0x200000000000000(node=0|zone=2)
[   12.948731] page_type: f5(slab)
[   12.948993] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   12.949302] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   12.949550] page dumped because: kasan: bad access detected
[   12.949811] 
[   12.949986] Memory state around the buggy address:
[   12.950211]  ffff888102248180: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   12.950542]  ffff888102248200: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   12.950997] >ffff888102248280: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   12.951216]                                                  ^
[   12.951397]  ffff888102248300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.951647]  ffff888102248380: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   12.952319] ==================================================================