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

Environment
qemu-arm64
qemu-x86_64

[   19.180790] ==================================================================
[   19.180852] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   19.180904] Read of size 1 at addr fff00000c5a4d450 by task kunit_try_catch/259
[   19.181108] 
[   19.181191] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.181283] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.181480] Hardware name: linux,dummy-virt (DT)
[   19.181643] Call trace:
[   19.181675]  show_stack+0x20/0x38 (C)
[   19.181731]  dump_stack_lvl+0x8c/0xd0
[   19.182214]  print_report+0x118/0x608
[   19.182458]  kasan_report+0xdc/0x128
[   19.182523]  __asan_report_load1_noabort+0x20/0x30
[   19.182779]  strlen+0xa8/0xb0
[   19.182971]  kasan_strings+0x418/0xb00
[   19.183183]  kunit_try_run_case+0x170/0x3f0
[   19.183540]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.183746]  kthread+0x328/0x630
[   19.183850]  ret_from_fork+0x10/0x20
[   19.184041] 
[   19.184356] Allocated by task 259:
[   19.184624]  kasan_save_stack+0x3c/0x68
[   19.184785]  kasan_save_track+0x20/0x40
[   19.184874]  kasan_save_alloc_info+0x40/0x58
[   19.185172]  __kasan_kmalloc+0xd4/0xd8
[   19.185228]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.185569]  kasan_strings+0xc8/0xb00
[   19.186029]  kunit_try_run_case+0x170/0x3f0
[   19.186150]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.186242]  kthread+0x328/0x630
[   19.186280]  ret_from_fork+0x10/0x20
[   19.186359] 
[   19.186382] Freed by task 259:
[   19.186684]  kasan_save_stack+0x3c/0x68
[   19.186784]  kasan_save_track+0x20/0x40
[   19.186872]  kasan_save_free_info+0x4c/0x78
[   19.187023]  __kasan_slab_free+0x6c/0x98
[   19.187117]  kfree+0x214/0x3c8
[   19.187241]  kasan_strings+0x24c/0xb00
[   19.187487]  kunit_try_run_case+0x170/0x3f0
[   19.187712]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.187854]  kthread+0x328/0x630
[   19.188014]  ret_from_fork+0x10/0x20
[   19.188112] 
[   19.188239] The buggy address belongs to the object at fff00000c5a4d440
[   19.188239]  which belongs to the cache kmalloc-32 of size 32
[   19.188334] The buggy address is located 16 bytes inside of
[   19.188334]  freed 32-byte region [fff00000c5a4d440, fff00000c5a4d460)
[   19.188529] 
[   19.188564] The buggy address belongs to the physical page:
[   19.188835] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a4d
[   19.188987] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.189148] page_type: f5(slab)
[   19.189257] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.189330] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.189656] page dumped because: kasan: bad access detected
[   19.189773] 
[   19.189807] Memory state around the buggy address:
[   19.189850]  fff00000c5a4d300: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.189897]  fff00000c5a4d380: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.189995] >fff00000c5a4d400: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.190039]                                                  ^
[   19.190079]  fff00000c5a4d480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.190440]  fff00000c5a4d500: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.190592] ==================================================================

