Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   24.679852] ==================================================================
[   24.680075] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   24.680272] Read of size 1 at addr fff00000c7876250 by task kunit_try_catch/259
[   24.680444] 
[   24.680532] CPU: 1 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   24.680785] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.680858] Hardware name: linux,dummy-virt (DT)
[   24.680947] Call trace:
[   24.681010]  show_stack+0x20/0x38 (C)
[   24.681234]  dump_stack_lvl+0x8c/0xd0
[   24.681419]  print_report+0x118/0x608
[   24.681565]  kasan_report+0xdc/0x128
[   24.681673]  __asan_report_load1_noabort+0x20/0x30
[   24.681811]  kasan_strings+0x95c/0xb00
[   24.681964]  kunit_try_run_case+0x170/0x3f0
[   24.682088]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.682263]  kthread+0x328/0x630
[   24.682515]  ret_from_fork+0x10/0x20
[   24.682653] 
[   24.682684] Allocated by task 259:
[   24.682757]  kasan_save_stack+0x3c/0x68
[   24.682863]  kasan_save_track+0x20/0x40
[   24.682948]  kasan_save_alloc_info+0x40/0x58
[   24.683237]  __kasan_kmalloc+0xd4/0xd8
[   24.683347]  __kmalloc_cache_noprof+0x15c/0x3c0
[   24.683712]  kasan_strings+0xc8/0xb00
[   24.684013]  kunit_try_run_case+0x170/0x3f0
[   24.684132]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.684254]  kthread+0x328/0x630
[   24.684341]  ret_from_fork+0x10/0x20
[   24.684637] 
[   24.684722] Freed by task 259:
[   24.685032]  kasan_save_stack+0x3c/0x68
[   24.685163]  kasan_save_track+0x20/0x40
[   24.685264]  kasan_save_free_info+0x4c/0x78
[   24.685554]  __kasan_slab_free+0x6c/0x98
[   24.685688]  kfree+0x214/0x3c8
[   24.685782]  kasan_strings+0x24c/0xb00
[   24.685889]  kunit_try_run_case+0x170/0x3f0
[   24.685999]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.686111]  kthread+0x328/0x630
[   24.686199]  ret_from_fork+0x10/0x20
[   24.686300] 
[   24.686950] The buggy address belongs to the object at fff00000c7876240
[   24.686950]  which belongs to the cache kmalloc-32 of size 32
[   24.687114] The buggy address is located 16 bytes inside of
[   24.687114]  freed 32-byte region [fff00000c7876240, fff00000c7876260)
[   24.687254] 
[   24.687314] The buggy address belongs to the physical page:
[   24.688052] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107876
[   24.688466] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.688794] page_type: f5(slab)
[   24.688902] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   24.689733] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   24.689911] page dumped because: kasan: bad access detected
[   24.690151] 
[   24.690412] Memory state around the buggy address:
[   24.690559]  fff00000c7876100: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   24.690963]  fff00000c7876180: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   24.691081] >fff00000c7876200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   24.691174]                                                  ^
[   24.691479]  fff00000c7876280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   24.691818]  fff00000c7876300: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   24.692047] ==================================================================


