Hay
Date
July 22, 2025, 5:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   30.688312] ==================================================================
[   30.688837] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   30.688917] Read of size 4 at addr fff00000c923ae80 by task swapper/1/0
[   30.688962] 
[   30.689005] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B   W        N  6.16.0-rc7-next-20250722 #1 PREEMPT 
[   30.689096] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   30.689124] Hardware name: linux,dummy-virt (DT)
[   30.689157] Call trace:
[   30.689180]  show_stack+0x20/0x38 (C)
[   30.689231]  dump_stack_lvl+0x8c/0xd0
[   30.691642]  print_report+0x118/0x5e8
[   30.691791]  kasan_report+0xdc/0x128
[   30.691846]  __asan_report_load4_noabort+0x20/0x30
[   30.691896]  rcu_uaf_reclaim+0x64/0x70
[   30.692961]  rcu_core+0x9f4/0x1e58
[   30.693328]  rcu_core_si+0x18/0x30
[   30.694302]  handle_softirqs+0x374/0xb28
[   30.694628]  __do_softirq+0x1c/0x28
[   30.695676]  ____do_softirq+0x18/0x30
[   30.695785]  call_on_irq_stack+0x24/0x30
[   30.696318]  do_softirq_own_stack+0x24/0x38
[   30.696458]  __irq_exit_rcu+0x1fc/0x318
[   30.696961]  irq_exit_rcu+0x1c/0x80
[   30.697300]  el1_interrupt+0x38/0x58
[   30.697952]  el1h_64_irq_handler+0x18/0x28
[   30.699102]  el1h_64_irq+0x6c/0x70
[   30.699409]  arch_local_irq_enable+0x4/0x8 (P)
[   30.699472]  do_idle+0x384/0x4e8
[   30.700354]  cpu_startup_entry+0x68/0x80
[   30.701145]  secondary_start_kernel+0x28c/0x340
[   30.701379]  __secondary_switched+0xc0/0xc8
[   30.701594] 
[   30.701946] Allocated by task 229:
[   30.702173]  kasan_save_stack+0x3c/0x68
[   30.702857]  kasan_save_track+0x20/0x40
[   30.703735]  kasan_save_alloc_info+0x40/0x58
[   30.703886]  __kasan_kmalloc+0xd4/0xd8
[   30.704610]  __kmalloc_cache_noprof+0x16c/0x3c0
[   30.704725]  rcu_uaf+0xb0/0x2d8
[   30.704970]  kunit_try_run_case+0x170/0x3f0
[   30.705012]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.705059]  kthread+0x328/0x630
[   30.705093]  ret_from_fork+0x10/0x20
[   30.705910] 
[   30.706053] Freed by task 0:
[   30.706088]  kasan_save_stack+0x3c/0x68
[   30.706732]  kasan_save_track+0x20/0x40
[   30.707390]  kasan_save_free_info+0x4c/0x78
[   30.707442]  __kasan_slab_free+0x6c/0x98
[   30.707480]  kfree+0x214/0x3c8
[   30.707517]  rcu_uaf_reclaim+0x28/0x70
[   30.707554]  rcu_core+0x9f4/0x1e58
[   30.708717]  rcu_core_si+0x18/0x30
[   30.708985]  handle_softirqs+0x374/0xb28
[   30.709102]  __do_softirq+0x1c/0x28
[   30.709454] 
[   30.710007] Last potentially related work creation:
[   30.710612]  kasan_save_stack+0x3c/0x68
[   30.710670]  kasan_record_aux_stack+0xb4/0xc8
[   30.710710]  __call_rcu_common.constprop.0+0x74/0x8c8
[   30.710758]  call_rcu+0x18/0x30
[   30.711413]  rcu_uaf+0x14c/0x2d8
[   30.711742]  kunit_try_run_case+0x170/0x3f0
[   30.712001]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.712045]  kthread+0x328/0x630
[   30.712080]  ret_from_fork+0x10/0x20
[   30.713164] 
[   30.713204] The buggy address belongs to the object at fff00000c923ae80
[   30.713204]  which belongs to the cache kmalloc-32 of size 32
[   30.713445] The buggy address is located 0 bytes inside of
[   30.713445]  freed 32-byte region [fff00000c923ae80, fff00000c923aea0)
[   30.713510] 
[   30.714122] The buggy address belongs to the physical page:
[   30.714591] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10923a
[   30.714741] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.715937] page_type: f5(slab)
[   30.716221] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   30.716378] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   30.716631] page dumped because: kasan: bad access detected
[   30.716846] 
[   30.716939] Memory state around the buggy address:
[   30.716973]  fff00000c923ad80: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   30.718006]  fff00000c923ae00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   30.718269] >fff00000c923ae80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   30.718457]                    ^
[   30.718509]  fff00000c923af00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.719248]  fff00000c923af80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.719292] ==================================================================

