Hay
Date
July 8, 2025, 4:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   18.193463] ==================================================================
[   18.193585] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   18.193656] Read of size 4 at addr fff00000c6385340 by task swapper/1/0
[   18.193704] 
[   18.193744] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT 
[   18.193828] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.193855] Hardware name: linux,dummy-virt (DT)
[   18.193888] Call trace:
[   18.193911]  show_stack+0x20/0x38 (C)
[   18.193963]  dump_stack_lvl+0x8c/0xd0
[   18.194012]  print_report+0x118/0x608
[   18.194058]  kasan_report+0xdc/0x128
[   18.194100]  __asan_report_load4_noabort+0x20/0x30
[   18.194151]  rcu_uaf_reclaim+0x64/0x70
[   18.194198]  rcu_core+0x9f4/0x1e20
[   18.194246]  rcu_core_si+0x18/0x30
[   18.194289]  handle_softirqs+0x374/0xb28
[   18.194349]  __do_softirq+0x1c/0x28
[   18.194390]  ____do_softirq+0x18/0x30
[   18.194437]  call_on_irq_stack+0x24/0x30
[   18.194482]  do_softirq_own_stack+0x24/0x38
[   18.194528]  __irq_exit_rcu+0x1fc/0x318
[   18.194573]  irq_exit_rcu+0x1c/0x80
[   18.194617]  el1_interrupt+0x38/0x58
[   18.194659]  el1h_64_irq_handler+0x18/0x28
[   18.194705]  el1h_64_irq+0x6c/0x70
[   18.194790]  arch_local_irq_enable+0x4/0x8 (P)
[   18.194845]  do_idle+0x384/0x4e8
[   18.194888]  cpu_startup_entry+0x64/0x80
[   18.194931]  secondary_start_kernel+0x288/0x340
[   18.194982]  __secondary_switched+0xc0/0xc8
[   18.195034] 
[   18.195052] Allocated by task 200:
[   18.195081]  kasan_save_stack+0x3c/0x68
[   18.195121]  kasan_save_track+0x20/0x40
[   18.195158]  kasan_save_alloc_info+0x40/0x58
[   18.195195]  __kasan_kmalloc+0xd4/0xd8
[   18.195233]  __kmalloc_cache_noprof+0x16c/0x3c0
[   18.195270]  rcu_uaf+0xb0/0x2d8
[   18.195305]  kunit_try_run_case+0x170/0x3f0
[   18.195509]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.195572]  kthread+0x328/0x630
[   18.195681]  ret_from_fork+0x10/0x20
[   18.195957] 
[   18.195977] Freed by task 0:
[   18.196005]  kasan_save_stack+0x3c/0x68
[   18.196042]  kasan_save_track+0x20/0x40
[   18.196079]  kasan_save_free_info+0x4c/0x78
[   18.196116]  __kasan_slab_free+0x6c/0x98
[   18.196154]  kfree+0x214/0x3c8
[   18.197028]  rcu_uaf_reclaim+0x28/0x70
[   18.197081]  rcu_core+0x9f4/0x1e20
[   18.197118]  rcu_core_si+0x18/0x30
[   18.197317]  handle_softirqs+0x374/0xb28
[   18.197368]  __do_softirq+0x1c/0x28
[   18.197403] 
[   18.197434] Last potentially related work creation:
[   18.197469]  kasan_save_stack+0x3c/0x68
[   18.197866]  kasan_record_aux_stack+0xb4/0xc8
[   18.197910]  __call_rcu_common.constprop.0+0x74/0x8c8
[   18.197951]  call_rcu+0x18/0x30
[   18.197983]  rcu_uaf+0x14c/0x2d8
[   18.198020]  kunit_try_run_case+0x170/0x3f0
[   18.199350]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   18.199405]  kthread+0x328/0x630
[   18.199443]  ret_from_fork+0x10/0x20
[   18.199488] 
[   18.199515] The buggy address belongs to the object at fff00000c6385340
[   18.199515]  which belongs to the cache kmalloc-32 of size 32
[   18.199573] The buggy address is located 0 bytes inside of
[   18.199573]  freed 32-byte region [fff00000c6385340, fff00000c6385360)
[   18.199633] 
[   18.199656] The buggy address belongs to the physical page:
[   18.199687] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106385
[   18.199741] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   18.199793] page_type: f5(slab)
[   18.199835] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   18.199884] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.199924] page dumped because: kasan: bad access detected
[   18.199958] 
[   18.199976] Memory state around the buggy address:
[   18.200023]  fff00000c6385200: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   18.200067]  fff00000c6385280: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   18.200121] >fff00000c6385300: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   18.200158]                                            ^
[   18.200192]  fff00000c6385380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.200235]  fff00000c6385400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.200284] ==================================================================

