Hay
Date
June 3, 2025, 7:38 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.709372] ==================================================================
[   20.709455] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   20.709725] Read of size 1 at addr fff00000c58ba050 by task kunit_try_catch/259
[   20.709824] 
[   20.709961] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250603 #1 PREEMPT 
[   20.710300] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.710359] Hardware name: linux,dummy-virt (DT)
[   20.710451] Call trace:
[   20.710474]  show_stack+0x20/0x38 (C)
[   20.710615]  dump_stack_lvl+0x8c/0xd0
[   20.710972]  print_report+0x118/0x608
[   20.711027]  kasan_report+0xdc/0x128
[   20.711073]  __asan_report_load1_noabort+0x20/0x30
[   20.711123]  kasan_strings+0x95c/0xb00
[   20.711643]  kunit_try_run_case+0x170/0x3f0
[   20.712063]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.712216]  kthread+0x328/0x630
[   20.712262]  ret_from_fork+0x10/0x20
[   20.712526] 
[   20.712652] Allocated by task 259:
[   20.712695]  kasan_save_stack+0x3c/0x68
[   20.712741]  kasan_save_track+0x20/0x40
[   20.712781]  kasan_save_alloc_info+0x40/0x58
[   20.712825]  __kasan_kmalloc+0xd4/0xd8
[   20.712873]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.712914]  kasan_strings+0xc8/0xb00
[   20.713141]  kunit_try_run_case+0x170/0x3f0
[   20.713397]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.713785]  kthread+0x328/0x630
[   20.713825]  ret_from_fork+0x10/0x20
[   20.714021] 
[   20.714262] Freed by task 259:
[   20.714358]  kasan_save_stack+0x3c/0x68
[   20.714463]  kasan_save_track+0x20/0x40
[   20.714558]  kasan_save_free_info+0x4c/0x78
[   20.714604]  __kasan_slab_free+0x6c/0x98
[   20.714644]  kfree+0x214/0x3c8
[   20.714678]  kasan_strings+0x24c/0xb00
[   20.714718]  kunit_try_run_case+0x170/0x3f0
[   20.714759]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.714806]  kthread+0x328/0x630
[   20.714851]  ret_from_fork+0x10/0x20
[   20.714891] 
[   20.714912] The buggy address belongs to the object at fff00000c58ba040
[   20.714912]  which belongs to the cache kmalloc-32 of size 32
[   20.715347] The buggy address is located 16 bytes inside of
[   20.715347]  freed 32-byte region [fff00000c58ba040, fff00000c58ba060)
[   20.715580] 
[   20.715605] The buggy address belongs to the physical page:
[   20.715768] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058ba
[   20.715835] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.715997] page_type: f5(slab)
[   20.716208] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.716495] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.716546] page dumped because: kasan: bad access detected
[   20.716583] 
[   20.716642] Memory state around the buggy address:
[   20.716782]  fff00000c58b9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.716853]  fff00000c58b9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.716905] >fff00000c58ba000: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.717107]                                                  ^
[   20.717149]  fff00000c58ba080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.717248]  fff00000c58ba100: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.717415] ==================================================================


