Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   21.078101] ==================================================================
[   21.078214] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   21.078682] Read of size 1 at addr fff00000c76d9210 by task kunit_try_catch/260
[   21.078784] 
[   21.078841] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   21.078938] Tainted: [B]=BAD_PAGE, [N]=TEST
[   21.079304] Hardware name: linux,dummy-virt (DT)
[   21.079459] Call trace:
[   21.079544]  show_stack+0x20/0x38 (C)
[   21.079744]  dump_stack_lvl+0x8c/0xd0
[   21.079874]  print_report+0x118/0x608
[   21.080078]  kasan_report+0xdc/0x128
[   21.080242]  __asan_report_load1_noabort+0x20/0x30
[   21.080321]  kasan_strings+0x95c/0xb00
[   21.080636]  kunit_try_run_case+0x170/0x3f0
[   21.080878]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.080997]  kthread+0x328/0x630
[   21.081105]  ret_from_fork+0x10/0x20
[   21.081778] 
[   21.081896] Allocated by task 260:
[   21.082153]  kasan_save_stack+0x3c/0x68
[   21.082237]  kasan_save_track+0x20/0x40
[   21.082440]  kasan_save_alloc_info+0x40/0x58
[   21.082642]  __kasan_kmalloc+0xd4/0xd8
[   21.083034]  __kmalloc_cache_noprof+0x16c/0x3c0
[   21.083242]  kasan_strings+0xc8/0xb00
[   21.083340]  kunit_try_run_case+0x170/0x3f0
[   21.083536]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.083798]  kthread+0x328/0x630
[   21.083846]  ret_from_fork+0x10/0x20
[   21.084186] 
[   21.084373] Freed by task 260:
[   21.084493]  kasan_save_stack+0x3c/0x68
[   21.084647]  kasan_save_track+0x20/0x40
[   21.084731]  kasan_save_free_info+0x4c/0x78
[   21.085159]  __kasan_slab_free+0x6c/0x98
[   21.085264]  kfree+0x214/0x3c8
[   21.085357]  kasan_strings+0x24c/0xb00
[   21.085456]  kunit_try_run_case+0x170/0x3f0
[   21.085659]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   21.085821]  kthread+0x328/0x630
[   21.086166]  ret_from_fork+0x10/0x20
[   21.086297] 
[   21.086554] The buggy address belongs to the object at fff00000c76d9200
[   21.086554]  which belongs to the cache kmalloc-32 of size 32
[   21.086641] The buggy address is located 16 bytes inside of
[   21.086641]  freed 32-byte region [fff00000c76d9200, fff00000c76d9220)
[   21.086716] 
[   21.086874] The buggy address belongs to the physical page:
[   21.087020] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076d9
[   21.087092] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   21.087206] page_type: f5(slab)
[   21.087485] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   21.087934] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   21.088018] page dumped because: kasan: bad access detected
[   21.088166] 
[   21.088232] Memory state around the buggy address:
[   21.088327]  fff00000c76d9100: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   21.088691]  fff00000c76d9180: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   21.088885] >fff00000c76d9200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.089051]                          ^
[   21.089168]  fff00000c76d9280: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   21.089327]  fff00000c76d9300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   21.089423] ==================================================================

