Hay
Date
July 3, 2025, 3:13 p.m.

Environment
qemu-arm64
qemu-x86_64

[   15.958504] ==================================================================
[   15.959877] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   15.960598] Read of size 4 at addr fff00000c65c5380 by task swapper/1/0
[   15.961553] 
[   15.961669] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.15.5-rc1 #1 PREEMPT 
[   15.961755] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.961782] Hardware name: linux,dummy-virt (DT)
[   15.961814] Call trace:
[   15.962729]  show_stack+0x20/0x38 (C)
[   15.963434]  dump_stack_lvl+0x8c/0xd0
[   15.963861]  print_report+0x118/0x608
[   15.964342]  kasan_report+0xdc/0x128
[   15.964812]  __asan_report_load4_noabort+0x20/0x30
[   15.965355]  rcu_uaf_reclaim+0x64/0x70
[   15.966165]  rcu_core+0x9f4/0x1e20
[   15.966580]  rcu_core_si+0x18/0x30
[   15.966653]  handle_softirqs+0x374/0xb28
[   15.966700]  __do_softirq+0x1c/0x28
[   15.966742]  ____do_softirq+0x18/0x30
[   15.966784]  call_on_irq_stack+0x24/0x30
[   15.966829]  do_softirq_own_stack+0x24/0x38
[   15.968226]  __irq_exit_rcu+0x1fc/0x318
[   15.969023]  irq_exit_rcu+0x1c/0x80
[   15.969316]  el1_interrupt+0x38/0x58
[   15.969701]  el1h_64_irq_handler+0x18/0x28
[   15.969752]  el1h_64_irq+0x6c/0x70
[   15.971315]  arch_local_irq_enable+0x4/0x8 (P)
[   15.971580]  do_idle+0x384/0x4e8
[   15.972093]  cpu_startup_entry+0x68/0x80
[   15.972151]  secondary_start_kernel+0x288/0x340
[   15.972541]  __secondary_switched+0xc0/0xc8
[   15.973211] 
[   15.973237] Allocated by task 201:
[   15.973892]  kasan_save_stack+0x3c/0x68
[   15.974193]  kasan_save_track+0x20/0x40
[   15.974228]  kasan_save_alloc_info+0x40/0x58
[   15.974267]  __kasan_kmalloc+0xd4/0xd8
[   15.974301]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.974855]  rcu_uaf+0xb0/0x2d8
[   15.975460]  kunit_try_run_case+0x170/0x3f0
[   15.975562]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.975608]  kthread+0x328/0x630
[   15.975644]  ret_from_fork+0x10/0x20
[   15.975682] 
[   15.975702] Freed by task 0:
[   15.975728]  kasan_save_stack+0x3c/0x68
[   15.975765]  kasan_save_track+0x20/0x40
[   15.977126]  kasan_save_free_info+0x4c/0x78
[   15.977619]  __kasan_slab_free+0x6c/0x98
[   15.978210]  kfree+0x214/0x3c8
[   15.978255]  rcu_uaf_reclaim+0x28/0x70
[   15.978431]  rcu_core+0x9f4/0x1e20
[   15.978759]  rcu_core_si+0x18/0x30
[   15.979339]  handle_softirqs+0x374/0xb28
[   15.979391]  __do_softirq+0x1c/0x28
[   15.980011] 
[   15.980322] Last potentially related work creation:
[   15.980367]  kasan_save_stack+0x3c/0x68
[   15.980417]  kasan_record_aux_stack+0xb4/0xc8
[   15.981775]  __call_rcu_common.constprop.0+0x70/0x8b0
[   15.981905]  call_rcu+0x18/0x30
[   15.981960]  rcu_uaf+0x14c/0x2d8
[   15.981996]  kunit_try_run_case+0x170/0x3f0
[   15.982035]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.983085]  kthread+0x328/0x630
[   15.983195]  ret_from_fork+0x10/0x20
[   15.983576] 
[   15.983619] The buggy address belongs to the object at fff00000c65c5380
[   15.983619]  which belongs to the cache kmalloc-32 of size 32
[   15.984355] The buggy address is located 0 bytes inside of
[   15.984355]  freed 32-byte region [fff00000c65c5380, fff00000c65c53a0)
[   15.985071] 
[   15.985251] The buggy address belongs to the physical page:
[   15.985370] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1065c5
[   15.985557] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.986198] page_type: f5(slab)
[   15.986493] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   15.987649] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   15.987884] page dumped because: kasan: bad access detected
[   15.988585] 
[   15.988718] Memory state around the buggy address:
[   15.988769]  fff00000c65c5280: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   15.988999]  fff00000c65c5300: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   15.989202] >fff00000c65c5380: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   15.989284]                    ^
[   15.989379]  fff00000c65c5400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.989823]  fff00000c65c5480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.989865] ==================================================================

