Hay
Date
May 12, 2025, 11:48 a.m.

Environment
qemu-arm64
qemu-x86_64

[   19.028523] ==================================================================
[   19.028587] BUG: KASAN: slab-use-after-free in kasan_strings+0x95c/0xb00
[   19.028643] Read of size 1 at addr fff00000c78896d0 by task kunit_try_catch/259
[   19.028696] 
[   19.028728] CPU: 0 UID: 0 PID: 259 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT 
[   19.028814] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.028844] Hardware name: linux,dummy-virt (DT)
[   19.028876] Call trace:
[   19.028901]  show_stack+0x20/0x38 (C)
[   19.028950]  dump_stack_lvl+0x8c/0xd0
[   19.028999]  print_report+0x118/0x608
[   19.029644]  kasan_report+0xdc/0x128
[   19.029704]  __asan_report_load1_noabort+0x20/0x30
[   19.029757]  kasan_strings+0x95c/0xb00
[   19.029850]  kunit_try_run_case+0x170/0x3f0
[   19.029996]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.030124]  kthread+0x328/0x630
[   19.030180]  ret_from_fork+0x10/0x20
[   19.030242] 
[   19.030267] Allocated by task 259:
[   19.030300]  kasan_save_stack+0x3c/0x68
[   19.030345]  kasan_save_track+0x20/0x40
[   19.030384]  kasan_save_alloc_info+0x40/0x58
[   19.030425]  __kasan_kmalloc+0xd4/0xd8
[   19.030462]  __kmalloc_cache_noprof+0x15c/0x3c0
[   19.030501]  kasan_strings+0xc8/0xb00
[   19.030537]  kunit_try_run_case+0x170/0x3f0
[   19.030583]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.030630]  kthread+0x328/0x630
[   19.030927]  ret_from_fork+0x10/0x20
[   19.030977] 
[   19.031000] Freed by task 259:
[   19.031029]  kasan_save_stack+0x3c/0x68
[   19.031160]  kasan_save_track+0x20/0x40
[   19.031249]  kasan_save_free_info+0x4c/0x78
[   19.031490]  __kasan_slab_free+0x6c/0x98
[   19.031533]  kfree+0x214/0x3c8
[   19.031686]  kasan_strings+0x24c/0xb00
[   19.031793]  kunit_try_run_case+0x170/0x3f0
[   19.031889]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.032036]  kthread+0x328/0x630
[   19.032142]  ret_from_fork+0x10/0x20
[   19.032365] 
[   19.032460] The buggy address belongs to the object at fff00000c78896c0
[   19.032460]  which belongs to the cache kmalloc-32 of size 32
[   19.032585] The buggy address is located 16 bytes inside of
[   19.032585]  freed 32-byte region [fff00000c78896c0, fff00000c78896e0)
[   19.032646] 
[   19.032670] The buggy address belongs to the physical page:
[   19.032704] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107889
[   19.032758] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.032807] page_type: f5(slab)
[   19.032850] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.032901] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.032941] page dumped because: kasan: bad access detected
[   19.032975] 
[   19.032995] Memory state around the buggy address:
[   19.033029]  fff00000c7889580: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.033085]  fff00000c7889600: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   19.033129] >fff00000c7889680: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.033167]                                                  ^
[   19.033205]  fff00000c7889700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.033530]  fff00000c7889780: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.033662] ==================================================================

