Hay
Date
July 23, 2025, 2:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   17.711806] ==================================================================
[   17.711880] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   17.713011] Read of size 1 at addr fff00000c3f8c510 by task kunit_try_catch/259
[   17.713100] 
[   17.713135] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT 
[   17.713291] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.713324] Hardware name: linux,dummy-virt (DT)
[   17.713384] Call trace:
[   17.713410]  show_stack+0x20/0x38 (C)
[   17.713516]  dump_stack_lvl+0x8c/0xd0
[   17.713581]  print_report+0x118/0x5d0
[   17.713633]  kasan_report+0xdc/0x128
[   17.713721]  __asan_report_load1_noabort+0x20/0x30
[   17.714146]  kasan_strings+0x95c/0xb00
[   17.714214]  kunit_try_run_case+0x170/0x3f0
[   17.714266]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.714330]  kthread+0x328/0x630
[   17.714375]  ret_from_fork+0x10/0x20
[   17.714743] 
[   17.714788] Allocated by task 259:
[   17.715170]  kasan_save_stack+0x3c/0x68
[   17.715294]  kasan_save_track+0x20/0x40
[   17.715360]  kasan_save_alloc_info+0x40/0x58
[   17.715565]  __kasan_kmalloc+0xd4/0xd8
[   17.715794]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.716043]  kasan_strings+0xc8/0xb00
[   17.716224]  kunit_try_run_case+0x170/0x3f0
[   17.716417]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.716686]  kthread+0x328/0x630
[   17.717025]  ret_from_fork+0x10/0x20
[   17.717233] 
[   17.717309] Freed by task 259:
[   17.717375]  kasan_save_stack+0x3c/0x68
[   17.717480]  kasan_save_track+0x20/0x40
[   17.717683]  kasan_save_free_info+0x4c/0x78
[   17.717895]  __kasan_slab_free+0x6c/0x98
[   17.718201]  kfree+0x214/0x3c8
[   17.718409]  kasan_strings+0x24c/0xb00
[   17.718504]  kunit_try_run_case+0x170/0x3f0
[   17.718689]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.718901]  kthread+0x328/0x630
[   17.719047]  ret_from_fork+0x10/0x20
[   17.719166] 
[   17.719209] The buggy address belongs to the object at fff00000c3f8c500
[   17.719209]  which belongs to the cache kmalloc-32 of size 32
[   17.719403] The buggy address is located 16 bytes inside of
[   17.719403]  freed 32-byte region [fff00000c3f8c500, fff00000c3f8c520)
[   17.719641] 
[   17.719737] The buggy address belongs to the physical page:
[   17.719883] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f8c
[   17.719967] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.720272] page_type: f5(slab)
[   17.720463] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   17.720550] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   17.720759] page dumped because: kasan: bad access detected
[   17.720940] 
[   17.720998] Memory state around the buggy address:
[   17.721101]  fff00000c3f8c400: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.721412]  fff00000c3f8c480: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.721691] >fff00000c3f8c500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   17.721786]                          ^
[   17.721822]  fff00000c3f8c580: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   17.722105]  fff00000c3f8c600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   17.722461] ==================================================================

