Hay
Date
July 18, 2025, 1:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   31.920876] ==================================================================
[   31.921009] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   31.921093] Read of size 4 at addr fff00000c401e0c0 by task swapper/0/0
[   31.921141] 
[   31.921181] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT 
[   31.921266] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.921292] Hardware name: linux,dummy-virt (DT)
[   31.921326] Call trace:
[   31.921350]  show_stack+0x20/0x38 (C)
[   31.921401]  dump_stack_lvl+0x8c/0xd0
[   31.921449]  print_report+0x118/0x5e8
[   31.921493]  kasan_report+0xdc/0x128
[   31.921535]  __asan_report_load4_noabort+0x20/0x30
[   31.921581]  rcu_uaf_reclaim+0x64/0x70
[   31.921625]  rcu_core+0x9f4/0x1e58
[   31.921670]  rcu_core_si+0x18/0x30
[   31.921713]  handle_softirqs+0x374/0xb28
[   31.921758]  __do_softirq+0x1c/0x28
[   31.921801]  ____do_softirq+0x18/0x30
[   31.921842]  call_on_irq_stack+0x24/0x30
[   31.921885]  do_softirq_own_stack+0x24/0x38
[   31.921931]  __irq_exit_rcu+0x1fc/0x318
[   31.921975]  irq_exit_rcu+0x1c/0x80
[   31.922016]  el1_interrupt+0x38/0x58
[   31.922067]  el1h_64_irq_handler+0x18/0x28
[   31.922198]  el1h_64_irq+0x6c/0x70
[   31.922316]  arch_local_irq_enable+0x4/0x8 (P)
[   31.922683]  do_idle+0x384/0x4e8
[   31.922773]  cpu_startup_entry+0x68/0x80
[   31.922831]  rest_init+0x160/0x188
[   31.922874]  start_kernel+0x30c/0x3d0
[   31.922930]  __primary_switched+0x8c/0xa0
[   31.922982] 
[   31.923002] Allocated by task 229:
[   31.923032]  kasan_save_stack+0x3c/0x68
[   31.923072]  kasan_save_track+0x20/0x40
[   31.923122]  kasan_save_alloc_info+0x40/0x58
[   31.923161]  __kasan_kmalloc+0xd4/0xd8
[   31.923195]  __kmalloc_cache_noprof+0x16c/0x3c0
[   31.923237]  rcu_uaf+0xb0/0x2d8
[   31.923282]  kunit_try_run_case+0x170/0x3f0
[   31.923321]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.923364]  kthread+0x328/0x630
[   31.923396]  ret_from_fork+0x10/0x20
[   31.923432] 
[   31.923451] Freed by task 0:
[   31.923477]  kasan_save_stack+0x3c/0x68
[   31.923511]  kasan_save_track+0x20/0x40
[   31.923546]  kasan_save_free_info+0x4c/0x78
[   31.923584]  __kasan_slab_free+0x6c/0x98
[   31.923821]  kfree+0x214/0x3c8
[   31.923872]  rcu_uaf_reclaim+0x28/0x70
[   31.923910]  rcu_core+0x9f4/0x1e58
[   31.923947]  rcu_core_si+0x18/0x30
[   31.923981]  handle_softirqs+0x374/0xb28
[   31.924215]  __do_softirq+0x1c/0x28
[   31.924307] 
[   31.924535] Last potentially related work creation:
[   31.924596]  kasan_save_stack+0x3c/0x68
[   31.924637]  kasan_record_aux_stack+0xb4/0xc8
[   31.924677]  __call_rcu_common.constprop.0+0x74/0x8c8
[   31.924718]  call_rcu+0x18/0x30
[   31.924754]  rcu_uaf+0x14c/0x2d8
[   31.924793]  kunit_try_run_case+0x170/0x3f0
[   31.924830]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.924873]  kthread+0x328/0x630
[   31.924919]  ret_from_fork+0x10/0x20
[   31.924994] 
[   31.925184] The buggy address belongs to the object at fff00000c401e0c0
[   31.925184]  which belongs to the cache kmalloc-32 of size 32
[   31.925405] The buggy address is located 0 bytes inside of
[   31.925405]  freed 32-byte region [fff00000c401e0c0, fff00000c401e0e0)
[   31.925720] 
[   31.925793] The buggy address belongs to the physical page:
[   31.926065] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10401e
[   31.926374] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.926705] page_type: f5(slab)
[   31.926808] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   31.927288] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   31.927360] page dumped because: kasan: bad access detected
[   31.927463] 
[   31.927549] Memory state around the buggy address:
[   31.927603]  fff00000c401df80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.927663]  fff00000c401e000: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   31.927740] >fff00000c401e080: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   31.927779]                                            ^
[   31.927949]  fff00000c401e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.927996]  fff00000c401e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.928159] ==================================================================


