Hay
Date
July 11, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   17.235413] ==================================================================
[   17.235552] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   17.235623] Read of size 4 at addr fff00000c589bc40 by task swapper/0/0
[   17.235669] 
[   17.235709] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   17.235794] Tainted: [B]=BAD_PAGE, [N]=TEST
[   17.235819] Hardware name: linux,dummy-virt (DT)
[   17.235865] Call trace:
[   17.235889]  show_stack+0x20/0x38 (C)
[   17.235938]  dump_stack_lvl+0x8c/0xd0
[   17.235987]  print_report+0x118/0x608
[   17.236032]  kasan_report+0xdc/0x128
[   17.236077]  __asan_report_load4_noabort+0x20/0x30
[   17.236125]  rcu_uaf_reclaim+0x64/0x70
[   17.236169]  rcu_core+0x9f4/0x1e20
[   17.236216]  rcu_core_si+0x18/0x30
[   17.236259]  handle_softirqs+0x374/0xb28
[   17.236306]  __do_softirq+0x1c/0x28
[   17.236347]  ____do_softirq+0x18/0x30
[   17.236391]  call_on_irq_stack+0x24/0x30
[   17.236434]  do_softirq_own_stack+0x24/0x38
[   17.236480]  __irq_exit_rcu+0x1fc/0x318
[   17.236523]  irq_exit_rcu+0x1c/0x80
[   17.236567]  el1_interrupt+0x38/0x58
[   17.236614]  el1h_64_irq_handler+0x18/0x28
[   17.236660]  el1h_64_irq+0x6c/0x70
[   17.236746]  arch_local_irq_enable+0x4/0x8 (P)
[   17.236796]  do_idle+0x384/0x4e8
[   17.236838]  cpu_startup_entry+0x64/0x80
[   17.238893]  rest_init+0x160/0x188
[   17.238936]  start_kernel+0x30c/0x3d0
[   17.238989]  __primary_switched+0x8c/0xa0
[   17.239040] 
[   17.239059] Allocated by task 199:
[   17.239088]  kasan_save_stack+0x3c/0x68
[   17.239131]  kasan_save_track+0x20/0x40
[   17.239167]  kasan_save_alloc_info+0x40/0x58
[   17.239207]  __kasan_kmalloc+0xd4/0xd8
[   17.239242]  __kmalloc_cache_noprof+0x16c/0x3c0
[   17.239281]  rcu_uaf+0xb0/0x2d8
[   17.239315]  kunit_try_run_case+0x170/0x3f0
[   17.239360]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.239464]  kthread+0x328/0x630
[   17.239511]  ret_from_fork+0x10/0x20
[   17.239557] 
[   17.239577] Freed by task 0:
[   17.239681]  kasan_save_stack+0x3c/0x68
[   17.239922]  kasan_save_track+0x20/0x40
[   17.239962]  kasan_save_free_info+0x4c/0x78
[   17.240001]  __kasan_slab_free+0x6c/0x98
[   17.240039]  kfree+0x214/0x3c8
[   17.240070]  rcu_uaf_reclaim+0x28/0x70
[   17.240241]  rcu_core+0x9f4/0x1e20
[   17.240331]  rcu_core_si+0x18/0x30
[   17.240369]  handle_softirqs+0x374/0xb28
[   17.240407]  __do_softirq+0x1c/0x28
[   17.240463] 
[   17.240520] Last potentially related work creation:
[   17.240587]  kasan_save_stack+0x3c/0x68
[   17.240629]  kasan_record_aux_stack+0xb4/0xc8
[   17.240706]  __call_rcu_common.constprop.0+0x74/0x8c8
[   17.240748]  call_rcu+0x18/0x30
[   17.240782]  rcu_uaf+0x14c/0x2d8
[   17.240815]  kunit_try_run_case+0x170/0x3f0
[   17.240863]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   17.240906]  kthread+0x328/0x630
[   17.240939]  ret_from_fork+0x10/0x20
[   17.240981] 
[   17.241022] The buggy address belongs to the object at fff00000c589bc40
[   17.241022]  which belongs to the cache kmalloc-32 of size 32
[   17.241313] The buggy address is located 0 bytes inside of
[   17.241313]  freed 32-byte region [fff00000c589bc40, fff00000c589bc60)
[   17.241435] 
[   17.241463] The buggy address belongs to the physical page:
[   17.242040] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10589b
[   17.242116] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   17.242170] page_type: f5(slab)
[   17.242276] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   17.242383] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   17.242601] page dumped because: kasan: bad access detected
[   17.242727] 
[   17.242747] Memory state around the buggy address:
[   17.242989]  fff00000c589bb00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   17.243132]  fff00000c589bb80: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   17.243243] >fff00000c589bc00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   17.243282]                                            ^
[   17.243649]  fff00000c589bc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.244574]  fff00000c589bd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   17.244675] ==================================================================

