Hay
Date
July 22, 2025, 2:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.712013] ==================================================================
[   17.712617] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   17.712712] Read of size 4 at addr fff00000c6fcc2c0 by task swapper/0/0
[   17.712760] 
[   17.713108] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT 
[   17.713524] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.713629] Hardware name: linux,dummy-virt (DT)
[   17.713664] Call trace:
[   17.713692]  show_stack+0x20/0x38 (C)
[   17.713747]  dump_stack_lvl+0x8c/0xd0
[   17.713796]  print_report+0x118/0x5d0
[   17.714174]  kasan_report+0xdc/0x128
[   17.714245]  __asan_report_load4_noabort+0x20/0x30
[   17.714307]  rcu_uaf_reclaim+0x64/0x70
[   17.714668]  rcu_core+0x9f4/0x1e20
[   17.714858]  rcu_core_si+0x18/0x30
[   17.715262]  handle_softirqs+0x374/0xb28
[   17.715411]  __do_softirq+0x1c/0x28
[   17.715583]  ____do_softirq+0x18/0x30
[   17.715633]  call_on_irq_stack+0x24/0x30
[   17.716042]  do_softirq_own_stack+0x24/0x38
[   17.716103]  __irq_exit_rcu+0x1fc/0x318
[   17.716321]  irq_exit_rcu+0x1c/0x80
[   17.716516]  el1_interrupt+0x38/0x58
[   17.716579]  el1h_64_irq_handler+0x18/0x28
[   17.716803]  el1h_64_irq+0x6c/0x70
[   17.717296]  arch_local_irq_enable+0x4/0x8 (P)
[   17.717767]  do_idle+0x384/0x4e8
[   17.717856]  cpu_startup_entry+0x68/0x80
[   17.718035]  rest_init+0x160/0x188
[   17.718278]  start_kernel+0x308/0x3d0
[   17.718546]  __primary_switched+0x8c/0xa0
[   17.718835] 
[   17.718861] Allocated by task 200:
[   17.718894]  kasan_save_stack+0x3c/0x68
[   17.719312]  kasan_save_track+0x20/0x40
[   17.719438]  kasan_save_alloc_info+0x40/0x58
[   17.719497]  __kasan_kmalloc+0xd4/0xd8
[   17.719702]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.719962]  rcu_uaf+0xb0/0x2d8
[   17.720022]  kunit_try_run_case+0x170/0x3f0
[   17.720246]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.720462]  kthread+0x328/0x630
[   17.720566]  ret_from_fork+0x10/0x20
[   17.720743] 
[   17.720911] Freed by task 0:
[   17.721061]  kasan_save_stack+0x3c/0x68
[   17.721105]  kasan_save_track+0x20/0x40
[   17.721386]  kasan_save_free_info+0x4c/0x78
[   17.721584]  __kasan_slab_free+0x6c/0x98
[   17.721672]  kfree+0x214/0x3c8
[   17.721750]  rcu_uaf_reclaim+0x28/0x70
[   17.722012]  rcu_core+0x9f4/0x1e20
[   17.722406]  rcu_core_si+0x18/0x30
[   17.722573]  handle_softirqs+0x374/0xb28
[   17.722772]  __do_softirq+0x1c/0x28
[   17.722988] 
[   17.723310] Last potentially related work creation:
[   17.723548]  kasan_save_stack+0x3c/0x68
[   17.723662]  kasan_record_aux_stack+0xb4/0xc8
[   17.723983]  __call_rcu_common.constprop.0+0x74/0x8c8
[   17.724274]  call_rcu+0x18/0x30
[   17.724342]  rcu_uaf+0x14c/0x2d8
[   17.724378]  kunit_try_run_case+0x170/0x3f0
[   17.724528]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.724575]  kthread+0x328/0x630
[   17.724612]  ret_from_fork+0x10/0x20
[   17.724683] 
[   17.724739] The buggy address belongs to the object at fff00000c6fcc2c0
[   17.724739]  which belongs to the cache kmalloc-32 of size 32
[   17.724832] The buggy address is located 0 bytes inside of
[   17.724832]  freed 32-byte region [fff00000c6fcc2c0, fff00000c6fcc2e0)
[   17.724892] 
[   17.724913] The buggy address belongs to the physical page:
[   17.724953] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106fcc
[   17.725017] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.725085] page_type: f5(slab)
[   17.725126] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   17.725186] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   17.725235] page dumped because: kasan: bad access detected
[   17.725299] 
[   17.725325] Memory state around the buggy address:
[   17.725367]  fff00000c6fcc180: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   17.725410]  fff00000c6fcc200: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   17.725474] >fff00000c6fcc280: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   17.725511]                                            ^
[   17.725544]  fff00000c6fcc300: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.725586]  fff00000c6fcc380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.725639] ==================================================================

