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

Environment
qemu-arm64
qemu-x86_64

[   22.248172] ==================================================================
[   22.248795] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   22.249495] Read of size 1 at addr fff00000c6cfdcd0 by task kunit_try_catch/246
[   22.250148] 
[   22.250562] CPU: 0 UID: 0 PID: 246 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   22.250799] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.250895] Hardware name: linux,dummy-virt (DT)
[   22.250994] Call trace:
[   22.251061]  dump_backtrace+0x9c/0x128
[   22.251219]  show_stack+0x20/0x38
[   22.251321]  dump_stack_lvl+0x8c/0xd0
[   22.251403]  print_report+0x118/0x5f0
[   22.251473]  kasan_report+0xdc/0x128
[   22.251543]  __asan_report_load1_noabort+0x20/0x30
[   22.251641]  strlen+0xa8/0xb0
[   22.251728]  kasan_strings+0x334/0x938
[   22.251810]  kunit_try_run_case+0x170/0x3f0
[   22.251888]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.251991]  kthread+0x24c/0x2d0
[   22.252077]  ret_from_fork+0x10/0x20
[   22.252159] 
[   22.258084] Allocated by task 246:
[   22.258427]  kasan_save_stack+0x3c/0x68
[   22.258814]  kasan_save_track+0x20/0x40
[   22.259571]  kasan_save_alloc_info+0x40/0x58
[   22.260289]  __kasan_kmalloc+0xd4/0xd8
[   22.261185]  __kmalloc_cache_noprof+0x154/0x320
[   22.262087]  kasan_strings+0xb0/0x938
[   22.262614]  kunit_try_run_case+0x170/0x3f0
[   22.263513]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.264047]  kthread+0x24c/0x2d0
[   22.264533]  ret_from_fork+0x10/0x20
[   22.264918] 
[   22.265222] Freed by task 246:
[   22.265563]  kasan_save_stack+0x3c/0x68
[   22.266061]  kasan_save_track+0x20/0x40
[   22.266475]  kasan_save_free_info+0x4c/0x78
[   22.266991]  __kasan_slab_free+0x6c/0x98
[   22.267508]  kfree+0x110/0x3b8
[   22.267943]  kasan_strings+0x128/0x938
[   22.268301]  kunit_try_run_case+0x170/0x3f0
[   22.268711]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.269160]  kthread+0x24c/0x2d0
[   22.270069]  ret_from_fork+0x10/0x20
[   22.270540] 
[   22.271167] The buggy address belongs to the object at fff00000c6cfdcc0
[   22.271167]  which belongs to the cache kmalloc-32 of size 32
[   22.272697] The buggy address is located 16 bytes inside of
[   22.272697]  freed 32-byte region [fff00000c6cfdcc0, fff00000c6cfdce0)
[   22.273359] 
[   22.273575] The buggy address belongs to the physical page:
[   22.274167] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106cfd
[   22.275136] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   22.275573] page_type: f5(slab)
[   22.275895] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   22.276721] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   22.277428] page dumped because: kasan: bad access detected
[   22.278689] 
[   22.278829] Memory state around the buggy address:
[   22.279009]  fff00000c6cfdb80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   22.280128]  fff00000c6cfdc00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   22.280964] >fff00000c6cfdc80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   22.281655]                                                  ^
[   22.282258]  fff00000c6cfdd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.282820]  fff00000c6cfdd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.283638] ==================================================================

