Hay
Date
June 23, 2025, 1:39 p.m.

Environment
qemu-arm64
qemu-x86_64

[   25.316889] ==================================================================
[   25.317119] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   25.317282] Read of size 4 at addr fff00000c76c24c0 by task swapper/0/0
[   25.317384] 
[   25.317487] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT 
[   25.317677] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.317738] Hardware name: linux,dummy-virt (DT)
[   25.317809] Call trace:
[   25.317861]  show_stack+0x20/0x38 (C)
[   25.317980]  dump_stack_lvl+0x8c/0xd0
[   25.318096]  print_report+0x118/0x608
[   25.318201]  kasan_report+0xdc/0x128
[   25.318305]  __asan_report_load4_noabort+0x20/0x30
[   25.322195]  rcu_uaf_reclaim+0x64/0x70
[   25.322628]  rcu_core+0x9f4/0x1e20
[   25.323309]  rcu_core_si+0x18/0x30
[   25.324550]  handle_softirqs+0x374/0xb28
[   25.324882]  __do_softirq+0x1c/0x28
[   25.325483]  ____do_softirq+0x18/0x30
[   25.326245]  call_on_irq_stack+0x24/0x30
[   25.327021]  do_softirq_own_stack+0x24/0x38
[   25.327234]  __irq_exit_rcu+0x1fc/0x318
[   25.327353]  irq_exit_rcu+0x1c/0x80
[   25.328059]  el1_interrupt+0x38/0x58
[   25.328658]  el1h_64_irq_handler+0x18/0x28
[   25.328998]  el1h_64_irq+0x6c/0x70
[   25.330113]  arch_local_irq_enable+0x4/0x8 (P)
[   25.330242]  do_idle+0x384/0x4e8
[   25.331105]  cpu_startup_entry+0x68/0x80
[   25.331713]  rest_init+0x160/0x188
[   25.332097]  start_kernel+0x308/0x3d0
[   25.332258]  __primary_switched+0x8c/0xa0
[   25.332895] 
[   25.332950] Allocated by task 200:
[   25.333409]  kasan_save_stack+0x3c/0x68
[   25.333513]  kasan_save_track+0x20/0x40
[   25.333607]  kasan_save_alloc_info+0x40/0x58
[   25.334117]  __kasan_kmalloc+0xd4/0xd8
[   25.334599]  __kmalloc_cache_noprof+0x16c/0x3c0
[   25.335172]  rcu_uaf+0xb0/0x2d8
[   25.335306]  kunit_try_run_case+0x170/0x3f0
[   25.335586]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.335813]  kthread+0x328/0x630
[   25.335933]  ret_from_fork+0x10/0x20
[   25.336037] 
[   25.336245] Freed by task 0:
[   25.336331]  kasan_save_stack+0x3c/0x68
[   25.336828]  kasan_save_track+0x20/0x40
[   25.337139]  kasan_save_free_info+0x4c/0x78
[   25.337418]  __kasan_slab_free+0x6c/0x98
[   25.337900]  kfree+0x214/0x3c8
[   25.338404]  rcu_uaf_reclaim+0x28/0x70
[   25.338706]  rcu_core+0x9f4/0x1e20
[   25.338850]  rcu_core_si+0x18/0x30
[   25.339052]  handle_softirqs+0x374/0xb28
[   25.339263]  __do_softirq+0x1c/0x28
[   25.339418] 
[   25.339488] Last potentially related work creation:
[   25.339570]  kasan_save_stack+0x3c/0x68
[   25.340306]  kasan_record_aux_stack+0xb4/0xc8
[   25.340439]  __call_rcu_common.constprop.0+0x70/0x8b0
[   25.340558]  call_rcu+0x18/0x30
[   25.340656]  rcu_uaf+0x14c/0x2d8
[   25.340765]  kunit_try_run_case+0x170/0x3f0
[   25.340878]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   25.341738]  kthread+0x328/0x630
[   25.342194]  ret_from_fork+0x10/0x20
[   25.342303] 
[   25.342366] The buggy address belongs to the object at fff00000c76c24c0
[   25.342366]  which belongs to the cache kmalloc-32 of size 32
[   25.342523] The buggy address is located 0 bytes inside of
[   25.342523]  freed 32-byte region [fff00000c76c24c0, fff00000c76c24e0)
[   25.342731] 
[   25.343151] The buggy address belongs to the physical page:
[   25.343267] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076c2
[   25.343560] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   25.344221] page_type: f5(slab)
[   25.344364] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   25.344506] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.344686] page dumped because: kasan: bad access detected
[   25.344773] 
[   25.345045] Memory state around the buggy address:
[   25.345163]  fff00000c76c2380: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   25.345862]  fff00000c76c2400: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   25.346415] >fff00000c76c2480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.346626]                                            ^
[   25.346773]  fff00000c76c2500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.346912]  fff00000c76c2580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.347267] ==================================================================