[   12.806563] ==================================================================
[   12.807184] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   12.807548] Read of size 1 at addr ffff888102fab010 by task kunit_try_catch/276
[   12.808012] 
[   12.808148] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   12.808228] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.808241] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.808262] Call Trace:
[   12.808276]  <TASK>
[   12.808290]  dump_stack_lvl+0x73/0xb0
[   12.808317]  print_report+0xd1/0x650
[   12.808339]  ? __virt_addr_valid+0x1db/0x2d0
[   12.808362]  ? kasan_strings+0xcbc/0xe80
[   12.808415]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.808439]  ? kasan_strings+0xcbc/0xe80
[   12.808462]  kasan_report+0x141/0x180
[   12.808484]  ? kasan_strings+0xcbc/0xe80
[   12.808510]  __asan_report_load1_noabort+0x18/0x20
[   12.808561]  kasan_strings+0xcbc/0xe80
[   12.808581]  ? trace_hardirqs_on+0x37/0xe0
[   12.808603]  ? __pfx_kasan_strings+0x10/0x10
[   12.808636]  ? finish_task_switch.isra.0+0x153/0x700
[   12.808659]  ? __switch_to+0x47/0xf50
[   12.808714]  ? __schedule+0x10cc/0x2b60
[   12.808740]  ? __pfx_read_tsc+0x10/0x10
[   12.808761]  ? ktime_get_ts64+0x86/0x230
[   12.808807]  kunit_try_run_case+0x1a5/0x480
[   12.808830]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.808924]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.808950]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.808975]  ? __kthread_parkme+0x82/0x180
[   12.808995]  ? preempt_count_sub+0x50/0x80
[   12.809019]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.809041]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.809065]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.809121]  kthread+0x337/0x6f0
[   12.809164]  ? trace_preempt_on+0x20/0xc0
[   12.809187]  ? __pfx_kthread+0x10/0x10
[   12.809210]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.809233]  ? calculate_sigpending+0x7b/0xa0
[   12.809258]  ? __pfx_kthread+0x10/0x10
[   12.809280]  ret_from_fork+0x116/0x1d0
[   12.809299]  ? __pfx_kthread+0x10/0x10
[   12.809320]  ret_from_fork_asm+0x1a/0x30
[   12.809350]  </TASK>
[   12.809360] 
[   12.818382] Allocated by task 276:
[   12.818521]  kasan_save_stack+0x45/0x70
[   12.818691]  kasan_save_track+0x18/0x40
[   12.818873]  kasan_save_alloc_info+0x3b/0x50
[   12.819083]  __kasan_kmalloc+0xb7/0xc0
[   12.819412]  __kmalloc_cache_noprof+0x189/0x420
[   12.819816]  kasan_strings+0xc0/0xe80
[   12.820047]  kunit_try_run_case+0x1a5/0x480
[   12.820285]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.820544]  kthread+0x337/0x6f0
[   12.820726]  ret_from_fork+0x116/0x1d0
[   12.820966]  ret_from_fork_asm+0x1a/0x30
[   12.821109] 
[   12.821209] Freed by task 276:
[   12.821370]  kasan_save_stack+0x45/0x70
[   12.821568]  kasan_save_track+0x18/0x40
[   12.821938]  kasan_save_free_info+0x3f/0x60
[   12.822311]  __kasan_slab_free+0x56/0x70
[   12.822541]  kfree+0x222/0x3f0
[   12.822739]  kasan_strings+0x2aa/0xe80
[   12.823011]  kunit_try_run_case+0x1a5/0x480
[   12.823198]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.823403]  kthread+0x337/0x6f0
[   12.823571]  ret_from_fork+0x116/0x1d0
[   12.823838]  ret_from_fork_asm+0x1a/0x30
[   12.824046] 
[   12.824142] The buggy address belongs to the object at ffff888102fab000
[   12.824142]  which belongs to the cache kmalloc-32 of size 32
[   12.824650] The buggy address is located 16 bytes inside of
[   12.824650]  freed 32-byte region [ffff888102fab000, ffff888102fab020)
[   12.825136] 
[   12.825234] The buggy address belongs to the physical page:
[   12.825618] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102fab
[   12.826258] flags: 0x200000000000000(node=0|zone=2)
[   12.826490] page_type: f5(slab)
[   12.826690] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   12.827280] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   12.827659] page dumped because: kasan: bad access detected
[   12.827960] 
[   12.828100] Memory state around the buggy address:
[   12.828332]  ffff888102faaf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.828575]  ffff888102faaf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.829054] >ffff888102fab000: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.829437]                          ^
[   12.829681]  ffff888102fab080: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   12.830209]  ffff888102fab100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.830485] ==================================================================