Hay
Date
July 5, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.458759] ==================================================================
[   20.458814] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   20.458863] Read of size 1 at addr fff00000c78cc650 by task kunit_try_catch/259
[   20.459169] 
[   20.459278] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.459634] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.459704] Hardware name: linux,dummy-virt (DT)
[   20.459961] Call trace:
[   20.460079]  show_stack+0x20/0x38 (C)
[   20.460135]  dump_stack_lvl+0x8c/0xd0
[   20.460193]  print_report+0x118/0x608
[   20.460241]  kasan_report+0xdc/0x128
[   20.460496]  __asan_report_load1_noabort+0x20/0x30
[   20.460585]  kasan_strings+0x95c/0xb00
[   20.460852]  kunit_try_run_case+0x170/0x3f0
[   20.461108]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.461246]  kthread+0x328/0x630
[   20.461292]  ret_from_fork+0x10/0x20
[   20.461377] 
[   20.461412] Allocated by task 259:
[   20.461524]  kasan_save_stack+0x3c/0x68
[   20.461568]  kasan_save_track+0x20/0x40
[   20.461607]  kasan_save_alloc_info+0x40/0x58
[   20.461771]  __kasan_kmalloc+0xd4/0xd8
[   20.461991]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.462086]  kasan_strings+0xc8/0xb00
[   20.462148]  kunit_try_run_case+0x170/0x3f0
[   20.462198]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.462377]  kthread+0x328/0x630
[   20.462597]  ret_from_fork+0x10/0x20
[   20.462721] 
[   20.462757] Freed by task 259:
[   20.462785]  kasan_save_stack+0x3c/0x68
[   20.462827]  kasan_save_track+0x20/0x40
[   20.463142]  kasan_save_free_info+0x4c/0x78
[   20.463214]  __kasan_slab_free+0x6c/0x98
[   20.463415]  kfree+0x214/0x3c8
[   20.463619]  kasan_strings+0x24c/0xb00
[   20.463740]  kunit_try_run_case+0x170/0x3f0
[   20.463830]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.463917]  kthread+0x328/0x630
[   20.463953]  ret_from_fork+0x10/0x20
[   20.464058] 
[   20.464083] The buggy address belongs to the object at fff00000c78cc640
[   20.464083]  which belongs to the cache kmalloc-32 of size 32
[   20.464286] The buggy address is located 16 bytes inside of
[   20.464286]  freed 32-byte region [fff00000c78cc640, fff00000c78cc660)
[   20.464353] 
[   20.464623] The buggy address belongs to the physical page:
[   20.464703] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1078cc
[   20.464758] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.464807] page_type: f5(slab)
[   20.464846] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.465229] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.465279] page dumped because: kasan: bad access detected
[   20.465484] 
[   20.465560] Memory state around the buggy address:
[   20.465597]  fff00000c78cc500: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.465643]  fff00000c78cc580: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   20.465757] >fff00000c78cc600: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.465941]                                                  ^
[   20.466061]  fff00000c78cc680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   20.466105]  fff00000c78cc700: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   20.466170] ==================================================================

