Hay
Date
July 6, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.491006] ==================================================================
[   20.491126] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   20.491182] Read of size 1 at addr fff00000c56d5090 by task kunit_try_catch/259
[   20.491475] 
[   20.491584] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.491705] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.491776] Hardware name: linux,dummy-virt (DT)
[   20.491814] Call trace:
[   20.491839]  show_stack+0x20/0x38 (C)
[   20.491891]  dump_stack_lvl+0x8c/0xd0
[   20.492104]  print_report+0x118/0x608
[   20.492171]  kasan_report+0xdc/0x128
[   20.492453]  __asan_report_load1_noabort+0x20/0x30
[   20.492531]  kasan_strings+0x95c/0xb00
[   20.492578]  kunit_try_run_case+0x170/0x3f0
[   20.492930]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.493101]  kthread+0x328/0x630
[   20.493177]  ret_from_fork+0x10/0x20
[   20.493281] 
[   20.493310] Allocated by task 259:
[   20.493339]  kasan_save_stack+0x3c/0x68
[   20.493391]  kasan_save_track+0x20/0x40
[   20.493512]  kasan_save_alloc_info+0x40/0x58
[   20.493690]  __kasan_kmalloc+0xd4/0xd8
[   20.493864]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.493940]  kasan_strings+0xc8/0xb00
[   20.494049]  kunit_try_run_case+0x170/0x3f0
[   20.494304]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.494362]  kthread+0x328/0x630
[   20.494743]  ret_from_fork+0x10/0x20
[   20.494934] 
[   20.495016] Freed by task 259:
[   20.495111]  kasan_save_stack+0x3c/0x68
[   20.495229]  kasan_save_track+0x20/0x40
[   20.495497]  kasan_save_free_info+0x4c/0x78
[   20.495591]  __kasan_slab_free+0x6c/0x98
[   20.495769]  kfree+0x214/0x3c8
[   20.495907]  kasan_strings+0x24c/0xb00
[   20.496006]  kunit_try_run_case+0x170/0x3f0
[   20.496172]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.496282]  kthread+0x328/0x630
[   20.496412]  ret_from_fork+0x10/0x20
[   20.496859] 
[   20.496944] The buggy address belongs to the object at fff00000c56d5080
[   20.496944]  which belongs to the cache kmalloc-32 of size 32
[   20.497038] The buggy address is located 16 bytes inside of
[   20.497038]  freed 32-byte region [fff00000c56d5080, fff00000c56d50a0)
[   20.497179] 
[   20.497407] The buggy address belongs to the physical page:
[   20.497470] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1056d5
[   20.497766] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.497909] page_type: f5(slab)
[   20.497980] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.498174] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.498533] page dumped because: kasan: bad access detected
[   20.498588] 
[   20.498908] Memory state around the buggy address:
[   20.498977]  fff00000c56d4f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.499226]  fff00000c56d5000: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.499371] >fff00000c56d5080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.499481]                          ^
[   20.499865]  fff00000c56d5100: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.499925]  fff00000c56d5180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.500048] ==================================================================