[   16.846065] ==================================================================
[   16.846690] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   16.847774] Read of size 1 at addr ffff888103349910 by task kunit_try_catch/276
[   16.848558] 
[   16.848665] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250603 #1 PREEMPT(voluntary) 
[   16.848725] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.848740] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.848765] Call Trace:
[   16.848789]  <TASK>
[   16.848814]  dump_stack_lvl+0x73/0xb0
[   16.848854]  print_report+0xd1/0x650
[   16.848880]  ? __virt_addr_valid+0x1db/0x2d0
[   16.849041]  ? kasan_strings+0xcbc/0xe80
[   16.849064]  ? kasan_complete_mode_report_info+0x64/0x200
[   16.849088]  ? kasan_strings+0xcbc/0xe80
[   16.849111]  kasan_report+0x141/0x180
[   16.849134]  ? kasan_strings+0xcbc/0xe80
[   16.849163]  __asan_report_load1_noabort+0x18/0x20
[   16.849186]  kasan_strings+0xcbc/0xe80
[   16.849537]  ? trace_hardirqs_on+0x37/0xe0
[   16.849580]  ? __pfx_kasan_strings+0x10/0x10
[   16.849604]  ? finish_task_switch.isra.0+0x153/0x700
[   16.849630]  ? __switch_to+0x47/0xf50
[   16.849657]  ? __schedule+0x10cc/0x2b60
[   16.849684]  ? __pfx_read_tsc+0x10/0x10
[   16.849796]  ? ktime_get_ts64+0x86/0x230
[   16.849826]  kunit_try_run_case+0x1a5/0x480
[   16.849852]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.849873]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.849899]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.849926]  ? __kthread_parkme+0x82/0x180
[   16.849948]  ? preempt_count_sub+0x50/0x80
[   16.849973]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.849995]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.850021]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.850047]  kthread+0x337/0x6f0
[   16.850069]  ? trace_preempt_on+0x20/0xc0
[   16.850093]  ? __pfx_kthread+0x10/0x10
[   16.850116]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.850139]  ? calculate_sigpending+0x7b/0xa0
[   16.850166]  ? __pfx_kthread+0x10/0x10
[   16.850190]  ret_from_fork+0x116/0x1d0
[   16.850210]  ? __pfx_kthread+0x10/0x10
[   16.850232]  ret_from_fork_asm+0x1a/0x30
[   16.850267]  </TASK>
[   16.850280] 
[   16.860805] Allocated by task 276:
[   16.861742]  kasan_save_stack+0x45/0x70
[   16.862110]  kasan_save_track+0x18/0x40
[   16.862872]  kasan_save_alloc_info+0x3b/0x50
[   16.863166]  __kasan_kmalloc+0xb7/0xc0
[   16.863787]  __kmalloc_cache_noprof+0x189/0x420
[   16.864369]  kasan_strings+0xc0/0xe80
[   16.864571]  kunit_try_run_case+0x1a5/0x480
[   16.864692]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.864827]  kthread+0x337/0x6f0
[   16.864927]  ret_from_fork+0x116/0x1d0
[   16.865033]  ret_from_fork_asm+0x1a/0x30
[   16.865156] 
[   16.865220] Freed by task 276:
[   16.865309]  kasan_save_stack+0x45/0x70
[   16.865413]  kasan_save_track+0x18/0x40
[   16.865612]  kasan_save_free_info+0x3f/0x60
[   16.865834]  __kasan_slab_free+0x56/0x70
[   16.866037]  kfree+0x222/0x3f0
[   16.866467]  kasan_strings+0x2aa/0xe80
[   16.867067]  kunit_try_run_case+0x1a5/0x480
[   16.867676]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.868290]  kthread+0x337/0x6f0
[   16.868442]  ret_from_fork+0x116/0x1d0
[   16.868636]  ret_from_fork_asm+0x1a/0x30
[   16.868998] 
[   16.869288] The buggy address belongs to the object at ffff888103349900
[   16.869288]  which belongs to the cache kmalloc-32 of size 32
[   16.870363] The buggy address is located 16 bytes inside of
[   16.870363]  freed 32-byte region [ffff888103349900, ffff888103349920)
[   16.870907] 
[   16.871099] The buggy address belongs to the physical page:
[   16.871491] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103349
[   16.872086] flags: 0x200000000000000(node=0|zone=2)
[   16.872224] page_type: f5(slab)
[   16.872493] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   16.872949] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   16.873245] page dumped because: kasan: bad access detected
[   16.873541] 
[   16.874031] Memory state around the buggy address:
[   16.874203]  ffff888103349800: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc
[   16.874506]  ffff888103349880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   16.874814] >ffff888103349900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   16.875478]                          ^
[   16.875780]  ffff888103349980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   16.876014]  ffff888103349a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   16.876367] ==================================================================