Hay
Date
July 10, 2025, 6:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   19.170279] ==================================================================
[   19.171058] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   19.171151] Read of size 1 at addr fff00000c5a4d450 by task kunit_try_catch/259
[   19.171222] 
[   19.171282] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.171537] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.171767] Hardware name: linux,dummy-virt (DT)
[   19.171866] Call trace:
[   19.171904]  show_stack+0x20/0x38 (C)
[   19.172114]  dump_stack_lvl+0x8c/0xd0
[   19.172385]  print_report+0x118/0x608
[   19.172628]  kasan_report+0xdc/0x128
[   19.172718]  __asan_report_load1_noabort+0x20/0x30
[   19.172871]  kasan_strings+0x95c/0xb00
[   19.173274]  kunit_try_run_case+0x170/0x3f0
[   19.173482]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.173649]  kthread+0x328/0x630
[   19.173747]  ret_from_fork+0x10/0x20
[   19.174248] 
[   19.174401] Allocated by task 259:
[   19.174477]  kasan_save_stack+0x3c/0x68
[   19.174605]  kasan_save_track+0x20/0x40
[   19.174777]  kasan_save_alloc_info+0x40/0x58
[   19.174950]  __kasan_kmalloc+0xd4/0xd8
[   19.175117]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.175223]  kasan_strings+0xc8/0xb00
[   19.175332]  kunit_try_run_case+0x170/0x3f0
[   19.175657]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.175805]  kthread+0x328/0x630
[   19.175882]  ret_from_fork+0x10/0x20
[   19.175928] 
[   19.175978] Freed by task 259:
[   19.176141]  kasan_save_stack+0x3c/0x68
[   19.176370]  kasan_save_track+0x20/0x40
[   19.176465]  kasan_save_free_info+0x4c/0x78
[   19.176527]  __kasan_slab_free+0x6c/0x98
[   19.176686]  kfree+0x214/0x3c8
[   19.176847]  kasan_strings+0x24c/0xb00
[   19.176966]  kunit_try_run_case+0x170/0x3f0
[   19.177036]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.177087]  kthread+0x328/0x630
[   19.177124]  ret_from_fork+0x10/0x20
[   19.177179] 
[   19.177213] The buggy address belongs to the object at fff00000c5a4d440
[   19.177213]  which belongs to the cache kmalloc-32 of size 32
[   19.177286] The buggy address is located 16 bytes inside of
[   19.177286]  freed 32-byte region [fff00000c5a4d440, fff00000c5a4d460)
[   19.177372] 
[   19.177398] The buggy address belongs to the physical page:
[   19.177447] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a4d
[   19.177511] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.177562] page_type: f5(slab)
[   19.177603] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.177656] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.177700] page dumped because: kasan: bad access detected
[   19.177742] 
[   19.177769] Memory state around the buggy address:
[   19.177812]  fff00000c5a4d300: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.177867]  fff00000c5a4d380: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.178236] >fff00000c5a4d400: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.178564]                                                  ^
[   19.178658]  fff00000c5a4d480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.179174]  fff00000c5a4d500: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.179393] ==================================================================