[   11.882978] ==================================================================
[   11.883494] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   11.883733] Read of size 4 at addr ffff8881035f8980 by task swapper/0/0
[   11.883976] 
[   11.884068] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.15.6-rc1 #1 PREEMPT(voluntary) 
[   11.884130] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.884142] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.884166] Call Trace:
[   11.884192]  <IRQ>
[   11.884208]  dump_stack_lvl+0x73/0xb0
[   11.884237]  print_report+0xd1/0x650
[   11.884262]  ? __virt_addr_valid+0x1db/0x2d0
[   11.884285]  ? rcu_uaf_reclaim+0x50/0x60
[   11.884307]  ? kasan_complete_mode_report_info+0x64/0x200
[   11.884330]  ? rcu_uaf_reclaim+0x50/0x60
[   11.884352]  kasan_report+0x141/0x180
[   11.884376]  ? rcu_uaf_reclaim+0x50/0x60
[   11.884402]  __asan_report_load4_noabort+0x18/0x20
[   11.884424]  rcu_uaf_reclaim+0x50/0x60
[   11.884446]  rcu_core+0x66c/0x1c30
[   11.884477]  ? __pfx_rcu_core+0x10/0x10
[   11.884500]  ? ktime_get+0x6b/0x150
[   11.884530]  rcu_core_si+0x12/0x20
[   11.884548]  handle_softirqs+0x209/0x730
[   11.884572]  ? hrtimer_interrupt+0x2fe/0x780
[   11.884597]  ? __pfx_handle_softirqs+0x10/0x10
[   11.884624]  __irq_exit_rcu+0xc9/0x110
[   11.884646]  irq_exit_rcu+0x12/0x20
[   11.884664]  sysvec_apic_timer_interrupt+0x81/0x90
[   11.884686]  </IRQ>
[   11.884710]  <TASK>
[   11.884721]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   11.884807] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   11.885025] 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 63 86 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.885111] RSP: 0000:ffffffff95407dd8 EFLAGS: 00010212
[   11.885206] RAX: ffff8881c4890000 RBX: ffffffff9541ca80 RCX: ffffffff94211f75
[   11.885253] RDX: ffffed102b606103 RSI: 0000000000000004 RDI: 00000000000064bc
[   11.885304] RBP: ffffffff95407de0 R08: 0000000000000001 R09: ffffed102b606102
[   11.885350] R10: ffff88815b030813 R11: ffffffff967a5300 R12: 0000000000000000
[   11.885394] R13: fffffbfff2a83950 R14: ffffffff95f9ca10 R15: 0000000000000000
[   11.885452]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   11.885505]  ? default_idle+0xd/0x20
[   11.885527]  arch_cpu_idle+0xd/0x20
[   11.885547]  default_idle_call+0x48/0x80
[   11.885568]  do_idle+0x379/0x4f0
[   11.885592]  ? __pfx_do_idle+0x10/0x10
[   11.885612]  ? trace_preempt_on+0x20/0xc0
[   11.885636]  ? schedule+0x86/0x2e0
[   11.885657]  ? preempt_count_sub+0x50/0x80
[   11.885681]  cpu_startup_entry+0x5c/0x70
[   11.885702]  rest_init+0x11a/0x140
[   11.885722]  ? acpi_subsystem_init+0x5d/0x150
[   11.885750]  start_kernel+0x32b/0x410
[   11.885774]  x86_64_start_reservations+0x1c/0x30
[   11.885798]  x86_64_start_kernel+0xcf/0xe0
[   11.885820]  common_startup_64+0x13e/0x148
[   11.885853]  </TASK>
[   11.885865] 
[   11.898228] Allocated by task 218:
[   11.898414]  kasan_save_stack+0x45/0x70
[   11.898610]  kasan_save_track+0x18/0x40
[   11.899174]  kasan_save_alloc_info+0x3b/0x50
[   11.899351]  __kasan_kmalloc+0xb7/0xc0
[   11.899704]  __kmalloc_cache_noprof+0x189/0x420
[   11.900010]  rcu_uaf+0xb0/0x330
[   11.900154]  kunit_try_run_case+0x1a5/0x480
[   11.900441]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.900816]  kthread+0x337/0x6f0
[   11.900999]  ret_from_fork+0x41/0x80
[   11.901288]  ret_from_fork_asm+0x1a/0x30
[   11.901491] 
[   11.901577] Freed by task 0:
[   11.901720]  kasan_save_stack+0x45/0x70
[   11.901911]  kasan_save_track+0x18/0x40
[   11.902100]  kasan_save_free_info+0x3f/0x60
[   11.902287]  __kasan_slab_free+0x56/0x70
[   11.902470]  kfree+0x222/0x3f0
[   11.903032]  rcu_uaf_reclaim+0x1f/0x60
[   11.903220]  rcu_core+0x66c/0x1c30
[   11.903356]  rcu_core_si+0x12/0x20
[   11.903748]  handle_softirqs+0x209/0x730
[   11.903953]  __irq_exit_rcu+0xc9/0x110
[   11.904262]  irq_exit_rcu+0x12/0x20
[   11.904420]  sysvec_apic_timer_interrupt+0x81/0x90
[   11.904676]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   11.905032] 
[   11.905160] Last potentially related work creation:
[   11.905363]  kasan_save_stack+0x45/0x70
[   11.905586]  kasan_record_aux_stack+0xb2/0xc0
[   11.906145]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   11.906442]  call_rcu+0x12/0x20
[   11.906572]  rcu_uaf+0x168/0x330
[   11.907053]  kunit_try_run_case+0x1a5/0x480
[   11.907349]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.907629]  kthread+0x337/0x6f0
[   11.907890]  ret_from_fork+0x41/0x80
[   11.908039]  ret_from_fork_asm+0x1a/0x30
[   11.908252] 
[   11.908354] The buggy address belongs to the object at ffff8881035f8980
[   11.908354]  which belongs to the cache kmalloc-32 of size 32
[   11.909153] The buggy address is located 0 bytes inside of
[   11.909153]  freed 32-byte region [ffff8881035f8980, ffff8881035f89a0)
[   11.909648] 
[   11.909898] The buggy address belongs to the physical page:
[   11.910142] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1035f8
[   11.910632] flags: 0x200000000000000(node=0|zone=2)
[   11.910955] page_type: f5(slab)
[   11.911140] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   11.911649] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   11.911978] page dumped because: kasan: bad access detected
[   11.912217] 
[   11.912299] Memory state around the buggy address:
[   11.912519]  ffff8881035f8880: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   11.913107]  ffff8881035f8900: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   11.913486] >ffff8881035f8980: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   11.913809]                    ^
[   11.913979]  ffff8881035f8a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.914273]  ffff8881035f8a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.914823] ==================================================================