Hay
Date
June 2, 2025, 2:11 p.m.

Environment
e850-96
qemu-x86_64

[   38.666061] ==================================================================
[   38.673159] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   38.679060] Read of size 1 at addr ffff00080394fc10 by task kunit_try_catch/306
[   38.686352] 
[   38.687835] CPU: 7 UID: 0 PID: 306 Comm: kunit_try_catch Tainted: G    B            N  6.15.1-rc1 #1 PREEMPT 
[   38.687887] Tainted: [B]=BAD_PAGE, [N]=TEST
[   38.687906] Hardware name: WinLink E850-96 board (DT)
[   38.687928] Call trace:
[   38.687941]  show_stack+0x20/0x38 (C)
[   38.687974]  dump_stack_lvl+0x8c/0xd0
[   38.688009]  print_report+0x118/0x608
[   38.688038]  kasan_report+0xdc/0x128
[   38.688068]  __asan_report_load1_noabort+0x20/0x30
[   38.688102]  strlen+0xa8/0xb0
[   38.688128]  kasan_strings+0x418/0xb00
[   38.688161]  kunit_try_run_case+0x170/0x3f0
[   38.688193]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   38.688231]  kthread+0x328/0x630
[   38.688262]  ret_from_fork+0x10/0x20
[   38.688295] 
[   38.753191] Allocated by task 306:
[   38.756577]  kasan_save_stack+0x3c/0x68
[   38.760396]  kasan_save_track+0x20/0x40
[   38.764215]  kasan_save_alloc_info+0x40/0x58
[   38.768469]  __kasan_kmalloc+0xd4/0xd8
[   38.772203]  __kmalloc_cache_noprof+0x16c/0x3c0
[   38.776715]  kasan_strings+0xc8/0xb00
[   38.780361]  kunit_try_run_case+0x170/0x3f0
[   38.784527]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   38.789996]  kthread+0x328/0x630
[   38.793208]  ret_from_fork+0x10/0x20
[   38.796767] 
[   38.798242] Freed by task 306:
[   38.801281]  kasan_save_stack+0x3c/0x68
[   38.805100]  kasan_save_track+0x20/0x40
[   38.808919]  kasan_save_free_info+0x4c/0x78
[   38.813086]  __kasan_slab_free+0x6c/0x98
[   38.816992]  kfree+0x214/0x3c8
[   38.820031]  kasan_strings+0x24c/0xb00
[   38.823763]  kunit_try_run_case+0x170/0x3f0
[   38.827929]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   38.833398]  kthread+0x328/0x630
[   38.836610]  ret_from_fork+0x10/0x20
[   38.840169] 
[   38.841645] The buggy address belongs to the object at ffff00080394fc00
[   38.841645]  which belongs to the cache kmalloc-32 of size 32
[   38.853971] The buggy address is located 16 bytes inside of
[   38.853971]  freed 32-byte region [ffff00080394fc00, ffff00080394fc20)
[   38.866037] 
[   38.867515] The buggy address belongs to the physical page:
[   38.873070] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x88394f
[   38.881056] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   38.887564] page_type: f5(slab)
[   38.890698] raw: 0bfffe0000000000 ffff000800002780 dead000000000122 0000000000000000
[   38.898421] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   38.906140] page dumped because: kasan: bad access detected
[   38.911695] 
[   38.913171] Memory state around the buggy address:
[   38.917950]  ffff00080394fb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   38.925154]  ffff00080394fb80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   38.932359] >ffff00080394fc00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   38.939560]                          ^
[   38.943296]  ffff00080394fc80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   38.950501]  ffff00080394fd00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   38.957702] ==================================================================