[   13.446722] ==================================================================
[   13.447052] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   13.447625] Read of size 1 at addr ffff888103aaf390 by task kunit_try_catch/276
[   13.448064] 
[   13.448178] CPU: 1 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.448223] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.448234] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.448256] Call Trace:
[   13.448273]  <TASK>
[   13.448291]  dump_stack_lvl+0x73/0xb0
[   13.448320]  print_report+0xd1/0x650
[   13.448343]  ? __virt_addr_valid+0x1db/0x2d0
[   13.448366]  ? kasan_strings+0xcbc/0xe80
[   13.448404]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.448426]  ? kasan_strings+0xcbc/0xe80
[   13.448447]  kasan_report+0x141/0x180
[   13.448468]  ? kasan_strings+0xcbc/0xe80
[   13.448493]  __asan_report_load1_noabort+0x18/0x20
[   13.448516]  kasan_strings+0xcbc/0xe80
[   13.448535]  ? trace_hardirqs_on+0x37/0xe0
[   13.448559]  ? __pfx_kasan_strings+0x10/0x10
[   13.448579]  ? finish_task_switch.isra.0+0x153/0x700
[   13.448601]  ? __switch_to+0x47/0xf50
[   13.448627]  ? __schedule+0x10cc/0x2b60
[   13.448649]  ? __pfx_read_tsc+0x10/0x10
[   13.448669]  ? ktime_get_ts64+0x86/0x230
[   13.448693]  kunit_try_run_case+0x1a5/0x480
[   13.448717]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.448739]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.448762]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.448784]  ? __kthread_parkme+0x82/0x180
[   13.448804]  ? preempt_count_sub+0x50/0x80
[   13.448826]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.448850]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.448872]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.448894]  kthread+0x337/0x6f0
[   13.448913]  ? trace_preempt_on+0x20/0xc0
[   13.448935]  ? __pfx_kthread+0x10/0x10
[   13.448955]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.448975]  ? calculate_sigpending+0x7b/0xa0
[   13.448998]  ? __pfx_kthread+0x10/0x10
[   13.449017]  ret_from_fork+0x116/0x1d0
[   13.449035]  ? __pfx_kthread+0x10/0x10
[   13.449054]  ret_from_fork_asm+0x1a/0x30
[   13.449083]  </TASK>
[   13.449094] 
[   13.456648] Allocated by task 276:
[   13.456834]  kasan_save_stack+0x45/0x70
[   13.457014]  kasan_save_track+0x18/0x40
[   13.457183]  kasan_save_alloc_info+0x3b/0x50
[   13.457331]  __kasan_kmalloc+0xb7/0xc0
[   13.457472]  __kmalloc_cache_noprof+0x189/0x420
[   13.457630]  kasan_strings+0xc0/0xe80
[   13.457762]  kunit_try_run_case+0x1a5/0x480
[   13.457906]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.458078]  kthread+0x337/0x6f0
[   13.458200]  ret_from_fork+0x116/0x1d0
[   13.458384]  ret_from_fork_asm+0x1a/0x30
[   13.458598] 
[   13.458687] Freed by task 276:
[   13.458840]  kasan_save_stack+0x45/0x70
[   13.459025]  kasan_save_track+0x18/0x40
[   13.459208]  kasan_save_free_info+0x3f/0x60
[   13.459423]  __kasan_slab_free+0x56/0x70
[   13.459641]  kfree+0x222/0x3f0
[   13.459801]  kasan_strings+0x2aa/0xe80
[   13.459980]  kunit_try_run_case+0x1a5/0x480
[   13.460186]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.460465]  kthread+0x337/0x6f0
[   13.461148]  ret_from_fork+0x116/0x1d0
[   13.461340]  ret_from_fork_asm+0x1a/0x30
[   13.461496] 
[   13.461571] The buggy address belongs to the object at ffff888103aaf380
[   13.461571]  which belongs to the cache kmalloc-32 of size 32
[   13.462093] The buggy address is located 16 bytes inside of
[   13.462093]  freed 32-byte region [ffff888103aaf380, ffff888103aaf3a0)
[   13.462527] 
[   13.463395] The buggy address belongs to the physical page:
[   13.463883] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103aaf
[   13.464480] flags: 0x200000000000000(node=0|zone=2)
[   13.464791] page_type: f5(slab)
[   13.464962] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.465273] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.465823] page dumped because: kasan: bad access detected
[   13.466135] 
[   13.466363] Memory state around the buggy address:
[   13.466822]  ffff888103aaf280: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   13.467324]  ffff888103aaf300: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.467786] >ffff888103aaf380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.468216]                          ^
[   13.468407]  ffff888103aaf400: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.468954]  ffff888103aaf480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.469462] ==================================================================