[   11.671959] ==================================================================
[   11.672882] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   11.673304] Read of size 4 at addr ffff8881028bd240 by task swapper/1/0
[   11.674000] 
[   11.674120] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT(voluntary) 
[   11.674167] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.674178] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.674200] Call Trace:
[   11.674244]  <IRQ>
[   11.674261]  dump_stack_lvl+0x73/0xb0
[   11.674289]  print_report+0xd1/0x610
[   11.674312]  ? __virt_addr_valid+0x1db/0x2d0
[   11.674332]  ? rcu_uaf_reclaim+0x50/0x60
[   11.674352]  ? kasan_complete_mode_report_info+0x64/0x200
[   11.674374]  ? rcu_uaf_reclaim+0x50/0x60
[   11.674394]  kasan_report+0x141/0x180
[   11.674416]  ? rcu_uaf_reclaim+0x50/0x60
[   11.674441]  __asan_report_load4_noabort+0x18/0x20
[   11.674476]  rcu_uaf_reclaim+0x50/0x60
[   11.674507]  rcu_core+0x66c/0x1c30
[   11.674532]  ? enqueue_hrtimer+0xfe/0x210
[   11.674566]  ? __pfx_rcu_core+0x10/0x10
[   11.674588]  ? ktime_get+0x6b/0x150
[   11.674611]  ? handle_softirqs+0x18e/0x730
[   11.674636]  rcu_core_si+0x12/0x20
[   11.674653]  handle_softirqs+0x209/0x730
[   11.674673]  ? hrtimer_interrupt+0x2fe/0x780
[   11.674695]  ? __pfx_handle_softirqs+0x10/0x10
[   11.674721]  __irq_exit_rcu+0xc9/0x110
[   11.674742]  irq_exit_rcu+0x12/0x20
[   11.674759]  sysvec_apic_timer_interrupt+0x81/0x90
[   11.674780]  </IRQ>
[   11.674807]  <TASK>
[   11.674817]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   11.674904] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   11.675106] 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 03 77 27 00 fb f4 <c3> cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
[   11.675184] RSP: 0000:ffff88810086fdc8 EFLAGS: 00010216
[   11.675283] RAX: ffff8881a8b90000 RBX: ffff8881008353c0 RCX: ffffffffb0012fb5
[   11.675328] RDX: ffffed102b626103 RSI: 0000000000000004 RDI: 000000000001c90c
[   11.675386] RBP: ffff88810086fdd0 R08: 0000000000000001 R09: ffffed102b626102
[   11.675429] R10: ffff88815b130813 R11: 0000000000000000 R12: 0000000000000001
[   11.675470] R13: ffffed1020106a78 R14: ffffffffb1d9d310 R15: 0000000000000000
[   11.675525]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   11.675575]  ? default_idle+0xd/0x20
[   11.675595]  arch_cpu_idle+0xd/0x20
[   11.675613]  default_idle_call+0x48/0x80
[   11.675633]  do_idle+0x379/0x4f0
[   11.675652]  ? complete+0x15b/0x1d0
[   11.675672]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.675699]  ? __pfx_do_idle+0x10/0x10
[   11.675717]  ? _raw_spin_unlock_irqrestore+0x49/0x90
[   11.675741]  ? complete+0x15b/0x1d0
[   11.675763]  cpu_startup_entry+0x5c/0x70
[   11.675783]  start_secondary+0x211/0x290
[   11.675803]  ? __pfx_start_secondary+0x10/0x10
[   11.675827]  common_startup_64+0x13e/0x148
[   11.675858]  </TASK>
[   11.675869] 
[   11.687967] Allocated by task 218:
[   11.688104]  kasan_save_stack+0x45/0x70
[   11.688322]  kasan_save_track+0x18/0x40
[   11.688693]  kasan_save_alloc_info+0x3b/0x50
[   11.688864]  __kasan_kmalloc+0xb7/0xc0
[   11.689049]  __kmalloc_cache_noprof+0x189/0x420
[   11.689283]  rcu_uaf+0xb0/0x330
[   11.689854]  kunit_try_run_case+0x1a5/0x480
[   11.690055]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.690433]  kthread+0x337/0x6f0
[   11.690675]  ret_from_fork+0x41/0x80
[   11.690813]  ret_from_fork_asm+0x1a/0x30
[   11.691124] 
[   11.691202] Freed by task 0:
[   11.691332]  kasan_save_stack+0x45/0x70
[   11.691531]  kasan_save_track+0x18/0x40
[   11.691720]  kasan_save_free_info+0x3f/0x60
[   11.691864]  __kasan_slab_free+0x56/0x70
[   11.692062]  kfree+0x222/0x3f0
[   11.692221]  rcu_uaf_reclaim+0x1f/0x60
[   11.692749]  rcu_core+0x66c/0x1c30
[   11.692881]  rcu_core_si+0x12/0x20
[   11.693128]  handle_softirqs+0x209/0x730
[   11.693420]  __irq_exit_rcu+0xc9/0x110
[   11.693650]  irq_exit_rcu+0x12/0x20
[   11.693958]  sysvec_apic_timer_interrupt+0x81/0x90
[   11.694240]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   11.694558] 
[   11.694681] Last potentially related work creation:
[   11.694994]  kasan_save_stack+0x45/0x70
[   11.695195]  kasan_record_aux_stack+0xb2/0xc0
[   11.695381]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   11.695583]  call_rcu+0x12/0x20
[   11.695748]  rcu_uaf+0x168/0x330
[   11.695901]  kunit_try_run_case+0x1a5/0x480
[   11.696084]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.696755]  kthread+0x337/0x6f0
[   11.696884]  ret_from_fork+0x41/0x80
[   11.697221]  ret_from_fork_asm+0x1a/0x30
[   11.697405] 
[   11.697615] The buggy address belongs to the object at ffff8881028bd240
[   11.697615]  which belongs to the cache kmalloc-32 of size 32
[   11.698257] The buggy address is located 0 bytes inside of
[   11.698257]  freed 32-byte region [ffff8881028bd240, ffff8881028bd260)
[   11.698903] 
[   11.699102] The buggy address belongs to the physical page:
[   11.699398] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028bd
[   11.699806] flags: 0x200000000000000(node=0|zone=2)
[   11.700014] page_type: f5(slab)
[   11.700266] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   11.700717] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   11.701109] page dumped because: kasan: bad access detected
[   11.701375] 
[   11.701468] Memory state around the buggy address:
[   11.701795]  ffff8881028bd100: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   11.702100]  ffff8881028bd180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   11.702579] >ffff8881028bd200: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   11.702887]                                            ^
[   11.703183]  ffff8881028bd280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.703466]  ffff8881028bd300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.703886] ==================================================================