[   15.740371] ==================================================================
[   15.740801] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   15.741123] Read of size 1 at addr ffff888102a0d790 by task kunit_try_catch/277
[   15.741570] 
[   15.741709] CPU: 1 UID: 0 PID: 277 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   15.741762] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.741777] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   15.741815] Call Trace:
[   15.741834]  <TASK>
[   15.741854]  dump_stack_lvl+0x73/0xb0
[   15.741888]  print_report+0xd1/0x650
[   15.741914]  ? __virt_addr_valid+0x1db/0x2d0
[   15.741940]  ? kasan_strings+0xcbc/0xe80
[   15.741963]  ? kasan_complete_mode_report_info+0x64/0x200
[   15.741988]  ? kasan_strings+0xcbc/0xe80
[   15.742012]  kasan_report+0x141/0x180
[   15.742038]  ? kasan_strings+0xcbc/0xe80
[   15.742066]  __asan_report_load1_noabort+0x18/0x20
[   15.742395]  kasan_strings+0xcbc/0xe80
[   15.742430]  ? trace_hardirqs_on+0x37/0xe0
[   15.742458]  ? __pfx_kasan_strings+0x10/0x10
[   15.742482]  ? finish_task_switch.isra.0+0x153/0x700
[   15.742507]  ? __switch_to+0x47/0xf50
[   15.742537]  ? __schedule+0x10cc/0x2b60
[   15.742564]  ? __pfx_read_tsc+0x10/0x10
[   15.742587]  ? ktime_get_ts64+0x86/0x230
[   15.742614]  kunit_try_run_case+0x1a5/0x480
[   15.742643]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.742668]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   15.742695]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   15.742721]  ? __kthread_parkme+0x82/0x180
[   15.742744]  ? preempt_count_sub+0x50/0x80
[   15.742770]  ? __pfx_kunit_try_run_case+0x10/0x10
[   15.742812]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.742838]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   15.742865]  kthread+0x337/0x6f0
[   15.742888]  ? trace_preempt_on+0x20/0xc0
[   15.742913]  ? __pfx_kthread+0x10/0x10
[   15.742936]  ? _raw_spin_unlock_irq+0x47/0x80
[   15.742962]  ? calculate_sigpending+0x7b/0xa0
[   15.742990]  ? __pfx_kthread+0x10/0x10
[   15.743014]  ret_from_fork+0x116/0x1d0
[   15.743036]  ? __pfx_kthread+0x10/0x10
[   15.743059]  ret_from_fork_asm+0x1a/0x30
[   15.743095]  </TASK>
[   15.743109] 
[   15.752612] Allocated by task 277:
[   15.752854]  kasan_save_stack+0x45/0x70
[   15.753101]  kasan_save_track+0x18/0x40
[   15.753421]  kasan_save_alloc_info+0x3b/0x50
[   15.753641]  __kasan_kmalloc+0xb7/0xc0
[   15.753833]  __kmalloc_cache_noprof+0x189/0x420
[   15.754015]  kasan_strings+0xc0/0xe80
[   15.754190]  kunit_try_run_case+0x1a5/0x480
[   15.754429]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.754726]  kthread+0x337/0x6f0
[   15.755061]  ret_from_fork+0x116/0x1d0
[   15.755297]  ret_from_fork_asm+0x1a/0x30
[   15.755458] 
[   15.755540] Freed by task 277:
[   15.755704]  kasan_save_stack+0x45/0x70
[   15.755947]  kasan_save_track+0x18/0x40
[   15.756174]  kasan_save_free_info+0x3f/0x60
[   15.756611]  __kasan_slab_free+0x56/0x70
[   15.757134]  kfree+0x222/0x3f0
[   15.757484]  kasan_strings+0x2aa/0xe80
[   15.757778]  kunit_try_run_case+0x1a5/0x480
[   15.758041]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   15.758605]  kthread+0x337/0x6f0
[   15.758752]  ret_from_fork+0x116/0x1d0
[   15.758919]  ret_from_fork_asm+0x1a/0x30
[   15.759275] 
[   15.759396] The buggy address belongs to the object at ffff888102a0d780
[   15.759396]  which belongs to the cache kmalloc-32 of size 32
[   15.760036] The buggy address is located 16 bytes inside of
[   15.760036]  freed 32-byte region [ffff888102a0d780, ffff888102a0d7a0)
[   15.760745] 
[   15.760887] The buggy address belongs to the physical page:
[   15.761293] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a0d
[   15.761591] flags: 0x200000000000000(node=0|zone=2)
[   15.761882] page_type: f5(slab)
[   15.762082] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   15.762412] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   15.762676] page dumped because: kasan: bad access detected
[   15.763064] 
[   15.763177] Memory state around the buggy address:
[   15.763501]  ffff888102a0d680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.763970]  ffff888102a0d700: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   15.764537] >ffff888102a0d780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   15.764893]                          ^
[   15.765076]  ffff888102a0d800: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.765607]  ffff888102a0d880: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   15.765876] ==================================================================