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

Environment
qemu-arm64
qemu-x86_64

[   18.858786] ==================================================================
[   18.858846] BUG: KASAN: slab-use-after-free in strlen+0xa8/0xb0
[   18.858901] Read of size 1 at addr fff00000c6460590 by task kunit_try_catch/259
[   18.858992] 
[   18.859039] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   18.859148] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.859179] Hardware name: linux,dummy-virt (DT)
[   18.859213] Call trace:
[   18.859248]  show_stack+0x20/0x38 (C)
[   18.859302]  dump_stack_lvl+0x8c/0xd0
[   18.859352]  print_report+0x118/0x608
[   18.859402]  kasan_report+0xdc/0x128
[   18.859452]  __asan_report_load1_noabort+0x20/0x30
[   18.859509]  strlen+0xa8/0xb0
[   18.859553]  kasan_strings+0x418/0xb00
[   18.859600]  kunit_try_run_case+0x170/0x3f0
[   18.859657]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.859711]  kthread+0x328/0x630
[   18.859766]  ret_from_fork+0x10/0x20
[   18.859817] 
[   18.859838] Allocated by task 259:
[   18.859868]  kasan_save_stack+0x3c/0x68
[   18.859909]  kasan_save_track+0x20/0x40
[   18.859949]  kasan_save_alloc_info+0x40/0x58
[   18.860000]  __kasan_kmalloc+0xd4/0xd8
[   18.860047]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.860087]  kasan_strings+0xc8/0xb00
[   18.860142]  kunit_try_run_case+0x170/0x3f0
[   18.860181]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.860227]  kthread+0x328/0x630
[   18.860262]  ret_from_fork+0x10/0x20
[   18.860300] 
[   18.860320] Freed by task 259:
[   18.860357]  kasan_save_stack+0x3c/0x68
[   18.860405]  kasan_save_track+0x20/0x40
[   18.860450]  kasan_save_free_info+0x4c/0x78
[   18.860491]  __kasan_slab_free+0x6c/0x98
[   18.860530]  kfree+0x214/0x3c8
[   18.860565]  kasan_strings+0x24c/0xb00
[   18.860603]  kunit_try_run_case+0x170/0x3f0
[   18.860641]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.860686]  kthread+0x328/0x630
[   18.860719]  ret_from_fork+0x10/0x20
[   18.860757] 
[   18.860778] The buggy address belongs to the object at fff00000c6460580
[   18.860778]  which belongs to the cache kmalloc-32 of size 32
[   18.860837] The buggy address is located 16 bytes inside of
[   18.860837]  freed 32-byte region [fff00000c6460580, fff00000c64605a0)
[   18.860909] 
[   18.860936] The buggy address belongs to the physical page:
[   18.860970] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106460
[   18.861026] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.861080] page_type: f5(slab)
[   18.861599] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.862082] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.862182] page dumped because: kasan: bad access detected
[   18.862218] 
[   18.862270] Memory state around the buggy address:
[   18.862344]  fff00000c6460480: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.862415]  fff00000c6460500: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.862484] >fff00000c6460580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.862641]                          ^
[   18.862789]  fff00000c6460600: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.863192]  fff00000c6460680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.863276] ==================================================================