[   11.725501] ==================================================================
[   11.725981] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   11.726347] Read of size 4 at addr ffff888102dd04c0 by task swapper/1/0
[   11.726636] 
[   11.726816] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.15.5-rc1 #1 PREEMPT(voluntary) 
[   11.726860] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.726871] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.726891] Call Trace:
[   11.726917]  <IRQ>
[   11.726933]  dump_stack_lvl+0x73/0xb0
[   11.726961]  print_report+0xd1/0x650
[   11.726984]  ? __virt_addr_valid+0x1db/0x2d0
[   11.727006]  ? rcu_uaf_reclaim+0x50/0x60
[   11.727027]  ? kasan_complete_mode_report_info+0x64/0x200
[   11.727049]  ? rcu_uaf_reclaim+0x50/0x60
[   11.727071]  kasan_report+0x141/0x180
[   11.727093]  ? rcu_uaf_reclaim+0x50/0x60
[   11.727119]  __asan_report_load4_noabort+0x18/0x20
[   11.727140]  rcu_uaf_reclaim+0x50/0x60
[   11.727161]  rcu_core+0x66c/0x1c30
[   11.727185]  ? enqueue_hrtimer+0xfe/0x210
[   11.727209]  ? __pfx_rcu_core+0x10/0x10
[   11.727231]  ? ktime_get+0x6b/0x150
[   11.727265]  ? handle_softirqs+0x18e/0x730
[   11.727291]  rcu_core_si+0x12/0x20
[   11.727308]  handle_softirqs+0x209/0x730
[   11.727329]  ? hrtimer_interrupt+0x2fe/0x780
[   11.727352]  ? __pfx_handle_softirqs+0x10/0x10
[   11.727378]  __irq_exit_rcu+0xc9/0x110
[   11.727400]  irq_exit_rcu+0x12/0x20
[   11.727417]  sysvec_apic_timer_interrupt+0x81/0x90
[   11.727442]  </IRQ>
[   11.727467]  <TASK>
[   11.727477]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   11.727564] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   11.727828] Code: 1f 84 00 00 00 00 00 0f 1f 40 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa eb 07 0f 00 2d 43 ae 27 00 fb f4 <e9> fc 1f 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
[   11.727913] RSP: 0000:ffff88810086fdc8 EFLAGS: 00010212
[   11.728007] RAX: ffff8881c3b92000 RBX: ffff8881008353c0 RCX: ffffffff9500ef55
[   11.728053] RDX: ffffed102b626103 RSI: 0000000000000004 RDI: 000000000001a79c
[   11.728096] RBP: ffff88810086fdd0 R08: 0000000000000001 R09: ffffed102b626102
[   11.728147] R10: ffff88815b130813 R11: ffffffff975a3300 R12: 0000000000000001
[   11.728192] R13: ffffed1020106a78 R14: ffffffff96d9c210 R15: 0000000000000000
[   11.728262]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   11.728363]  ? default_idle+0xd/0x20
[   11.728384]  arch_cpu_idle+0xd/0x20
[   11.728403]  default_idle_call+0x48/0x80
[   11.728422]  do_idle+0x379/0x4f0
[   11.728443]  ? complete+0x15b/0x1d0
[   11.728463]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.728489]  ? __pfx_do_idle+0x10/0x10
[   11.728507]  ? _raw_spin_unlock_irqrestore+0x49/0x90
[   11.728532]  ? complete+0x15b/0x1d0
[   11.728555]  cpu_startup_entry+0x5c/0x70
[   11.728578]  start_secondary+0x211/0x290
[   11.728601]  ? __pfx_start_secondary+0x10/0x10
[   11.728626]  common_startup_64+0x13e/0x148
[   11.728672]  </TASK>
[   11.728684] 
[   11.741546] Allocated by task 217:
[   11.741808]  kasan_save_stack+0x45/0x70
[   11.742006]  kasan_save_track+0x18/0x40
[   11.742190]  kasan_save_alloc_info+0x3b/0x50
[   11.742452]  __kasan_kmalloc+0xb7/0xc0
[   11.742619]  __kmalloc_cache_noprof+0x189/0x420
[   11.742899]  rcu_uaf+0xb0/0x330
[   11.743073]  kunit_try_run_case+0x1a5/0x480
[   11.743223]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.743491]  kthread+0x337/0x6f0
[   11.743655]  ret_from_fork+0x41/0x80
[   11.743881]  ret_from_fork_asm+0x1a/0x30
[   11.744024] 
[   11.744094] Freed by task 0:
[   11.744201]  kasan_save_stack+0x45/0x70
[   11.744363]  kasan_save_track+0x18/0x40
[   11.744560]  kasan_save_free_info+0x3f/0x60
[   11.744823]  __kasan_slab_free+0x56/0x70
[   11.745025]  kfree+0x222/0x3f0
[   11.745190]  rcu_uaf_reclaim+0x1f/0x60
[   11.745614]  rcu_core+0x66c/0x1c30
[   11.745910]  rcu_core_si+0x12/0x20
[   11.746884]  handle_softirqs+0x209/0x730
[   11.747186]  __irq_exit_rcu+0xc9/0x110
[   11.747522]  irq_exit_rcu+0x12/0x20
[   11.747872]  sysvec_apic_timer_interrupt+0x81/0x90
[   11.748116]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   11.748520] 
[   11.748644] Last potentially related work creation:
[   11.749062]  kasan_save_stack+0x45/0x70
[   11.749357]  kasan_record_aux_stack+0xb2/0xc0
[   11.749584]  __call_rcu_common.constprop.0+0x72/0x9c0
[   11.750111]  call_rcu+0x12/0x20
[   11.750258]  rcu_uaf+0x168/0x330
[   11.750626]  kunit_try_run_case+0x1a5/0x480
[   11.750961]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.751209]  kthread+0x337/0x6f0
[   11.751575]  ret_from_fork+0x41/0x80
[   11.751791]  ret_from_fork_asm+0x1a/0x30
[   11.752125] 
[   11.752257] The buggy address belongs to the object at ffff888102dd04c0
[   11.752257]  which belongs to the cache kmalloc-32 of size 32
[   11.753085] The buggy address is located 0 bytes inside of
[   11.753085]  freed 32-byte region [ffff888102dd04c0, ffff888102dd04e0)
[   11.753779] 
[   11.753927] The buggy address belongs to the physical page:
[   11.754187] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102dd0
[   11.754952] flags: 0x200000000000000(node=0|zone=2)
[   11.755186] page_type: f5(slab)
[   11.755406] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   11.755749] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   11.756064] page dumped because: kasan: bad access detected
[   11.756347] 
[   11.756568] Memory state around the buggy address:
[   11.756787]  ffff888102dd0380: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   11.757148]  ffff888102dd0400: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   11.757654] >ffff888102dd0480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   11.758188]                                            ^
[   11.758653]  ffff888102dd0500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.758936]  ffff888102dd0580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.759247] ==================================================================