Hay
Date
July 1, 2025, 3:08 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.217511] ==================================================================
[   19.218021] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   19.218078] Read of size 1 at addr fff00000c57eabd0 by task kunit_try_catch/260
[   19.218490] 
[   19.218597] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   19.218776] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.218837] Hardware name: linux,dummy-virt (DT)
[   19.219203] Call trace:
[   19.219272]  show_stack+0x20/0x38 (C)
[   19.219368]  dump_stack_lvl+0x8c/0xd0
[   19.219496]  print_report+0x118/0x608
[   19.219585]  kasan_report+0xdc/0x128
[   19.219744]  __asan_report_load1_noabort+0x20/0x30
[   19.219968]  kasan_strings+0x95c/0xb00
[   19.220190]  kunit_try_run_case+0x170/0x3f0
[   19.220297]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.220407]  kthread+0x328/0x630
[   19.220550]  ret_from_fork+0x10/0x20
[   19.220644] 
[   19.220705] Allocated by task 260:
[   19.220806]  kasan_save_stack+0x3c/0x68
[   19.220865]  kasan_save_track+0x20/0x40
[   19.220942]  kasan_save_alloc_info+0x40/0x58
[   19.221124]  __kasan_kmalloc+0xd4/0xd8
[   19.221332]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.221419]  kasan_strings+0xc8/0xb00
[   19.221543]  kunit_try_run_case+0x170/0x3f0
[   19.221640]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.221768]  kthread+0x328/0x630
[   19.221807]  ret_from_fork+0x10/0x20
[   19.221868] 
[   19.221890] Freed by task 260:
[   19.222048]  kasan_save_stack+0x3c/0x68
[   19.222255]  kasan_save_track+0x20/0x40
[   19.222326]  kasan_save_free_info+0x4c/0x78
[   19.222682]  __kasan_slab_free+0x6c/0x98
[   19.222787]  kfree+0x214/0x3c8
[   19.222962]  kasan_strings+0x24c/0xb00
[   19.223070]  kunit_try_run_case+0x170/0x3f0
[   19.223199]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.223248]  kthread+0x328/0x630
[   19.223300]  ret_from_fork+0x10/0x20
[   19.223341] 
[   19.223372] The buggy address belongs to the object at fff00000c57eabc0
[   19.223372]  which belongs to the cache kmalloc-32 of size 32
[   19.223443] The buggy address is located 16 bytes inside of
[   19.223443]  freed 32-byte region [fff00000c57eabc0, fff00000c57eabe0)
[   19.223517] 
[   19.223546] The buggy address belongs to the physical page:
[   19.223868] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1057ea
[   19.223996] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.224067] page_type: f5(slab)
[   19.224110] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.224308] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.224506] page dumped because: kasan: bad access detected
[   19.224689] 
[   19.224748] Memory state around the buggy address:
[   19.224889]  fff00000c57eaa80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.224972]  fff00000c57eab00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.225062] >fff00000c57eab80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.225262]                                                  ^
[   19.225456]  fff00000c57eac00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.225624]  fff00000c57eac80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.225693] ==================================================================

