Hay
Date
June 2, 2025, 2:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   22.204681] ==================================================================
[   22.205849] BUG: KASAN: slab-use-after-free in kasan_strings+0x894/0x938
[   22.206376] Read of size 1 at addr fff00000c6cfdcd0 by task kunit_try_catch/246
[   22.207033] 
[   22.207867] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   22.208089] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.208164] Hardware name: linux,dummy-virt (DT)
[   22.208267] Call trace:
[   22.208327]  dump_backtrace+0x9c/0x128
[   22.208442]  show_stack+0x20/0x38
[   22.208537]  dump_stack_lvl+0x8c/0xd0
[   22.208636]  print_report+0x118/0x5f0
[   22.208727]  kasan_report+0xdc/0x128
[   22.208822]  __asan_report_load1_noabort+0x20/0x30
[   22.208909]  kasan_strings+0x894/0x938
[   22.208962]  kunit_try_run_case+0x170/0x3f0
[   22.209016]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.209069]  kthread+0x24c/0x2d0
[   22.209115]  ret_from_fork+0x10/0x20
[   22.209167] 
[   22.216905] Allocated by task 246:
[   22.218796]  kasan_save_stack+0x3c/0x68
[   22.219875]  kasan_save_track+0x20/0x40
[   22.220223]  kasan_save_alloc_info+0x40/0x58
[   22.221724]  __kasan_kmalloc+0xd4/0xd8
[   22.222586]  __kmalloc_cache_noprof+0x154/0x320
[   22.223821]  kasan_strings+0xb0/0x938
[   22.224905]  kunit_try_run_case+0x170/0x3f0
[   22.226107]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.226581]  kthread+0x24c/0x2d0
[   22.227006]  ret_from_fork+0x10/0x20
[   22.228030] 
[   22.228440] Freed by task 246:
[   22.228722]  kasan_save_stack+0x3c/0x68
[   22.229349]  kasan_save_track+0x20/0x40
[   22.229970]  kasan_save_free_info+0x4c/0x78
[   22.230527]  __kasan_slab_free+0x6c/0x98
[   22.230869]  kfree+0x110/0x3b8
[   22.231545]  kasan_strings+0x128/0x938
[   22.232166]  kunit_try_run_case+0x170/0x3f0
[   22.232717]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.233228]  kthread+0x24c/0x2d0
[   22.233632]  ret_from_fork+0x10/0x20
[   22.234061] 
[   22.234309] The buggy address belongs to the object at fff00000c6cfdcc0
[   22.234309]  which belongs to the cache kmalloc-32 of size 32
[   22.235219] The buggy address is located 16 bytes inside of
[   22.235219]  freed 32-byte region [fff00000c6cfdcc0, fff00000c6cfdce0)
[   22.236636] 
[   22.236887] The buggy address belongs to the physical page:
[   22.237228] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106cfd
[   22.237639] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.237968] page_type: f5(slab)
[   22.238196] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   22.239352] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   22.240351] page dumped because: kasan: bad access detected
[   22.240928] 
[   22.241227] Memory state around the buggy address:
[   22.241793]  fff00000c6cfdb80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   22.242502]  fff00000c6cfdc00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   22.243334] >fff00000c6cfdc80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   22.244024]                                                  ^
[   22.244394]  fff00000c6cfdd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.245169]  fff00000c6cfdd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.246020] ==================================================================

[   14.075675] ==================================================================
[   14.076079] BUG: KASAN: slab-use-after-free in kasan_strings+0xa0f/0xb60
[   14.076417] Read of size 1 at addr ffff888102632890 by task kunit_try_catch/264
[   14.076680] 
[   14.076786] CPU: 0 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   14.076827] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.076839] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.076859] Call Trace:
[   14.076873]  <TASK>
[   14.076888]  dump_stack_lvl+0x73/0xb0
[   14.076912]  print_report+0xd1/0x640
[   14.076933]  ? __virt_addr_valid+0x1db/0x2d0
[   14.076956]  ? kasan_strings+0xa0f/0xb60
[   14.076977]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.076999]  ? kasan_strings+0xa0f/0xb60
[   14.077020]  kasan_report+0x140/0x180
[   14.077042]  ? kasan_strings+0xa0f/0xb60
[   14.077087]  __asan_report_load1_noabort+0x18/0x20
[   14.077109]  kasan_strings+0xa0f/0xb60
[   14.077130]  ? __pfx_kasan_strings+0x10/0x10
[   14.077151]  ? __schedule+0xc49/0x27a0
[   14.077170]  ? __pfx_read_tsc+0x10/0x10
[   14.077188]  ? ktime_get_ts64+0x84/0x230
[   14.077212]  kunit_try_run_case+0x1a6/0x480
[   14.077233]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.077251]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   14.077270]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.077294]  ? __kthread_parkme+0x82/0x160
[   14.077312]  ? preempt_count_sub+0x50/0x80
[   14.077334]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.077353]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.077376]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.077400]  kthread+0x257/0x310
[   14.077417]  ? __pfx_kthread+0x10/0x10
[   14.077435]  ret_from_fork+0x41/0x80
[   14.077454]  ? __pfx_kthread+0x10/0x10
[   14.077471]  ret_from_fork_asm+0x1a/0x30
[   14.077499]  </TASK>
[   14.077508] 
[   14.081911] Allocated by task 264:
[   14.082139]  kasan_save_stack+0x45/0x70
[   14.082358]  kasan_save_track+0x18/0x40
[   14.082579]  kasan_save_alloc_info+0x3b/0x50
[   14.082806]  __kasan_kmalloc+0xb7/0xc0
[   14.082932]  __kmalloc_cache_noprof+0x168/0x350
[   14.083118]  kasan_strings+0xb3/0xb60
[   14.083204]  kunit_try_run_case+0x1a6/0x480
[   14.083291]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.083394]  kthread+0x257/0x310
[   14.083465]  ret_from_fork+0x41/0x80
[   14.083544]  ret_from_fork_asm+0x1a/0x30
[   14.083626] 
[   14.083682] Freed by task 264:
[   14.083759]  kasan_save_stack+0x45/0x70
[   14.083981]  kasan_save_track+0x18/0x40
[   14.084218]  kasan_save_free_info+0x3f/0x60
[   14.084477]  __kasan_slab_free+0x56/0x70
[   14.084695]  kfree+0x123/0x3d0
[   14.084878]  kasan_strings+0x13a/0xb60
[   14.085112]  kunit_try_run_case+0x1a6/0x480
[   14.085311]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.085566]  kthread+0x257/0x310
[   14.085646]  ret_from_fork+0x41/0x80
[   14.085736]  ret_from_fork_asm+0x1a/0x30
[   14.085823] 
[   14.085871] The buggy address belongs to the object at ffff888102632880
[   14.085871]  which belongs to the cache kmalloc-32 of size 32
[   14.086443] The buggy address is located 16 bytes inside of
[   14.086443]  freed 32-byte region [ffff888102632880, ffff8881026328a0)
[   14.086931] 
[   14.087046] The buggy address belongs to the physical page:
[   14.087228] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102632
[   14.087452] flags: 0x200000000000000(node=0|zone=2)
[   14.087631] page_type: f5(slab)
[   14.087749] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.087980] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   14.088266] page dumped because: kasan: bad access detected
[   14.088421] 
[   14.088520] Memory state around the buggy address:
[   14.088697]  ffff888102632780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.088927]  ffff888102632800: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.089165] >ffff888102632880: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   14.089405]                          ^
[   14.089533]  ffff888102632900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.089730]  ffff888102632980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.090001] ==================================================================