[   14.504003] ==================================================================
[   14.504973] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   14.505696] Read of size 1 at addr ffff8881025e0a90 by task kunit_try_catch/276
[   14.506231] 
[   14.506338] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7 #1 PREEMPT(voluntary) 
[   14.506392] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.506405] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.506426] Call Trace:
[   14.506442]  <TASK>
[   14.506457]  dump_stack_lvl+0x73/0xb0
[   14.506487]  print_report+0xd1/0x610
[   14.506509]  ? __virt_addr_valid+0x1db/0x2d0
[   14.506532]  ? kasan_strings+0xcbc/0xe80
[   14.506554]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.506576]  ? kasan_strings+0xcbc/0xe80
[   14.506597]  kasan_report+0x141/0x180
[   14.506618]  ? kasan_strings+0xcbc/0xe80
[   14.506644]  __asan_report_load1_noabort+0x18/0x20
[   14.506667]  kasan_strings+0xcbc/0xe80
[   14.506687]  ? trace_hardirqs_on+0x37/0xe0
[   14.506710]  ? __pfx_kasan_strings+0x10/0x10
[   14.506730]  ? finish_task_switch.isra.0+0x153/0x700
[   14.506753]  ? __switch_to+0x47/0xf50
[   14.506778]  ? __schedule+0x10c6/0x2b60
[   14.506800]  ? __pfx_read_tsc+0x10/0x10
[   14.506836]  ? ktime_get_ts64+0x86/0x230
[   14.506860]  kunit_try_run_case+0x1a5/0x480
[   14.506884]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.506906]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.506929]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.506953]  ? __kthread_parkme+0x82/0x180
[   14.506973]  ? preempt_count_sub+0x50/0x80
[   14.506996]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.507019]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.507042]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.507066]  kthread+0x337/0x6f0
[   14.507086]  ? trace_preempt_on+0x20/0xc0
[   14.507121]  ? __pfx_kthread+0x10/0x10
[   14.507141]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.507163]  ? calculate_sigpending+0x7b/0xa0
[   14.507186]  ? __pfx_kthread+0x10/0x10
[   14.507206]  ret_from_fork+0x116/0x1d0
[   14.507225]  ? __pfx_kthread+0x10/0x10
[   14.507245]  ret_from_fork_asm+0x1a/0x30
[   14.507275]  </TASK>
[   14.507285] 
[   14.516669] Allocated by task 276:
[   14.516867]  kasan_save_stack+0x45/0x70
[   14.517060]  kasan_save_track+0x18/0x40
[   14.517442]  kasan_save_alloc_info+0x3b/0x50
[   14.517717]  __kasan_kmalloc+0xb7/0xc0
[   14.517871]  __kmalloc_cache_noprof+0x189/0x420
[   14.518184]  kasan_strings+0xc0/0xe80
[   14.518344]  kunit_try_run_case+0x1a5/0x480
[   14.518558]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.518790]  kthread+0x337/0x6f0
[   14.518977]  ret_from_fork+0x116/0x1d0
[   14.519146]  ret_from_fork_asm+0x1a/0x30
[   14.519290] 
[   14.519390] Freed by task 276:
[   14.519552]  kasan_save_stack+0x45/0x70
[   14.519726]  kasan_save_track+0x18/0x40
[   14.520468]  kasan_save_free_info+0x3f/0x60
[   14.520654]  __kasan_slab_free+0x56/0x70
[   14.520986]  kfree+0x222/0x3f0
[   14.521126]  kasan_strings+0x2aa/0xe80
[   14.521447]  kunit_try_run_case+0x1a5/0x480
[   14.521713]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.521920]  kthread+0x337/0x6f0
[   14.522089]  ret_from_fork+0x116/0x1d0
[   14.522438]  ret_from_fork_asm+0x1a/0x30
[   14.522638] 
[   14.522795] The buggy address belongs to the object at ffff8881025e0a80
[   14.522795]  which belongs to the cache kmalloc-32 of size 32
[   14.523469] The buggy address is located 16 bytes inside of
[   14.523469]  freed 32-byte region [ffff8881025e0a80, ffff8881025e0aa0)
[   14.524104] 
[   14.524366] The buggy address belongs to the physical page:
[   14.524588] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1025e0
[   14.525047] flags: 0x200000000000000(node=0|zone=2)
[   14.525386] page_type: f5(slab)
[   14.525517] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.526004] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.526369] page dumped because: kasan: bad access detected
[   14.526699] 
[   14.526780] Memory state around the buggy address:
[   14.526987]  ffff8881025e0980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.527489]  ffff8881025e0a00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.527858] >ffff8881025e0a80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.528153]                          ^
[   14.528468]  ffff8881025e0b00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.528733]  ffff8881025e0b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.529173] ==================================================================