[   14.452529] ==================================================================
[   14.453389] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   14.454072] Read of size 1 at addr ffff8881027b2750 by task kunit_try_catch/276
[   14.454622] 
[   14.455163] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.455212] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.455225] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.455246] Call Trace:
[   14.455262]  <TASK>
[   14.455284]  dump_stack_lvl+0x73/0xb0
[   14.455313]  print_report+0xd1/0x650
[   14.455335]  ? __virt_addr_valid+0x1db/0x2d0
[   14.455357]  ? strlen+0x8f/0xb0
[   14.455373]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.455397]  ? strlen+0x8f/0xb0
[   14.455414]  kasan_report+0x141/0x180
[   14.455438]  ? strlen+0x8f/0xb0
[   14.455461]  __asan_report_load1_noabort+0x18/0x20
[   14.455486]  strlen+0x8f/0xb0
[   14.455504]  kasan_strings+0x57b/0xe80
[   14.455524]  ? trace_hardirqs_on+0x37/0xe0
[   14.455547]  ? __pfx_kasan_strings+0x10/0x10
[   14.455570]  ? __kasan_check_write+0x18/0x20
[   14.455590]  ? queued_spin_lock_slowpath+0x116/0xb40
[   14.455613]  ? irqentry_exit+0x2a/0x60
[   14.455635]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   14.455661]  ? trace_hardirqs_on+0x37/0xe0
[   14.455682]  ? __pfx_read_tsc+0x10/0x10
[   14.455703]  ? ktime_get_ts64+0x86/0x230
[   14.455727]  kunit_try_run_case+0x1a5/0x480
[   14.455751]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.455776]  ? queued_spin_lock_slowpath+0x116/0xb40
[   14.455800]  ? __kthread_parkme+0x82/0x180
[   14.455874]  ? preempt_count_sub+0x50/0x80
[   14.455899]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.455924]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.455970]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.455996]  kthread+0x337/0x6f0
[   14.456015]  ? trace_preempt_on+0x20/0xc0
[   14.456050]  ? __pfx_kthread+0x10/0x10
[   14.456070]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.456091]  ? calculate_sigpending+0x7b/0xa0
[   14.456116]  ? __pfx_kthread+0x10/0x10
[   14.456136]  ret_from_fork+0x116/0x1d0
[   14.456154]  ? __pfx_kthread+0x10/0x10
[   14.456175]  ret_from_fork_asm+0x1a/0x30
[   14.456205]  </TASK>
[   14.456215] 
[   14.466977] Allocated by task 276:
[   14.467349]  kasan_save_stack+0x45/0x70
[   14.467538]  kasan_save_track+0x18/0x40
[   14.467726]  kasan_save_alloc_info+0x3b/0x50
[   14.468213]  __kasan_kmalloc+0xb7/0xc0
[   14.468400]  __kmalloc_cache_noprof+0x189/0x420
[   14.468578]  kasan_strings+0xc0/0xe80
[   14.468762]  kunit_try_run_case+0x1a5/0x480
[   14.469328]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.469546]  kthread+0x337/0x6f0
[   14.469718]  ret_from_fork+0x116/0x1d0
[   14.470150]  ret_from_fork_asm+0x1a/0x30
[   14.470343] 
[   14.470446] Freed by task 276:
[   14.470584]  kasan_save_stack+0x45/0x70
[   14.470766]  kasan_save_track+0x18/0x40
[   14.471308]  kasan_save_free_info+0x3f/0x60
[   14.471482]  __kasan_slab_free+0x56/0x70
[   14.471777]  kfree+0x222/0x3f0
[   14.472005]  kasan_strings+0x2aa/0xe80
[   14.472219]  kunit_try_run_case+0x1a5/0x480
[   14.472403]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.472618]  kthread+0x337/0x6f0
[   14.472785]  ret_from_fork+0x116/0x1d0
[   14.473365]  ret_from_fork_asm+0x1a/0x30
[   14.473525] 
[   14.473621] The buggy address belongs to the object at ffff8881027b2740
[   14.473621]  which belongs to the cache kmalloc-32 of size 32
[   14.474319] The buggy address is located 16 bytes inside of
[   14.474319]  freed 32-byte region [ffff8881027b2740, ffff8881027b2760)
[   14.474788] 
[   14.475300] The buggy address belongs to the physical page:
[   14.475507] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027b2
[   14.475858] flags: 0x200000000000000(node=0|zone=2)
[   14.476345] page_type: f5(slab)
[   14.476510] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.476868] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.477253] page dumped because: kasan: bad access detected
[   14.477493] 
[   14.477564] Memory state around the buggy address:
[   14.477769]  ffff8881027b2600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.478498]  ffff8881027b2680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.478791] >ffff8881027b2700: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.479262]                                                  ^
[   14.479519]  ffff8881027b2780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.479819]  ffff8881027b2800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.480250] ==================================================================