Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   21.620928] ==================================================================
[   21.620983] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   21.621046] Read of size 1 at addr fff00000c56a2110 by task kunit_try_catch/259
[   21.621319] 
[   21.621406] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   21.621501] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.621530] Hardware name: linux,dummy-virt (DT)
[   21.621747] Call trace:
[   21.621910]  show_stack+0x20/0x38 (C)
[   21.622022]  dump_stack_lvl+0x8c/0xd0
[   21.622097]  print_report+0x118/0x608
[   21.622163]  kasan_report+0xdc/0x128
[   21.622276]  __asan_report_load1_noabort+0x20/0x30
[   21.622329]  kasan_strings+0x95c/0xb00
[   21.622386]  kunit_try_run_case+0x170/0x3f0
[   21.622686]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.622765]  kthread+0x328/0x630
[   21.622810]  ret_from_fork+0x10/0x20
[   21.622861] 
[   21.622883] Allocated by task 259:
[   21.623294]  kasan_save_stack+0x3c/0x68
[   21.623475]  kasan_save_track+0x20/0x40
[   21.623533]  kasan_save_alloc_info+0x40/0x58
[   21.623677]  __kasan_kmalloc+0xd4/0xd8
[   21.623783]  __kmalloc_cache_noprof+0x16c/0x3c0
[   21.623823]  kasan_strings+0xc8/0xb00
[   21.623882]  kunit_try_run_case+0x170/0x3f0
[   21.624206]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.624380]  kthread+0x328/0x630
[   21.624477]  ret_from_fork+0x10/0x20
[   21.624623] 
[   21.624693] Freed by task 259:
[   21.624839]  kasan_save_stack+0x3c/0x68
[   21.624884]  kasan_save_track+0x20/0x40
[   21.624924]  kasan_save_free_info+0x4c/0x78
[   21.625157]  __kasan_slab_free+0x6c/0x98
[   21.625327]  kfree+0x214/0x3c8
[   21.625397]  kasan_strings+0x24c/0xb00
[   21.625521]  kunit_try_run_case+0x170/0x3f0
[   21.625652]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.625809]  kthread+0x328/0x630
[   21.625900]  ret_from_fork+0x10/0x20
[   21.626175] 
[   21.626363] The buggy address belongs to the object at fff00000c56a2100
[   21.626363]  which belongs to the cache kmalloc-32 of size 32
[   21.626759] The buggy address is located 16 bytes inside of
[   21.626759]  freed 32-byte region [fff00000c56a2100, fff00000c56a2120)
[   21.627334] 
[   21.627444] The buggy address belongs to the physical page:
[   21.627483] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1056a2
[   21.627682] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.627930] page_type: f5(slab)
[   21.628010] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   21.628148] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   21.628604] page dumped because: kasan: bad access detected
[   21.628754] 
[   21.628881] Memory state around the buggy address:
[   21.628940]  fff00000c56a2000: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   21.629005]  fff00000c56a2080: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   21.629057] >fff00000c56a2100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.629095]                          ^
[   21.629128]  fff00000c56a2180: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   21.629174]  fff00000c56a2200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.629231] ==================================================================