[   25.661609] ==================================================================
[   25.662078] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   25.662711] Read of size 4 at addr ffff888105ed5780 by task swapper/1/0
[   25.663020] 
[   25.663133] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) 
[   25.663222] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.663238] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.663284] Call Trace:
[   25.663313]  <IRQ>
[   25.663331]  dump_stack_lvl+0x73/0xb0
[   25.663363]  print_report+0xd1/0x640
[   25.663387]  ? __virt_addr_valid+0x1db/0x2d0
[   25.663412]  ? rcu_uaf_reclaim+0x50/0x60
[   25.663432]  ? kasan_complete_mode_report_info+0x64/0x200
[   25.663459]  ? rcu_uaf_reclaim+0x50/0x60
[   25.663479]  kasan_report+0x141/0x180
[   25.663540]  ? rcu_uaf_reclaim+0x50/0x60
[   25.663589]  __asan_report_load4_noabort+0x18/0x20
[   25.663614]  rcu_uaf_reclaim+0x50/0x60
[   25.663635]  rcu_core+0x66f/0x1c40
[   25.663664]  ? __pfx_rcu_core+0x10/0x10
[   25.663686]  ? ktime_get+0x6b/0x150
[   25.663710]  ? handle_softirqs+0x18e/0x730
[   25.663735]  rcu_core_si+0x12/0x20
[   25.663755]  handle_softirqs+0x209/0x730
[   25.663776]  ? hrtimer_interrupt+0x2fe/0x780
[   25.663803]  ? __pfx_handle_softirqs+0x10/0x10
[   25.663839]  __irq_exit_rcu+0xc9/0x110
[   25.663860]  irq_exit_rcu+0x12/0x20
[   25.663880]  sysvec_apic_timer_interrupt+0x81/0x90
[   25.663908]  </IRQ>
[   25.663939]  <TASK>
[   25.663950]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   25.664041] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   25.664255] 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 d3 15 00 fb f4 <e9> bc 2a 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
[   25.664336] RSP: 0000:ffff88810087fdc8 EFLAGS: 00010202
[   25.664426] RAX: ffff8881add0e000 RBX: ffff88810085b000 RCX: ffffffffaaf2e9a5
[   25.664470] RDX: ffffed102b626193 RSI: 0000000000000004 RDI: 000000000001fde4
[   25.664514] RBP: ffff88810087fdd0 R08: 0000000000000001 R09: ffffed102b626192
[   25.664555] R10: ffff88815b130c93 R11: ffff88815b1363c8 R12: 0000000000000001
[   25.664598] R13: ffffed102010b600 R14: ffffffffacbff0d0 R15: 0000000000000000
[   25.664654]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   25.664705]  ? default_idle+0xd/0x20
[   25.664727]  arch_cpu_idle+0xd/0x20
[   25.664748]  default_idle_call+0x48/0x80
[   25.664770]  do_idle+0x379/0x4f0
[   25.664796]  ? __pfx_do_idle+0x10/0x10
[   25.664818]  ? _raw_spin_unlock_irqrestore+0x49/0x90
[   25.664856]  ? complete+0x15b/0x1d0
[   25.664891]  cpu_startup_entry+0x5c/0x70
[   25.664915]  start_secondary+0x211/0x290
[   25.664938]  ? __pfx_start_secondary+0x10/0x10
[   25.664965]  common_startup_64+0x13e/0x148
[   25.664998]  </TASK>
[   25.665009] 
[   25.675585] Allocated by task 246:
[   25.675806]  kasan_save_stack+0x45/0x70
[   25.676028]  kasan_save_track+0x18/0x40
[   25.676294]  kasan_save_alloc_info+0x3b/0x50
[   25.676576]  __kasan_kmalloc+0xb7/0xc0
[   25.676859]  __kmalloc_cache_noprof+0x189/0x420
[   25.677086]  rcu_uaf+0xb0/0x330
[   25.677541]  kunit_try_run_case+0x1a5/0x480
[   25.677765]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.678014]  kthread+0x337/0x6f0
[   25.678198]  ret_from_fork+0x116/0x1d0
[   25.678439]  ret_from_fork_asm+0x1a/0x30
[   25.678742] 
[   25.678812] Freed by task 0:
[   25.678967]  kasan_save_stack+0x45/0x70
[   25.679275]  kasan_save_track+0x18/0x40
[   25.679464]  kasan_save_free_info+0x3f/0x60
[   25.679811]  __kasan_slab_free+0x56/0x70
[   25.680073]  kfree+0x222/0x3f0
[   25.680188]  rcu_uaf_reclaim+0x1f/0x60
[   25.680351]  rcu_core+0x66f/0x1c40
[   25.680652]  rcu_core_si+0x12/0x20
[   25.680822]  handle_softirqs+0x209/0x730
[   25.680972]  __irq_exit_rcu+0xc9/0x110
[   25.681154]  irq_exit_rcu+0x12/0x20
[   25.681488]  sysvec_apic_timer_interrupt+0x81/0x90
[   25.681802]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   25.682104] 
[   25.682211] Last potentially related work creation:
[   25.682368]  kasan_save_stack+0x45/0x70
[   25.682503]  kasan_record_aux_stack+0xb2/0xc0
[   25.682846]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   25.683082]  call_rcu+0x12/0x20
[   25.683397]  rcu_uaf+0x168/0x330
[   25.684099]  kunit_try_run_case+0x1a5/0x480
[   25.684374]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.684647]  kthread+0x337/0x6f0
[   25.684767]  ret_from_fork+0x116/0x1d0
[   25.684972]  ret_from_fork_asm+0x1a/0x30
[   25.685211] 
[   25.685322] The buggy address belongs to the object at ffff888105ed5780
[   25.685322]  which belongs to the cache kmalloc-32 of size 32
[   25.685849] The buggy address is located 0 bytes inside of
[   25.685849]  freed 32-byte region [ffff888105ed5780, ffff888105ed57a0)
[   25.686351] 
[   25.686446] The buggy address belongs to the physical page:
[   25.686700] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105ed5
[   25.687047] flags: 0x200000000000000(node=0|zone=2)
[   25.687355] page_type: f5(slab)
[   25.687477] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.687794] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.688127] page dumped because: kasan: bad access detected
[   25.688406] 
[   25.688518] Memory state around the buggy address:
[   25.688751]  ffff888105ed5680: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.689118]  ffff888105ed5700: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.689485] >ffff888105ed5780: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   25.689747]                    ^
[   25.689880]  ffff888105ed5800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.690229]  ffff888105ed5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.690538] ==================================================================