Hay
Date
June 24, 2025, 12:47 p.m.

Environment
qemu-arm64
qemu-x86_64

[   27.414153] ==================================================================
[   27.414256] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   27.414376] Read of size 1 at addr fff00000c5a7ce50 by task kunit_try_catch/261
[   27.414734] 
[   27.414833] CPU: 1 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT 
[   27.415290] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.415568] Hardware name: linux,dummy-virt (DT)
[   27.415949] Call trace:
[   27.416018]  show_stack+0x20/0x38 (C)
[   27.416154]  dump_stack_lvl+0x8c/0xd0
[   27.416344]  print_report+0x118/0x608
[   27.416499]  kasan_report+0xdc/0x128
[   27.416806]  __asan_report_load1_noabort+0x20/0x30
[   27.416948]  kasan_strings+0x95c/0xb00
[   27.417097]  kunit_try_run_case+0x170/0x3f0
[   27.417454]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.417700]  kthread+0x328/0x630
[   27.417818]  ret_from_fork+0x10/0x20
[   27.417996] 
[   27.418159] Allocated by task 261:
[   27.418239]  kasan_save_stack+0x3c/0x68
[   27.418390]  kasan_save_track+0x20/0x40
[   27.418510]  kasan_save_alloc_info+0x40/0x58
[   27.418714]  __kasan_kmalloc+0xd4/0xd8
[   27.418860]  __kmalloc_cache_noprof+0x16c/0x3c0
[   27.418984]  kasan_strings+0xc8/0xb00
[   27.419181]  kunit_try_run_case+0x170/0x3f0
[   27.419345]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.419503]  kthread+0x328/0x630
[   27.419773]  ret_from_fork+0x10/0x20
[   27.419949] 
[   27.420033] Freed by task 261:
[   27.420462]  kasan_save_stack+0x3c/0x68
[   27.420579]  kasan_save_track+0x20/0x40
[   27.420909]  kasan_save_free_info+0x4c/0x78
[   27.421495]  __kasan_slab_free+0x6c/0x98
[   27.421651]  kfree+0x214/0x3c8
[   27.421795]  kasan_strings+0x24c/0xb00
[   27.422059]  kunit_try_run_case+0x170/0x3f0
[   27.422405]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.422761]  kthread+0x328/0x630
[   27.422983]  ret_from_fork+0x10/0x20
[   27.423231] 
[   27.423310] The buggy address belongs to the object at fff00000c5a7ce40
[   27.423310]  which belongs to the cache kmalloc-32 of size 32
[   27.423474] The buggy address is located 16 bytes inside of
[   27.423474]  freed 32-byte region [fff00000c5a7ce40, fff00000c5a7ce60)
[   27.423630] 
[   27.423685] The buggy address belongs to the physical page:
[   27.423818] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105a7c
[   27.423968] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.424102] page_type: f5(slab)
[   27.424594] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   27.424838] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000
[   27.424948] page dumped because: kasan: bad access detected
[   27.425246] 
[   27.425348] Memory state around the buggy address:
[   27.425608]  fff00000c5a7cd00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   27.425807]  fff00000c5a7cd80: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   27.426023] >fff00000c5a7ce00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   27.426270]                                                  ^
[   27.426474]  fff00000c5a7ce80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   27.426709]  fff00000c5a7cf00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   27.426964] ==================================================================