[   14.966444] ==================================================================
[   14.966833] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   14.967087] Read of size 1 at addr ffff888102b12e50 by task kunit_try_catch/276
[   14.967415] 
[   14.967741] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   14.967789] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.967801] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.967824] Call Trace:
[   14.967838]  <TASK>
[   14.967854]  dump_stack_lvl+0x73/0xb0
[   14.967883]  print_report+0xd1/0x650
[   14.967905]  ? __virt_addr_valid+0x1db/0x2d0
[   14.967927]  ? kasan_strings+0xcbc/0xe80
[   14.967947]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.967972]  ? kasan_strings+0xcbc/0xe80
[   14.967993]  kasan_report+0x141/0x180
[   14.968014]  ? kasan_strings+0xcbc/0xe80
[   14.968052]  __asan_report_load1_noabort+0x18/0x20
[   14.968128]  kasan_strings+0xcbc/0xe80
[   14.968148]  ? trace_hardirqs_on+0x37/0xe0
[   14.968171]  ? __pfx_kasan_strings+0x10/0x10
[   14.968191]  ? finish_task_switch.isra.0+0x153/0x700
[   14.968212]  ? __switch_to+0x47/0xf50
[   14.968237]  ? __schedule+0x10cc/0x2b60
[   14.968259]  ? __pfx_read_tsc+0x10/0x10
[   14.968279]  ? ktime_get_ts64+0x86/0x230
[   14.968303]  kunit_try_run_case+0x1a5/0x480
[   14.968326]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.968347]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.968370]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.968393]  ? __kthread_parkme+0x82/0x180
[   14.968413]  ? preempt_count_sub+0x50/0x80
[   14.968436]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.968459]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.968482]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.968505]  kthread+0x337/0x6f0
[   14.968524]  ? trace_preempt_on+0x20/0xc0
[   14.968546]  ? __pfx_kthread+0x10/0x10
[   14.968566]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.968587]  ? calculate_sigpending+0x7b/0xa0
[   14.968610]  ? __pfx_kthread+0x10/0x10
[   14.968631]  ret_from_fork+0x116/0x1d0
[   14.968649]  ? __pfx_kthread+0x10/0x10
[   14.968669]  ret_from_fork_asm+0x1a/0x30
[   14.968700]  </TASK>
[   14.968711] 
[   14.976457] Allocated by task 276:
[   14.976594]  kasan_save_stack+0x45/0x70
[   14.976815]  kasan_save_track+0x18/0x40
[   14.977011]  kasan_save_alloc_info+0x3b/0x50
[   14.977229]  __kasan_kmalloc+0xb7/0xc0
[   14.977417]  __kmalloc_cache_noprof+0x189/0x420
[   14.977890]  kasan_strings+0xc0/0xe80
[   14.978161]  kunit_try_run_case+0x1a5/0x480
[   14.978377]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.978782]  kthread+0x337/0x6f0
[   14.978956]  ret_from_fork+0x116/0x1d0
[   14.979422]  ret_from_fork_asm+0x1a/0x30
[   14.979627] 
[   14.979719] Freed by task 276:
[   14.979881]  kasan_save_stack+0x45/0x70
[   14.980066]  kasan_save_track+0x18/0x40
[   14.980231]  kasan_save_free_info+0x3f/0x60
[   14.980376]  __kasan_slab_free+0x56/0x70
[   14.980514]  kfree+0x222/0x3f0
[   14.980684]  kasan_strings+0x2aa/0xe80
[   14.980881]  kunit_try_run_case+0x1a5/0x480
[   14.981102]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.981357]  kthread+0x337/0x6f0
[   14.981540]  ret_from_fork+0x116/0x1d0
[   14.981823]  ret_from_fork_asm+0x1a/0x30
[   14.981994] 
[   14.982164] The buggy address belongs to the object at ffff888102b12e40
[   14.982164]  which belongs to the cache kmalloc-32 of size 32
[   14.982550] The buggy address is located 16 bytes inside of
[   14.982550]  freed 32-byte region [ffff888102b12e40, ffff888102b12e60)
[   14.983032] 
[   14.983137] The buggy address belongs to the physical page:
[   14.983508] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b12
[   14.984241] flags: 0x200000000000000(node=0|zone=2)
[   14.984428] page_type: f5(slab)
[   14.984634] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.984951] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000
[   14.985369] page dumped because: kasan: bad access detected
[   14.985623] 
[   14.985695] Memory state around the buggy address:
[   14.985849]  ffff888102b12d00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.986162]  ffff888102b12d80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.986498] >ffff888102b12e00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.986826]                                                  ^
[   14.987253]  ffff888102b12e80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.987587]  ffff888102b12f00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   14.987821] ==================================================================