[   12.916152] ==================================================================
[   12.916546] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   12.916830] Read of size 4 at addr ffff888102c62cc0 by task swapper/0/0
[   12.918051] 
[   12.918374] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   12.918453] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.918464] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.918484] Call Trace:
[   12.918523]  <IRQ>
[   12.918541]  dump_stack_lvl+0x73/0xb0
[   12.918576]  print_report+0xd1/0x650
[   12.918598]  ? __virt_addr_valid+0x1db/0x2d0
[   12.918623]  ? rcu_uaf_reclaim+0x50/0x60
[   12.918642]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.918665]  ? rcu_uaf_reclaim+0x50/0x60
[   12.918686]  kasan_report+0x141/0x180
[   12.918707]  ? rcu_uaf_reclaim+0x50/0x60
[   12.918732]  __asan_report_load4_noabort+0x18/0x20
[   12.918757]  rcu_uaf_reclaim+0x50/0x60
[   12.918777]  rcu_core+0x66f/0x1c40
[   12.918806]  ? __pfx_rcu_core+0x10/0x10
[   12.918827]  ? ktime_get+0x6b/0x150
[   12.918848]  ? handle_softirqs+0x18e/0x730
[   12.918873]  rcu_core_si+0x12/0x20
[   12.918892]  handle_softirqs+0x209/0x730
[   12.918911]  ? hrtimer_interrupt+0x2fe/0x780
[   12.918945]  ? __pfx_handle_softirqs+0x10/0x10
[   12.918971]  __irq_exit_rcu+0xc9/0x110
[   12.918991]  irq_exit_rcu+0x12/0x20
[   12.919146]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.919180]  </IRQ>
[   12.919210]  <TASK>
[   12.919220]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.919312] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   12.919524] 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 e3 81 21 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
[   12.919602] RSP: 0000:ffffffffba207dd8 EFLAGS: 00010212
[   12.919687] RAX: ffff88819fa72000 RBX: ffffffffba21cac0 RCX: ffffffffb9074105
[   12.919731] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 000000000001464c
[   12.919778] RBP: ffffffffba207de0 R08: 0000000000000001 R09: ffffed102b60618a
[   12.919819] R10: ffff88815b030c53 R11: 000000000000c000 R12: 0000000000000000
[   12.919860] R13: fffffbfff7443958 R14: ffffffffbadb1490 R15: 0000000000000000
[   12.919915]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   12.919966]  ? default_idle+0xd/0x20
[   12.919988]  arch_cpu_idle+0xd/0x20
[   12.920086]  default_idle_call+0x48/0x80
[   12.920109]  do_idle+0x379/0x4f0
[   12.920135]  ? __pfx_do_idle+0x10/0x10
[   12.920163]  cpu_startup_entry+0x5c/0x70
[   12.920183]  rest_init+0x11a/0x140
[   12.920200]  ? acpi_subsystem_init+0x5d/0x150
[   12.920225]  start_kernel+0x330/0x410
[   12.920250]  x86_64_start_reservations+0x1c/0x30
[   12.920275]  x86_64_start_kernel+0x10d/0x120
[   12.920299]  common_startup_64+0x13e/0x148
[   12.920331]  </TASK>
[   12.920341] 
[   12.940941] Allocated by task 215:
[   12.941385]  kasan_save_stack+0x45/0x70
[   12.941839]  kasan_save_track+0x18/0x40
[   12.941996]  kasan_save_alloc_info+0x3b/0x50
[   12.942597]  __kasan_kmalloc+0xb7/0xc0
[   12.943176]  __kmalloc_cache_noprof+0x189/0x420
[   12.943512]  rcu_uaf+0xb0/0x330
[   12.943642]  kunit_try_run_case+0x1a5/0x480
[   12.943981]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.944669]  kthread+0x337/0x6f0
[   12.945239]  ret_from_fork+0x116/0x1d0
[   12.945688]  ret_from_fork_asm+0x1a/0x30
[   12.945974] 
[   12.946065] Freed by task 0:
[   12.946420]  kasan_save_stack+0x45/0x70
[   12.946725]  kasan_save_track+0x18/0x40
[   12.946894]  kasan_save_free_info+0x3f/0x60
[   12.947289]  __kasan_slab_free+0x56/0x70
[   12.947659]  kfree+0x222/0x3f0
[   12.947839]  rcu_uaf_reclaim+0x1f/0x60
[   12.948313]  rcu_core+0x66f/0x1c40
[   12.948481]  rcu_core_si+0x12/0x20
[   12.948663]  handle_softirqs+0x209/0x730
[   12.948846]  __irq_exit_rcu+0xc9/0x110
[   12.949382]  irq_exit_rcu+0x12/0x20
[   12.949547]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.949947]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.950421] 
[   12.950543] Last potentially related work creation:
[   12.951018]  kasan_save_stack+0x45/0x70
[   12.951298]  kasan_record_aux_stack+0xb2/0xc0
[   12.951680]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   12.952002]  call_rcu+0x12/0x20
[   12.952230]  rcu_uaf+0x168/0x330
[   12.952361]  kunit_try_run_case+0x1a5/0x480
[   12.952576]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.953184]  kthread+0x337/0x6f0
[   12.953360]  ret_from_fork+0x116/0x1d0
[   12.953515]  ret_from_fork_asm+0x1a/0x30
[   12.954081] 
[   12.954321] The buggy address belongs to the object at ffff888102c62cc0
[   12.954321]  which belongs to the cache kmalloc-32 of size 32
[   12.955202] The buggy address is located 0 bytes inside of
[   12.955202]  freed 32-byte region [ffff888102c62cc0, ffff888102c62ce0)
[   12.955685] 
[   12.956005] The buggy address belongs to the physical page:
[   12.956255] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c62
[   12.956711] flags: 0x200000000000000(node=0|zone=2)
[   12.957354] page_type: f5(slab)
[   12.957774] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   12.958341] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   12.958579] page dumped because: kasan: bad access detected
[   12.958759] 
[   12.959174] Memory state around the buggy address:
[   12.959598]  ffff888102c62b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.960393]  ffff888102c62c00: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   12.961154] >ffff888102c62c80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   12.961899]                                            ^
[   12.962280]  ffff888102c62d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.962514]  ffff888102c62d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.962728] ==================================================================