[   18.157867] ==================================================================
[   18.158818] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   18.159327] Read of size 4 at addr ffff88810a07c480 by task swapper/1/0
[   18.160047] 
[   18.160303] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.15.4-rc1 #1 PREEMPT(voluntary) 
[   18.160425] Tainted: [B]=BAD_PAGE, [N]=TEST
[   18.160461] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   18.160520] Call Trace:
[   18.160580]  <IRQ>
[   18.160933]  dump_stack_lvl+0x73/0xb0
[   18.161019]  print_report+0xd1/0x650
[   18.161088]  ? __virt_addr_valid+0x1db/0x2d0
[   18.161128]  ? rcu_uaf_reclaim+0x50/0x60
[   18.161160]  ? kasan_complete_mode_report_info+0x64/0x200
[   18.161194]  ? rcu_uaf_reclaim+0x50/0x60
[   18.161241]  kasan_report+0x141/0x180
[   18.161646]  ? rcu_uaf_reclaim+0x50/0x60
[   18.161880]  __asan_report_load4_noabort+0x18/0x20
[   18.161927]  rcu_uaf_reclaim+0x50/0x60
[   18.161959]  rcu_core+0x66c/0x1c30
[   18.162003]  ? __pfx_rcu_core+0x10/0x10
[   18.162038]  ? ktime_get+0x6b/0x150
[   18.162078]  rcu_core_si+0x12/0x20
[   18.162103]  handle_softirqs+0x209/0x730
[   18.162137]  ? hrtimer_interrupt+0x2fe/0x780
[   18.162170]  ? __pfx_handle_softirqs+0x10/0x10
[   18.162209]  __irq_exit_rcu+0xc9/0x110
[   18.162270]  irq_exit_rcu+0x12/0x20
[   18.162298]  sysvec_apic_timer_interrupt+0x81/0x90
[   18.162337]  </IRQ>
[   18.162377]  <TASK>
[   18.162394]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   18.162508] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   18.162834] 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 83 cd 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
[   18.162947] RSP: 0000:ffff88810086fdc8 EFLAGS: 00010206
[   18.163070] RAX: ffff8881b2593000 RBX: ffff8881008353c0 RCX: ffffffffa660d015
[   18.163133] RDX: ffffed102b626103 RSI: 0000000000000004 RDI: 000000000001eb94
[   18.163194] RBP: ffff88810086fdd0 R08: 0000000000000001 R09: ffffed102b626102
[   18.163277] R10: ffff88815b130813 R11: 0000000000034000 R12: 0000000000000001
[   18.163340] R13: ffffed1020106a78 R14: ffffffffa839c210 R15: 0000000000000000
[   18.163419]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   18.163492]  ? default_idle+0xd/0x20
[   18.163524]  arch_cpu_idle+0xd/0x20
[   18.163551]  default_idle_call+0x48/0x80
[   18.163581]  do_idle+0x379/0x4f0
[   18.163671]  ? __pfx_do_idle+0x10/0x10
[   18.163739]  ? _raw_spin_unlock_irqrestore+0x49/0x90
[   18.163781]  ? complete+0x15b/0x1d0
[   18.163816]  cpu_startup_entry+0x5c/0x70
[   18.163847]  start_secondary+0x211/0x290
[   18.163877]  ? __pfx_start_secondary+0x10/0x10
[   18.163912]  common_startup_64+0x13e/0x148
[   18.163953]  </TASK>
[   18.163968] 
[   18.188971] Allocated by task 219:
[   18.189297]  kasan_save_stack+0x45/0x70
[   18.189987]  kasan_save_track+0x18/0x40
[   18.190537]  kasan_save_alloc_info+0x3b/0x50
[   18.191085]  __kasan_kmalloc+0xb7/0xc0
[   18.191736]  __kmalloc_cache_noprof+0x189/0x420
[   18.192275]  rcu_uaf+0xb0/0x330
[   18.193159]  kunit_try_run_case+0x1a5/0x480
[   18.193826]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.194470]  kthread+0x337/0x6f0
[   18.195042]  ret_from_fork+0x41/0x80
[   18.195447]  ret_from_fork_asm+0x1a/0x30
[   18.196108] 
[   18.196330] Freed by task 0:
[   18.197382]  kasan_save_stack+0x45/0x70
[   18.197908]  kasan_save_track+0x18/0x40
[   18.198323]  kasan_save_free_info+0x3f/0x60
[   18.198726]  __kasan_slab_free+0x56/0x70
[   18.199106]  kfree+0x222/0x3f0
[   18.199468]  rcu_uaf_reclaim+0x1f/0x60
[   18.200249]  rcu_core+0x66c/0x1c30
[   18.200618]  rcu_core_si+0x12/0x20
[   18.201447]  handle_softirqs+0x209/0x730
[   18.202272]  __irq_exit_rcu+0xc9/0x110
[   18.202537]  irq_exit_rcu+0x12/0x20
[   18.203011]  sysvec_apic_timer_interrupt+0x81/0x90
[   18.203738]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   18.204708] 
[   18.205542] Last potentially related work creation:
[   18.206119]  kasan_save_stack+0x45/0x70
[   18.206527]  kasan_record_aux_stack+0xb2/0xc0
[   18.206883]  __call_rcu_common.constprop.0+0x72/0x9c0
[   18.207374]  call_rcu+0x12/0x20
[   18.207766]  rcu_uaf+0x168/0x330
[   18.208107]  kunit_try_run_case+0x1a5/0x480
[   18.208541]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   18.209459]  kthread+0x337/0x6f0
[   18.209934]  ret_from_fork+0x41/0x80
[   18.210366]  ret_from_fork_asm+0x1a/0x30
[   18.210911] 
[   18.211152] The buggy address belongs to the object at ffff88810a07c480
[   18.211152]  which belongs to the cache kmalloc-32 of size 32
[   18.212289] The buggy address is located 0 bytes inside of
[   18.212289]  freed 32-byte region [ffff88810a07c480, ffff88810a07c4a0)
[   18.213545] 
[   18.213927] The buggy address belongs to the physical page:
[   18.214427] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10a07c
[   18.215136] flags: 0x200000000000000(node=0|zone=2)
[   18.215676] page_type: f5(slab)
[   18.216034] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   18.216601] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   18.217744] page dumped because: kasan: bad access detected
[   18.218169] 
[   18.218445] Memory state around the buggy address:
[   18.218996]  ffff88810a07c380: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   18.219754]  ffff88810a07c400: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   18.220420] >ffff88810a07c480: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   18.221319]                    ^
[   18.221829]  ffff88810a07c500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.222443]  ffff88810a07c580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   18.223107] ==================================================================