[   14.496898] ==================================================================
[   14.497235] BUG: KASAN: slab-use-after-free in strlen+0x8f/0xb0
[   14.497497] Read of size 1 at addr ffff8881032060d0 by task kunit_try_catch/276
[   14.497825] 
[   14.497918] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.497959] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.497970] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.497991] Call Trace:
[   14.498006]  <TASK>
[   14.498020]  dump_stack_lvl+0x73/0xb0
[   14.498595]  print_report+0xd1/0x650
[   14.498633]  ? __virt_addr_valid+0x1db/0x2d0
[   14.498656]  ? strlen+0x8f/0xb0
[   14.498673]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.498698]  ? strlen+0x8f/0xb0
[   14.498730]  kasan_report+0x141/0x180
[   14.498753]  ? strlen+0x8f/0xb0
[   14.498775]  __asan_report_load1_noabort+0x18/0x20
[   14.498800]  strlen+0x8f/0xb0
[   14.498817]  kasan_strings+0x57b/0xe80
[   14.498837]  ? trace_hardirqs_on+0x37/0xe0
[   14.498860]  ? __pfx_kasan_strings+0x10/0x10
[   14.498882]  ? finish_task_switch.isra.0+0x153/0x700
[   14.498904]  ? __switch_to+0x47/0xf50
[   14.498929]  ? __schedule+0x10cc/0x2b60
[   14.498950]  ? __pfx_read_tsc+0x10/0x10
[   14.498971]  ? ktime_get_ts64+0x86/0x230
[   14.498994]  kunit_try_run_case+0x1a5/0x480
[   14.499018]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.499110]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.499138]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.499162]  ? __kthread_parkme+0x82/0x180
[   14.499183]  ? preempt_count_sub+0x50/0x80
[   14.499206]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.499232]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.499258]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.499284]  kthread+0x337/0x6f0
[   14.499302]  ? trace_preempt_on+0x20/0xc0
[   14.499325]  ? __pfx_kthread+0x10/0x10
[   14.499346]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.499368]  ? calculate_sigpending+0x7b/0xa0
[   14.499392]  ? __pfx_kthread+0x10/0x10
[   14.499413]  ret_from_fork+0x116/0x1d0
[   14.499431]  ? __pfx_kthread+0x10/0x10
[   14.499451]  ret_from_fork_asm+0x1a/0x30
[   14.499482]  </TASK>
[   14.499491] 
[   14.510183] Allocated by task 276:
[   14.510523]  kasan_save_stack+0x45/0x70
[   14.510686]  kasan_save_track+0x18/0x40
[   14.510999]  kasan_save_alloc_info+0x3b/0x50
[   14.511236]  __kasan_kmalloc+0xb7/0xc0
[   14.511410]  __kmalloc_cache_noprof+0x189/0x420
[   14.511615]  kasan_strings+0xc0/0xe80
[   14.511797]  kunit_try_run_case+0x1a5/0x480
[   14.511988]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.512607]  kthread+0x337/0x6f0
[   14.512791]  ret_from_fork+0x116/0x1d0
[   14.512935]  ret_from_fork_asm+0x1a/0x30
[   14.513358] 
[   14.513445] Freed by task 276:
[   14.513758]  kasan_save_stack+0x45/0x70
[   14.513963]  kasan_save_track+0x18/0x40
[   14.514311]  kasan_save_free_info+0x3f/0x60
[   14.514669]  __kasan_slab_free+0x56/0x70
[   14.514830]  kfree+0x222/0x3f0
[   14.515272]  kasan_strings+0x2aa/0xe80
[   14.515429]  kunit_try_run_case+0x1a5/0x480
[   14.515810]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.516064]  kthread+0x337/0x6f0
[   14.516356]  ret_from_fork+0x116/0x1d0
[   14.516550]  ret_from_fork_asm+0x1a/0x30
[   14.516894] 
[   14.516972] The buggy address belongs to the object at ffff8881032060c0
[   14.516972]  which belongs to the cache kmalloc-32 of size 32
[   14.517848] The buggy address is located 16 bytes inside of
[   14.517848]  freed 32-byte region [ffff8881032060c0, ffff8881032060e0)
[   14.518486] 
[   14.518591] The buggy address belongs to the physical page:
[   14.518985] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103206
[   14.519623] flags: 0x200000000000000(node=0|zone=2)
[   14.519879] page_type: f5(slab)
[   14.520033] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.520601] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.520993] page dumped because: kasan: bad access detected
[   14.521402] 
[   14.521485] Memory state around the buggy address:
[   14.521688]  ffff888103205f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.522204]  ffff888103206000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.522612] >ffff888103206080: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.522985]                                                  ^
[   14.523511]  ffff888103206100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.523852]  ffff888103206180: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.524531] ==================================================================