[   13.981521] ==================================================================
[   13.981832] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   13.982136] Read of size 1 at addr ffff8881039efb10 by task kunit_try_catch/279
[   13.982518] 
[   13.982794] CPU: 0 UID: 0 PID: 279 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc2 #1 PREEMPT(voluntary) 
[   13.982894] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.982919] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.982974] Call Trace:
[   13.983031]  <TASK>
[   13.983071]  dump_stack_lvl+0x73/0xb0
[   13.983128]  print_report+0xd1/0x650
[   13.983183]  ? __virt_addr_valid+0x1db/0x2d0
[   13.983240]  ? kasan_strings+0xcbc/0xe80
[   13.983280]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.983312]  ? kasan_strings+0xcbc/0xe80
[   13.983333]  kasan_report+0x141/0x180
[   13.983356]  ? kasan_strings+0xcbc/0xe80
[   13.983381]  __asan_report_load1_noabort+0x18/0x20
[   13.983402]  kasan_strings+0xcbc/0xe80
[   13.983421]  ? trace_hardirqs_on+0x37/0xe0
[   13.983453]  ? __pfx_kasan_strings+0x10/0x10
[   13.983484]  ? finish_task_switch.isra.0+0x153/0x700
[   13.983527]  ? __switch_to+0x5d9/0xf60
[   13.983601]  ? dequeue_task_fair+0x166/0x4e0
[   13.983667]  ? __schedule+0x10cc/0x2b60
[   13.983712]  ? __pfx_read_tsc+0x10/0x10
[   13.983746]  ? ktime_get_ts64+0x86/0x230
[   13.983792]  kunit_try_run_case+0x1a5/0x480
[   13.983849]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.983942]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.983990]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.984026]  ? __kthread_parkme+0x82/0x180
[   13.984049]  ? preempt_count_sub+0x50/0x80
[   13.984073]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.984097]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.984120]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.984142]  kthread+0x337/0x6f0
[   13.984159]  ? trace_preempt_on+0x20/0xc0
[   13.984181]  ? __pfx_kthread+0x10/0x10
[   13.984198]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.984219]  ? calculate_sigpending+0x7b/0xa0
[   13.984239]  ? __pfx_kthread+0x10/0x10
[   13.984257]  ret_from_fork+0x41/0x80
[   13.984277]  ? __pfx_kthread+0x10/0x10
[   13.984294]  ret_from_fork_asm+0x1a/0x30
[   13.984323]  </TASK>
[   13.984336] 
[   13.994813] Allocated by task 279:
[   13.995165]  kasan_save_stack+0x45/0x70
[   13.995532]  kasan_save_track+0x18/0x40
[   13.995911]  kasan_save_alloc_info+0x3b/0x50
[   13.996201]  __kasan_kmalloc+0xb7/0xc0
[   13.996353]  __kmalloc_cache_noprof+0x189/0x420
[   13.996535]  kasan_strings+0xc0/0xe80
[   13.996753]  kunit_try_run_case+0x1a5/0x480
[   13.996933]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.997166]  kthread+0x337/0x6f0
[   13.997420]  ret_from_fork+0x41/0x80
[   13.997788]  ret_from_fork_asm+0x1a/0x30
[   13.998112] 
[   13.998280] Freed by task 279:
[   13.998574]  kasan_save_stack+0x45/0x70
[   13.998887]  kasan_save_track+0x18/0x40
[   13.999192]  kasan_save_free_info+0x3f/0x60
[   13.999505]  __kasan_slab_free+0x56/0x70
[   13.999852]  kfree+0x222/0x3f0
[   14.000115]  kasan_strings+0x2aa/0xe80
[   14.000430]  kunit_try_run_case+0x1a5/0x480
[   14.000786]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.001180]  kthread+0x337/0x6f0
[   14.001375]  ret_from_fork+0x41/0x80
[   14.001586]  ret_from_fork_asm+0x1a/0x30
[   14.001923] 
[   14.002094] The buggy address belongs to the object at ffff8881039efb00
[   14.002094]  which belongs to the cache kmalloc-32 of size 32
[   14.002899] The buggy address is located 16 bytes inside of
[   14.002899]  freed 32-byte region [ffff8881039efb00, ffff8881039efb20)
[   14.003385] 
[   14.003497] The buggy address belongs to the physical page:
[   14.003850] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039ef
[   14.004401] flags: 0x200000000000000(node=0|zone=2)
[   14.004802] page_type: f5(slab)
[   14.005063] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   14.005577] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   14.005832] page dumped because: kasan: bad access detected
[   14.006033] 
[   14.006134] Memory state around the buggy address:
[   14.006516]  ffff8881039efa00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.007078]  ffff8881039efa80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.007582] >ffff8881039efb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.008036]                          ^
[   14.008248]  ffff8881039efb80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   14.008655]  ffff8881039efc00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   14.008998] ==================================================================