Hay
Date
July 9, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.848809] ==================================================================
[   18.848868] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   18.848921] Read of size 1 at addr fff00000c6460590 by task kunit_try_catch/259
[   18.848971] 
[   18.849007] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.849092] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.849135] Hardware name: linux,dummy-virt (DT)
[   18.850162] Call trace:
[   18.850193]  show_stack+0x20/0x38 (C)
[   18.850259]  dump_stack_lvl+0x8c/0xd0
[   18.850312]  print_report+0x118/0x608
[   18.850371]  kasan_report+0xdc/0x128
[   18.850419]  __asan_report_load1_noabort+0x20/0x30
[   18.850473]  kasan_strings+0x95c/0xb00
[   18.850517]  kunit_try_run_case+0x170/0x3f0
[   18.850568]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.850622]  kthread+0x328/0x630
[   18.850667]  ret_from_fork+0x10/0x20
[   18.850717] 
[   18.850740] Allocated by task 259:
[   18.850769]  kasan_save_stack+0x3c/0x68
[   18.851176]  kasan_save_track+0x20/0x40
[   18.851219]  kasan_save_alloc_info+0x40/0x58
[   18.851262]  __kasan_kmalloc+0xd4/0xd8
[   18.851300]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.851343]  kasan_strings+0xc8/0xb00
[   18.851381]  kunit_try_run_case+0x170/0x3f0
[   18.851425]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.851470]  kthread+0x328/0x630
[   18.851506]  ret_from_fork+0x10/0x20
[   18.851544] 
[   18.851564] Freed by task 259:
[   18.851594]  kasan_save_stack+0x3c/0x68
[   18.851633]  kasan_save_track+0x20/0x40
[   18.852413]  kasan_save_free_info+0x4c/0x78
[   18.852479]  __kasan_slab_free+0x6c/0x98
[   18.852690]  kfree+0x214/0x3c8
[   18.853012]  kasan_strings+0x24c/0xb00
[   18.853179]  kunit_try_run_case+0x170/0x3f0
[   18.853277]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.853479]  kthread+0x328/0x630
[   18.853882]  ret_from_fork+0x10/0x20
[   18.853958] 
[   18.854105] The buggy address belongs to the object at fff00000c6460580
[   18.854105]  which belongs to the cache kmalloc-32 of size 32
[   18.854292] The buggy address is located 16 bytes inside of
[   18.854292]  freed 32-byte region [fff00000c6460580, fff00000c64605a0)
[   18.854392] 
[   18.854474] The buggy address belongs to the physical page:
[   18.854652] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106460
[   18.854911] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.855820] page_type: f5(slab)
[   18.855913] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.855986] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.856065] page dumped because: kasan: bad access detected
[   18.856109] 
[   18.856151] Memory state around the buggy address:
[   18.856203]  fff00000c6460480: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.856252]  fff00000c6460500: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.856460] >fff00000c6460580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.856785]                          ^
[   18.857079]  fff00000c6460600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.857310]  fff00000c6460680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.857458] ==================================================================

[   14.474157] ==================================================================
[   14.474498] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   14.474967] Read of size 1 at addr ffff8881032060d0 by task kunit_try_catch/276
[   14.475341] 
[   14.475433] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.475474] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.475486] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.475507] Call Trace:
[   14.475520]  <TASK>
[   14.475533]  dump_stack_lvl+0x73/0xb0
[   14.475561]  print_report+0xd1/0x650
[   14.475583]  ? __virt_addr_valid+0x1db/0x2d0
[   14.475605]  ? kasan_strings+0xcbc/0xe80
[   14.475625]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.475649]  ? kasan_strings+0xcbc/0xe80
[   14.475669]  kasan_report+0x141/0x180
[   14.475690]  ? kasan_strings+0xcbc/0xe80
[   14.475727]  __asan_report_load1_noabort+0x18/0x20
[   14.475752]  kasan_strings+0xcbc/0xe80
[   14.475771]  ? trace_hardirqs_on+0x37/0xe0
[   14.475796]  ? __pfx_kasan_strings+0x10/0x10
[   14.475817]  ? finish_task_switch.isra.0+0x153/0x700
[   14.475841]  ? __switch_to+0x47/0xf50
[   14.475866]  ? __schedule+0x10cc/0x2b60
[   14.475887]  ? __pfx_read_tsc+0x10/0x10
[   14.475909]  ? ktime_get_ts64+0x86/0x230
[   14.475932]  kunit_try_run_case+0x1a5/0x480
[   14.475956]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.475980]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.476003]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.476028]  ? __kthread_parkme+0x82/0x180
[   14.476048]  ? preempt_count_sub+0x50/0x80
[   14.476071]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.476095]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.476144]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.476169]  kthread+0x337/0x6f0
[   14.476188]  ? trace_preempt_on+0x20/0xc0
[   14.476212]  ? __pfx_kthread+0x10/0x10
[   14.476233]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.476255]  ? calculate_sigpending+0x7b/0xa0
[   14.476278]  ? __pfx_kthread+0x10/0x10
[   14.476299]  ret_from_fork+0x116/0x1d0
[   14.476321]  ? __pfx_kthread+0x10/0x10
[   14.476341]  ret_from_fork_asm+0x1a/0x30
[   14.476371]  </TASK>
[   14.476381] 
[   14.483745] Allocated by task 276:
[   14.483914]  kasan_save_stack+0x45/0x70
[   14.484114]  kasan_save_track+0x18/0x40
[   14.484275]  kasan_save_alloc_info+0x3b/0x50
[   14.484489]  __kasan_kmalloc+0xb7/0xc0
[   14.484654]  __kmalloc_cache_noprof+0x189/0x420
[   14.484861]  kasan_strings+0xc0/0xe80
[   14.484991]  kunit_try_run_case+0x1a5/0x480
[   14.485389]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.485629]  kthread+0x337/0x6f0
[   14.485759]  ret_from_fork+0x116/0x1d0
[   14.485890]  ret_from_fork_asm+0x1a/0x30
[   14.486107] 
[   14.486201] Freed by task 276:
[   14.486358]  kasan_save_stack+0x45/0x70
[   14.486550]  kasan_save_track+0x18/0x40
[   14.486750]  kasan_save_free_info+0x3f/0x60
[   14.486945]  __kasan_slab_free+0x56/0x70
[   14.487184]  kfree+0x222/0x3f0
[   14.487344]  kasan_strings+0x2aa/0xe80
[   14.487510]  kunit_try_run_case+0x1a5/0x480
[   14.487681]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.487940]  kthread+0x337/0x6f0
[   14.488116]  ret_from_fork+0x116/0x1d0
[   14.488281]  ret_from_fork_asm+0x1a/0x30
[   14.488436] 
[   14.488526] The buggy address belongs to the object at ffff8881032060c0
[   14.488526]  which belongs to the cache kmalloc-32 of size 32
[   14.488944] The buggy address is located 16 bytes inside of
[   14.488944]  freed 32-byte region [ffff8881032060c0, ffff8881032060e0)
[   14.489688] 
[   14.489883] The buggy address belongs to the physical page:
[   14.490056] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103206
[   14.490383] flags: 0x200000000000000(node=0|zone=2)
[   14.490615] page_type: f5(slab)
[   14.490934] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.491271] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.491528] page dumped because: kasan: bad access detected
[   14.491794] 
[   14.491891] Memory state around the buggy address:
[   14.492288]  ffff888103205f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.492558]  ffff888103206000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.492869] >ffff888103206080: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.493211]                                                  ^
[   14.493396]  ffff888103206100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.493612]  ffff888103206180: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.494880] ==================================================================