[   14.092780] ==================================================================
[   14.092999] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   14.093125] Read of size 1 at addr ffff888102632890 by task kunit_try_catch/264
[   14.093248] 
[   14.093307] CPU: 0 UID: 0 PID: 264 Comm: kunit_try_catch Tainted: G    B            N 6.12.32-rc1 #1
[   14.093346] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.093358] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.093377] Call Trace:
[   14.093392]  <TASK>
[   14.093408]  dump_stack_lvl+0x73/0xb0
[   14.093429]  print_report+0xd1/0x640
[   14.093451]  ? __virt_addr_valid+0x1db/0x2d0
[   14.093472]  ? strlen+0x8f/0xb0
[   14.093489]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.093510]  ? strlen+0x8f/0xb0
[   14.093529]  kasan_report+0x140/0x180
[   14.093550]  ? strlen+0x8f/0xb0
[   14.093572]  __asan_report_load1_noabort+0x18/0x20
[   14.093591]  strlen+0x8f/0xb0
[   14.093610]  kasan_strings+0x432/0xb60
[   14.093630]  ? __pfx_kasan_strings+0x10/0x10
[   14.093650]  ? __schedule+0xc49/0x27a0
[   14.093698]  ? __pfx_read_tsc+0x10/0x10
[   14.093718]  ? ktime_get_ts64+0x84/0x230
[   14.093744]  kunit_try_run_case+0x1a6/0x480
[   14.093764]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.093783]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   14.093802]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.093825]  ? __kthread_parkme+0x82/0x160
[   14.093844]  ? preempt_count_sub+0x50/0x80
[   14.093865]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.093885]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.093919]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.093945]  kthread+0x257/0x310
[   14.093963]  ? __pfx_kthread+0x10/0x10
[   14.093983]  ret_from_fork+0x41/0x80
[   14.094002]  ? __pfx_kthread+0x10/0x10
[   14.094022]  ret_from_fork_asm+0x1a/0x30
[   14.094064]  </TASK>
[   14.094078] 
[   14.099513] Allocated by task 264:
[   14.099689]  kasan_save_stack+0x45/0x70
[   14.099846]  kasan_save_track+0x18/0x40
[   14.100013]  kasan_save_alloc_info+0x3b/0x50
[   14.100201]  __kasan_kmalloc+0xb7/0xc0
[   14.100384]  __kmalloc_cache_noprof+0x168/0x350
[   14.100572]  kasan_strings+0xb3/0xb60
[   14.100717]  kunit_try_run_case+0x1a6/0x480
[   14.100808]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.100911]  kthread+0x257/0x310
[   14.100986]  ret_from_fork+0x41/0x80
[   14.101085]  ret_from_fork_asm+0x1a/0x30
[   14.101172] 
[   14.101220] Freed by task 264:
[   14.101289]  kasan_save_stack+0x45/0x70
[   14.101373]  kasan_save_track+0x18/0x40
[   14.101454]  kasan_save_free_info+0x3f/0x60
[   14.101549]  __kasan_slab_free+0x56/0x70
[   14.101724]  kfree+0x123/0x3d0
[   14.101894]  kasan_strings+0x13a/0xb60
[   14.102145]  kunit_try_run_case+0x1a6/0x480
[   14.102387]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.102685]  kthread+0x257/0x310
[   14.102872]  ret_from_fork+0x41/0x80
[   14.103098]  ret_from_fork_asm+0x1a/0x30
[   14.103324] 
[   14.103436] The buggy address belongs to the object at ffff888102632880
[   14.103436]  which belongs to the cache kmalloc-32 of size 32
[   14.104038] The buggy address is located 16 bytes inside of
[   14.104038]  freed 32-byte region [ffff888102632880, ffff8881026328a0)
[   14.104328] 
[   14.104381] The buggy address belongs to the physical page:
[   14.104503] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102632
[   14.104913] flags: 0x200000000000000(node=0|zone=2)
[   14.105165] page_type: f5(slab)
[   14.105314] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.105539] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   14.105794] page dumped because: kasan: bad access detected
[   14.105986] 
[   14.106038] Memory state around the buggy address:
[   14.106148]  ffff888102632780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.106271]  ffff888102632800: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.106387] >ffff888102632880: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   14.106501]                          ^
[   14.106577]  ffff888102632900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.106703]  ffff888102632980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.106820] ==================================================================