[   18.980965] ==================================================================
[   18.981893] BUG: KASAN: slab-use-after-free in kasan_strings+0xcbc/0xe80
[   18.982962] Read of size 1 at addr ffff888102327750 by task kunit_try_catch/276
[   18.983756] 
[   18.983915] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) 
[   18.984083] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.984134] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.984194] Call Trace:
[   18.984237]  <TASK>
[   18.984322]  dump_stack_lvl+0x73/0xb0
[   18.984399]  print_report+0xd1/0x650
[   18.984471]  ? __virt_addr_valid+0x1db/0x2d0
[   18.984512]  ? kasan_strings+0xcbc/0xe80
[   18.984550]  ? kasan_complete_mode_report_info+0x64/0x200
[   18.984585]  ? kasan_strings+0xcbc/0xe80
[   18.984619]  kasan_report+0x141/0x180
[   18.984652]  ? kasan_strings+0xcbc/0xe80
[   18.984725]  __asan_report_load1_noabort+0x18/0x20
[   18.984761]  kasan_strings+0xcbc/0xe80
[   18.984795]  ? trace_hardirqs_on+0x37/0xe0
[   18.984838]  ? __pfx_kasan_strings+0x10/0x10
[   18.984872]  ? finish_task_switch.isra.0+0x153/0x700
[   18.984911]  ? __switch_to+0x47/0xf50
[   18.984941]  ? __schedule+0x10cc/0x2b60
[   18.984966]  ? __pfx_read_tsc+0x10/0x10
[   18.984990]  ? ktime_get_ts64+0x86/0x230
[   18.985016]  kunit_try_run_case+0x1a5/0x480
[   18.985068]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.985108]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   18.985147]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   18.985184]  ? __kthread_parkme+0x82/0x180
[   18.985207]  ? preempt_count_sub+0x50/0x80
[   18.985231]  ? __pfx_kunit_try_run_case+0x10/0x10
[   18.985272]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.985305]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   18.985331]  kthread+0x337/0x6f0
[   18.985352]  ? trace_preempt_on+0x20/0xc0
[   18.985377]  ? __pfx_kthread+0x10/0x10
[   18.985399]  ? _raw_spin_unlock_irq+0x47/0x80
[   18.985422]  ? calculate_sigpending+0x7b/0xa0
[   18.985449]  ? __pfx_kthread+0x10/0x10
[   18.985471]  ret_from_fork+0x116/0x1d0
[   18.985491]  ? __pfx_kthread+0x10/0x10
[   18.985513]  ret_from_fork_asm+0x1a/0x30
[   18.985546]  </TASK>
[   18.985561] 
[   19.000206] Allocated by task 276:
[   19.000476]  kasan_save_stack+0x45/0x70
[   19.001092]  kasan_save_track+0x18/0x40
[   19.001451]  kasan_save_alloc_info+0x3b/0x50
[   19.002104]  __kasan_kmalloc+0xb7/0xc0
[   19.002483]  __kmalloc_cache_noprof+0x189/0x420
[   19.003605]  kasan_strings+0xc0/0xe80
[   19.003988]  kunit_try_run_case+0x1a5/0x480
[   19.004618]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   19.004857]  kthread+0x337/0x6f0
[   19.005394]  ret_from_fork+0x116/0x1d0
[   19.005780]  ret_from_fork_asm+0x1a/0x30
[   19.006143] 
[   19.006280] Freed by task 276:
[   19.006468]  kasan_save_stack+0x45/0x70
[   19.006876]  kasan_save_track+0x18/0x40
[   19.007832]  kasan_save_free_info+0x3f/0x60
[   19.008108]  __kasan_slab_free+0x56/0x70
[   19.008299]  kfree+0x222/0x3f0
[   19.008911]  kasan_strings+0x2aa/0xe80
[   19.009460]  kunit_try_run_case+0x1a5/0x480
[   19.009770]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   19.010466]  kthread+0x337/0x6f0
[   19.010884]  ret_from_fork+0x116/0x1d0
[   19.011196]  ret_from_fork_asm+0x1a/0x30
[   19.011667] 
[   19.011823] The buggy address belongs to the object at ffff888102327740
[   19.011823]  which belongs to the cache kmalloc-32 of size 32
[   19.012860] The buggy address is located 16 bytes inside of
[   19.012860]  freed 32-byte region [ffff888102327740, ffff888102327760)
[   19.013969] 
[   19.014149] The buggy address belongs to the physical page:
[   19.014583] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102327
[   19.015452] flags: 0x200000000000000(node=0|zone=2)
[   19.015662] page_type: f5(slab)
[   19.015962] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   19.016865] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.017721] page dumped because: kasan: bad access detected
[   19.018026] 
[   19.018212] Memory state around the buggy address:
[   19.018543]  ffff888102327600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.018880]  ffff888102327680: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   19.019594] >ffff888102327700: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.020184]                                                  ^
[   19.020726]  ffff888102327780: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.021630]  ffff888102327800: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   19.022326] ==================================================================