[   25.398059] ==================================================================
[   25.398562] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   25.399051] Read of size 4 at addr ffff888102b41ac0 by task swapper/1/0
[   25.399352] 
[   25.399484] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.16.0-rc6-next-20250718 #1 PREEMPT(voluntary) 
[   25.399533] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.399545] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.399567] Call Trace:
[   25.399595]  <IRQ>
[   25.399611]  dump_stack_lvl+0x73/0xb0
[   25.399645]  print_report+0xd1/0x640
[   25.399691]  ? __virt_addr_valid+0x1db/0x2d0
[   25.399715]  ? rcu_uaf_reclaim+0x50/0x60
[   25.399734]  ? kasan_complete_mode_report_info+0x64/0x200
[   25.399777]  ? rcu_uaf_reclaim+0x50/0x60
[   25.399796]  kasan_report+0x141/0x180
[   25.399828]  ? rcu_uaf_reclaim+0x50/0x60
[   25.399852]  __asan_report_load4_noabort+0x18/0x20
[   25.399875]  rcu_uaf_reclaim+0x50/0x60
[   25.399895]  rcu_core+0x66f/0x1c40
[   25.399923]  ? __pfx_rcu_core+0x10/0x10
[   25.399944]  ? ktime_get+0x6b/0x150
[   25.399966]  ? handle_softirqs+0x18e/0x730
[   25.399989]  rcu_core_si+0x12/0x20
[   25.400009]  handle_softirqs+0x209/0x730
[   25.400028]  ? hrtimer_interrupt+0x2fe/0x780
[   25.400054]  ? __pfx_handle_softirqs+0x10/0x10
[   25.400153]  __irq_exit_rcu+0xc9/0x110
[   25.400179]  irq_exit_rcu+0x12/0x20
[   25.400198]  sysvec_apic_timer_interrupt+0x81/0x90
[   25.400236]  </IRQ>
[   25.400267]  <TASK>
[   25.400280]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   25.400397] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   25.400627] 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 b3 16 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.400707] RSP: 0000:ffff88810087fdc8 EFLAGS: 00010212
[   25.400795] RAX: ffff8881a3313000 RBX: ffff88810085b000 RCX: ffffffffb59209a5
[   25.401014] RDX: ffffed102b626193 RSI: 0000000000000004 RDI: 000000000001e39c
[   25.401061] RBP: ffff88810087fdd0 R08: 0000000000000001 R09: ffffed102b626192
[   25.401104] R10: ffff88815b130c93 R11: ffff88815b1363c8 R12: 0000000000000001
[   25.401148] R13: ffffed102010b600 R14: ffffffffb75fb2d0 R15: 0000000000000000
[   25.401206]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   25.401279]  ? default_idle+0xd/0x20
[   25.401299]  arch_cpu_idle+0xd/0x20
[   25.401317]  default_idle_call+0x48/0x80
[   25.401336]  do_idle+0x379/0x4f0
[   25.401362]  ? __pfx_do_idle+0x10/0x10
[   25.401382]  ? _raw_spin_unlock_irqrestore+0x49/0x90
[   25.401415]  ? complete+0x15b/0x1d0
[   25.401441]  cpu_startup_entry+0x5c/0x70
[   25.401464]  start_secondary+0x211/0x290
[   25.401486]  ? __pfx_start_secondary+0x10/0x10
[   25.401511]  common_startup_64+0x13e/0x148
[   25.401542]  </TASK>
[   25.401553] 
[   25.414419] Allocated by task 246:
[   25.414938]  kasan_save_stack+0x45/0x70
[   25.415447]  kasan_save_track+0x18/0x40
[   25.415614]  kasan_save_alloc_info+0x3b/0x50
[   25.415998]  __kasan_kmalloc+0xb7/0xc0
[   25.416162]  __kmalloc_cache_noprof+0x189/0x420
[   25.416630]  rcu_uaf+0xb0/0x330
[   25.417028]  kunit_try_run_case+0x1a5/0x480
[   25.417199]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.417539]  kthread+0x337/0x6f0
[   25.417819]  ret_from_fork+0x116/0x1d0
[   25.418245]  ret_from_fork_asm+0x1a/0x30
[   25.418442] 
[   25.418508] Freed by task 0:
[   25.418684]  kasan_save_stack+0x45/0x70
[   25.418905]  kasan_save_track+0x18/0x40
[   25.419435]  kasan_save_free_info+0x3f/0x60
[   25.419576]  __kasan_slab_free+0x56/0x70
[   25.419790]  kfree+0x222/0x3f0
[   25.420259]  rcu_uaf_reclaim+0x1f/0x60
[   25.420430]  rcu_core+0x66f/0x1c40
[   25.420601]  rcu_core_si+0x12/0x20
[   25.420799]  handle_softirqs+0x209/0x730
[   25.421048]  __irq_exit_rcu+0xc9/0x110
[   25.421469]  irq_exit_rcu+0x12/0x20
[   25.421641]  sysvec_apic_timer_interrupt+0x81/0x90
[   25.422091]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   25.422335] 
[   25.422457] Last potentially related work creation:
[   25.422634]  kasan_save_stack+0x45/0x70
[   25.422824]  kasan_record_aux_stack+0xb2/0xc0
[   25.423172]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   25.423350]  call_rcu+0x12/0x20
[   25.423513]  rcu_uaf+0x168/0x330
[   25.423696]  kunit_try_run_case+0x1a5/0x480
[   25.423892]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.424254]  kthread+0x337/0x6f0
[   25.424457]  ret_from_fork+0x116/0x1d0
[   25.424637]  ret_from_fork_asm+0x1a/0x30
[   25.425463] 
[   25.425595] The buggy address belongs to the object at ffff888102b41ac0
[   25.425595]  which belongs to the cache kmalloc-32 of size 32
[   25.426347] The buggy address is located 0 bytes inside of
[   25.426347]  freed 32-byte region [ffff888102b41ac0, ffff888102b41ae0)
[   25.426847] 
[   25.426923] The buggy address belongs to the physical page:
[   25.427138] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b41
[   25.427630] flags: 0x200000000000000(node=0|zone=2)
[   25.427911] page_type: f5(slab)
[   25.428139] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.428540] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.428845] page dumped because: kasan: bad access detected
[   25.429093] 
[   25.429239] Memory state around the buggy address:
[   25.429483]  ffff888102b41980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.429775]  ffff888102b41a00: fa fb fb fb fc fc fc fc 00 00 07 fc fc fc fc fc
[   25.430335] >ffff888102b41a80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.430642]                                            ^
[   25.430879]  ffff888102b41b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.431261]  ffff888102b41b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.431633] ==================================================================