[   13.556026] ==================================================================
[   13.556628] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   13.557253] Read of size 1 at addr ffff8881027a7e10 by task kunit_try_catch/276
[   13.557653] 
[   13.557749] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.557792] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.557806] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.557829] Call Trace:
[   13.557846]  <TASK>
[   13.557865]  dump_stack_lvl+0x73/0xb0
[   13.557894]  print_report+0xd1/0x650
[   13.557916]  ? __virt_addr_valid+0x1db/0x2d0
[   13.557953]  ? kasan_strings+0xcbc/0xe80
[   13.557974]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.557997]  ? kasan_strings+0xcbc/0xe80
[   13.558019]  kasan_report+0x141/0x180
[   13.558042]  ? kasan_strings+0xcbc/0xe80
[   13.558079]  __asan_report_load1_noabort+0x18/0x20
[   13.558104]  kasan_strings+0xcbc/0xe80
[   13.558124]  ? trace_hardirqs_on+0x37/0xe0
[   13.558147]  ? __pfx_kasan_strings+0x10/0x10
[   13.558168]  ? finish_task_switch.isra.0+0x153/0x700
[   13.558190]  ? __switch_to+0x47/0xf50
[   13.558215]  ? __schedule+0x10cc/0x2b60
[   13.558238]  ? __pfx_read_tsc+0x10/0x10
[   13.558258]  ? ktime_get_ts64+0x86/0x230
[   13.558282]  kunit_try_run_case+0x1a5/0x480
[   13.558306]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.558329]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.558353]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.558376]  ? __kthread_parkme+0x82/0x180
[   13.558397]  ? preempt_count_sub+0x50/0x80
[   13.558419]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.558443]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.558466]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.558491]  kthread+0x337/0x6f0
[   13.558563]  ? trace_preempt_on+0x20/0xc0
[   13.558591]  ? __pfx_kthread+0x10/0x10
[   13.558612]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.558635]  ? calculate_sigpending+0x7b/0xa0
[   13.558659]  ? __pfx_kthread+0x10/0x10
[   13.558681]  ret_from_fork+0x116/0x1d0
[   13.558701]  ? __pfx_kthread+0x10/0x10
[   13.558721]  ret_from_fork_asm+0x1a/0x30
[   13.558752]  </TASK>
[   13.558765] 
[   13.578251] Allocated by task 276:
[   13.578435]  kasan_save_stack+0x45/0x70
[   13.578624]  kasan_save_track+0x18/0x40
[   13.578799]  kasan_save_alloc_info+0x3b/0x50
[   13.578988]  __kasan_kmalloc+0xb7/0xc0
[   13.579163]  __kmalloc_cache_noprof+0x189/0x420
[   13.579317]  kasan_strings+0xc0/0xe80
[   13.580087]  kunit_try_run_case+0x1a5/0x480
[   13.580298]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.580900]  kthread+0x337/0x6f0
[   13.581090]  ret_from_fork+0x116/0x1d0
[   13.581417]  ret_from_fork_asm+0x1a/0x30
[   13.581810] 
[   13.581924] Freed by task 276:
[   13.582067]  kasan_save_stack+0x45/0x70
[   13.582391]  kasan_save_track+0x18/0x40
[   13.582804]  kasan_save_free_info+0x3f/0x60
[   13.583143]  __kasan_slab_free+0x56/0x70
[   13.583330]  kfree+0x222/0x3f0
[   13.583671]  kasan_strings+0x2aa/0xe80
[   13.583962]  kunit_try_run_case+0x1a5/0x480
[   13.584118]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.584741]  kthread+0x337/0x6f0
[   13.584903]  ret_from_fork+0x116/0x1d0
[   13.585319]  ret_from_fork_asm+0x1a/0x30
[   13.585701] 
[   13.585974] The buggy address belongs to the object at ffff8881027a7e00
[   13.585974]  which belongs to the cache kmalloc-32 of size 32
[   13.586652] The buggy address is located 16 bytes inside of
[   13.586652]  freed 32-byte region [ffff8881027a7e00, ffff8881027a7e20)
[   13.587356] 
[   13.587664] The buggy address belongs to the physical page:
[   13.587947] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027a7
[   13.588429] flags: 0x200000000000000(node=0|zone=2)
[   13.588914] page_type: f5(slab)
[   13.589070] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.589703] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000
[   13.590156] page dumped because: kasan: bad access detected
[   13.590534] 
[   13.590626] Memory state around the buggy address:
[   13.590970]  ffff8881027a7d00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.591438]  ffff8881027a7d80: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.591948] >ffff8881027a7e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.592449]                          ^
[   13.592623]  ffff8881027a7e80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.592924]  ffff8881027a7f00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.593650] ==================================================================