[   13.591381] ==================================================================
[   13.591751] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   13.592209] Read of size 1 at addr ffff8881033c1910 by task kunit_try_catch/276
[   13.592752] 
[   13.592851] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.592896] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.592908] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.592929] Call Trace:
[   13.592942]  <TASK>
[   13.592961]  dump_stack_lvl+0x73/0xb0
[   13.592990]  print_report+0xd1/0x650
[   13.593013]  ? __virt_addr_valid+0x1db/0x2d0
[   13.593048]  ? kasan_strings+0xcbc/0xe80
[   13.593067]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.593089]  ? kasan_strings+0xcbc/0xe80
[   13.593109]  kasan_report+0x141/0x180
[   13.593130]  ? kasan_strings+0xcbc/0xe80
[   13.593155]  __asan_report_load1_noabort+0x18/0x20
[   13.593178]  kasan_strings+0xcbc/0xe80
[   13.593198]  ? trace_hardirqs_on+0x37/0xe0
[   13.593222]  ? __pfx_kasan_strings+0x10/0x10
[   13.593241]  ? finish_task_switch.isra.0+0x153/0x700
[   13.593262]  ? __switch_to+0x47/0xf50
[   13.593288]  ? __schedule+0x10cc/0x2b60
[   13.593311]  ? __pfx_read_tsc+0x10/0x10
[   13.593334]  ? ktime_get_ts64+0x86/0x230
[   13.593358]  kunit_try_run_case+0x1a5/0x480
[   13.593383]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.593404]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.593427]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.593449]  ? __kthread_parkme+0x82/0x180
[   13.593469]  ? preempt_count_sub+0x50/0x80
[   13.593491]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.593514]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.593536]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.593559]  kthread+0x337/0x6f0
[   13.593577]  ? trace_preempt_on+0x20/0xc0
[   13.593598]  ? __pfx_kthread+0x10/0x10
[   13.593618]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.593638]  ? calculate_sigpending+0x7b/0xa0
[   13.593661]  ? __pfx_kthread+0x10/0x10
[   13.593682]  ret_from_fork+0x116/0x1d0
[   13.593700]  ? __pfx_kthread+0x10/0x10
[   13.593720]  ret_from_fork_asm+0x1a/0x30
[   13.593749]  </TASK>
[   13.593760] 
[   13.601632] Allocated by task 276:
[   13.601798]  kasan_save_stack+0x45/0x70
[   13.601991]  kasan_save_track+0x18/0x40
[   13.602159]  kasan_save_alloc_info+0x3b/0x50
[   13.602362]  __kasan_kmalloc+0xb7/0xc0
[   13.602807]  __kmalloc_cache_noprof+0x189/0x420
[   13.603052]  kasan_strings+0xc0/0xe80
[   13.603201]  kunit_try_run_case+0x1a5/0x480
[   13.603409]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.603619]  kthread+0x337/0x6f0
[   13.603863]  ret_from_fork+0x116/0x1d0
[   13.604051]  ret_from_fork_asm+0x1a/0x30
[   13.604220] 
[   13.604289] Freed by task 276:
[   13.604402]  kasan_save_stack+0x45/0x70
[   13.604594]  kasan_save_track+0x18/0x40
[   13.604787]  kasan_save_free_info+0x3f/0x60
[   13.605001]  __kasan_slab_free+0x56/0x70
[   13.605143]  kfree+0x222/0x3f0
[   13.605487]  kasan_strings+0x2aa/0xe80
[   13.605720]  kunit_try_run_case+0x1a5/0x480
[   13.605926]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.606164]  kthread+0x337/0x6f0
[   13.606318]  ret_from_fork+0x116/0x1d0
[   13.606479]  ret_from_fork_asm+0x1a/0x30
[   13.606656] 
[   13.606747] The buggy address belongs to the object at ffff8881033c1900
[   13.606747]  which belongs to the cache kmalloc-32 of size 32
[   13.607249] The buggy address is located 16 bytes inside of
[   13.607249]  freed 32-byte region [ffff8881033c1900, ffff8881033c1920)
[   13.607803] 
[   13.608091] The buggy address belongs to the physical page:
[   13.608295] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1033c1
[   13.608709] flags: 0x200000000000000(node=0|zone=2)
[   13.608916] page_type: f5(slab)
[   13.609074] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.609409] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.609782] page dumped because: kasan: bad access detected
[   13.610002] 
[   13.610083] Memory state around the buggy address:
[   13.610238]  ffff8881033c1800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.610452]  ffff8881033c1880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.610682] >ffff8881033c1900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.611046]                          ^
[   13.611228]  ffff8881033c1980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.611554]  ffff8881033c1a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.611978] ==================================================================