[   14.427851] ==================================================================
[   14.428210] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   14.428486] Read of size 1 at addr ffff8881027b2750 by task kunit_try_catch/276
[   14.428742] 
[   14.428873] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.428918] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.428930] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.428951] Call Trace:
[   14.428966]  <TASK>
[   14.428980]  dump_stack_lvl+0x73/0xb0
[   14.429009]  print_report+0xd1/0x650
[   14.429043]  ? __virt_addr_valid+0x1db/0x2d0
[   14.429066]  ? kasan_strings+0xcbc/0xe80
[   14.429086]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.429109]  ? kasan_strings+0xcbc/0xe80
[   14.429131]  kasan_report+0x141/0x180
[   14.429152]  ? kasan_strings+0xcbc/0xe80
[   14.429177]  __asan_report_load1_noabort+0x18/0x20
[   14.429202]  kasan_strings+0xcbc/0xe80
[   14.429221]  ? trace_hardirqs_on+0x37/0xe0
[   14.429244]  ? __pfx_kasan_strings+0x10/0x10
[   14.429267]  ? __kasan_check_write+0x18/0x20
[   14.429286]  ? queued_spin_lock_slowpath+0x116/0xb40
[   14.429311]  ? irqentry_exit+0x2a/0x60
[   14.429332]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   14.429356]  ? trace_hardirqs_on+0x37/0xe0
[   14.429379]  ? __pfx_read_tsc+0x10/0x10
[   14.429399]  ? ktime_get_ts64+0x86/0x230
[   14.429423]  kunit_try_run_case+0x1a5/0x480
[   14.429447]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.429472]  ? queued_spin_lock_slowpath+0x116/0xb40
[   14.429496]  ? __kthread_parkme+0x82/0x180
[   14.429516]  ? preempt_count_sub+0x50/0x80
[   14.429540]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.429564]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.429589]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.429615]  kthread+0x337/0x6f0
[   14.429633]  ? trace_preempt_on+0x20/0xc0
[   14.429655]  ? __pfx_kthread+0x10/0x10
[   14.429675]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.429696]  ? calculate_sigpending+0x7b/0xa0
[   14.429720]  ? __pfx_kthread+0x10/0x10
[   14.429741]  ret_from_fork+0x116/0x1d0
[   14.429758]  ? __pfx_kthread+0x10/0x10
[   14.429779]  ret_from_fork_asm+0x1a/0x30
[   14.429841]  </TASK>
[   14.429853] 
[   14.438214] Allocated by task 276:
[   14.438399]  kasan_save_stack+0x45/0x70
[   14.438590]  kasan_save_track+0x18/0x40
[   14.438772]  kasan_save_alloc_info+0x3b/0x50
[   14.439354]  __kasan_kmalloc+0xb7/0xc0
[   14.439536]  __kmalloc_cache_noprof+0x189/0x420
[   14.439736]  kasan_strings+0xc0/0xe80
[   14.440533]  kunit_try_run_case+0x1a5/0x480
[   14.440728]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.441383]  kthread+0x337/0x6f0
[   14.441557]  ret_from_fork+0x116/0x1d0
[   14.441733]  ret_from_fork_asm+0x1a/0x30
[   14.441994] 
[   14.442101] Freed by task 276:
[   14.442241]  kasan_save_stack+0x45/0x70
[   14.442420]  kasan_save_track+0x18/0x40
[   14.442593]  kasan_save_free_info+0x3f/0x60
[   14.442780]  __kasan_slab_free+0x56/0x70
[   14.443315]  kfree+0x222/0x3f0
[   14.443476]  kasan_strings+0x2aa/0xe80
[   14.443652]  kunit_try_run_case+0x1a5/0x480
[   14.443939]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.444187]  kthread+0x337/0x6f0
[   14.444347]  ret_from_fork+0x116/0x1d0
[   14.444519]  ret_from_fork_asm+0x1a/0x30
[   14.444701] 
[   14.444788] The buggy address belongs to the object at ffff8881027b2740
[   14.444788]  which belongs to the cache kmalloc-32 of size 32
[   14.446013] The buggy address is located 16 bytes inside of
[   14.446013]  freed 32-byte region [ffff8881027b2740, ffff8881027b2760)
[   14.446671] 
[   14.446769] The buggy address belongs to the physical page:
[   14.447544] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027b2
[   14.447892] flags: 0x200000000000000(node=0|zone=2)
[   14.448309] page_type: f5(slab)
[   14.448476] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.448777] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.449171] page dumped because: kasan: bad access detected
[   14.449408] 
[   14.449497] Memory state around the buggy address:
[   14.449705]  ffff8881027b2600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.450533]  ffff8881027b2680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.450847] >ffff8881027b2700: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.451168]                                                  ^
[   14.451419]  ffff8881027b2780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.451714]  ffff8881027b2800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.452081] ==================================================================