[   19.056811] ==================================================================
[   19.057421] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   19.057762] Read of size 1 at addr ffff888101e064d0 by task kunit_try_catch/280
[   19.058447] 
[   19.058675] CPU: 1 UID: 0 PID: 280 Comm: kunit_try_catch Tainted: G    B            N  6.15.1-rc1 #1 PREEMPT(voluntary) 
[   19.058787] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.058815] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   19.058861] Call Trace:
[   19.058899]  <TASK>
[   19.058941]  dump_stack_lvl+0x73/0xb0
[   19.059098]  print_report+0xd1/0x650
[   19.059217]  ? __virt_addr_valid+0x1db/0x2d0
[   19.059288]  ? strlen+0x8f/0xb0
[   19.059332]  ? kasan_complete_mode_report_info+0x64/0x200
[   19.059389]  ? strlen+0x8f/0xb0
[   19.059434]  kasan_report+0x141/0x180
[   19.059481]  ? strlen+0x8f/0xb0
[   19.059527]  __asan_report_load1_noabort+0x18/0x20
[   19.059572]  strlen+0x8f/0xb0
[   19.059607]  kasan_strings+0x57b/0xe80
[   19.059653]  ? trace_hardirqs_on+0x37/0xe0
[   19.059684]  ? __pfx_kasan_strings+0x10/0x10
[   19.059708]  ? finish_task_switch.isra.0+0x153/0x700
[   19.059742]  ? __switch_to+0x5d9/0xf60
[   19.059798]  ? dequeue_task_fair+0x166/0x4e0
[   19.059848]  ? __schedule+0x10cc/0x2b30
[   19.059896]  ? __pfx_read_tsc+0x10/0x10
[   19.059935]  ? ktime_get_ts64+0x86/0x230
[   19.060048]  kunit_try_run_case+0x1a5/0x480
[   19.060159]  ? __pfx_kunit_try_run_case+0x10/0x10
[   19.060223]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   19.060279]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   19.060331]  ? __kthread_parkme+0x82/0x180
[   19.060380]  ? preempt_count_sub+0x50/0x80
[   19.060419]  ? __pfx_kunit_try_run_case+0x10/0x10
[   19.060446]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   19.060472]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   19.060497]  kthread+0x337/0x6f0
[   19.060516]  ? trace_preempt_on+0x20/0xc0
[   19.060542]  ? __pfx_kthread+0x10/0x10
[   19.060562]  ? _raw_spin_unlock_irq+0x47/0x80
[   19.060585]  ? calculate_sigpending+0x7b/0xa0
[   19.060610]  ? __pfx_kthread+0x10/0x10
[   19.060631]  ret_from_fork+0x41/0x80
[   19.060655]  ? __pfx_kthread+0x10/0x10
[   19.060674]  ret_from_fork_asm+0x1a/0x30
[   19.060710]  </TASK>
[   19.060726] 
[   19.075559] Allocated by task 280:
[   19.076065]  kasan_save_stack+0x45/0x70
[   19.076440]  kasan_save_track+0x18/0x40
[   19.076647]  kasan_save_alloc_info+0x3b/0x50
[   19.076868]  __kasan_kmalloc+0xb7/0xc0
[   19.077076]  __kmalloc_cache_noprof+0x189/0x420
[   19.077789]  kasan_strings+0xc0/0xe80
[   19.078364]  kunit_try_run_case+0x1a5/0x480
[   19.078669]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   19.079099]  kthread+0x337/0x6f0
[   19.079679]  ret_from_fork+0x41/0x80
[   19.080013]  ret_from_fork_asm+0x1a/0x30
[   19.080562] 
[   19.080761] Freed by task 280:
[   19.081095]  kasan_save_stack+0x45/0x70
[   19.081541]  kasan_save_track+0x18/0x40
[   19.081820]  kasan_save_free_info+0x3f/0x60
[   19.082069]  __kasan_slab_free+0x56/0x70
[   19.082475]  kfree+0x222/0x3f0
[   19.082669]  kasan_strings+0x2aa/0xe80
[   19.083051]  kunit_try_run_case+0x1a5/0x480
[   19.083480]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   19.083740]  kthread+0x337/0x6f0
[   19.084339]  ret_from_fork+0x41/0x80
[   19.084876]  ret_from_fork_asm+0x1a/0x30
[   19.085421] 
[   19.085552] The buggy address belongs to the object at ffff888101e064c0
[   19.085552]  which belongs to the cache kmalloc-32 of size 32
[   19.086323] The buggy address is located 16 bytes inside of
[   19.086323]  freed 32-byte region [ffff888101e064c0, ffff888101e064e0)
[   19.087514] 
[   19.087663] The buggy address belongs to the physical page:
[   19.088492] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101e06
[   19.089250] flags: 0x200000000000000(node=0|zone=2)
[   19.089625] page_type: f5(slab)
[   19.090141] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   19.090587] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.091245] page dumped because: kasan: bad access detected
[   19.091858] 
[   19.091979] Memory state around the buggy address:
[   19.092307]  ffff888101e06380: 00 00 00 04 fc fc fc fc fa fb fb fb fc fc fc fc
[   19.092954]  ffff888101e06400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.093532] >ffff888101e06480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.094077]                                                  ^
[   19.094381]  ffff888101e06500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.094867]  ffff888101e06580: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.095195] ==================================================================