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

Environment
qemu-arm64
qemu-x86_64

[   15.694471] ==================================================================
[   15.694585] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   15.696634] Read of size 4 at addr fff00000c7713d00 by task swapper/1/0
[   15.697139] 
[   15.697266] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.697922] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.697955] Hardware name: linux,dummy-virt (DT)
[   15.698728] Call trace:
[   15.698985]  show_stack+0x20/0x38 (C)
[   15.699547]  dump_stack_lvl+0x8c/0xd0
[   15.699886]  print_report+0x118/0x5d0
[   15.700524]  kasan_report+0xdc/0x128
[   15.701290]  __asan_report_load4_noabort+0x20/0x30
[   15.701490]  rcu_uaf_reclaim+0x64/0x70
[   15.701830]  rcu_core+0x9f4/0x1e20
[   15.702250]  rcu_core_si+0x18/0x30
[   15.702523]  handle_softirqs+0x374/0xb28
[   15.702814]  __do_softirq+0x1c/0x28
[   15.702862]  ____do_softirq+0x18/0x30
[   15.703702]  call_on_irq_stack+0x24/0x30
[   15.703975]  do_softirq_own_stack+0x24/0x38
[   15.704025]  __irq_exit_rcu+0x1fc/0x318
[   15.704074]  irq_exit_rcu+0x1c/0x80
[   15.704866]  el1_interrupt+0x38/0x58
[   15.705572]  el1h_64_irq_handler+0x18/0x28
[   15.705636]  el1h_64_irq+0x6c/0x70
[   15.707362]  arch_local_irq_enable+0x4/0x8 (P)
[   15.707590]  do_idle+0x384/0x4e8
[   15.708062]  cpu_startup_entry+0x64/0x80
[   15.708121]  secondary_start_kernel+0x288/0x340
[   15.708956]  __secondary_switched+0xc0/0xc8
[   15.709909] 
[   15.710020] Allocated by task 198:
[   15.710053]  kasan_save_stack+0x3c/0x68
[   15.710913]  kasan_save_track+0x20/0x40
[   15.711400]  kasan_save_alloc_info+0x40/0x58
[   15.711592]  __kasan_kmalloc+0xd4/0xd8
[   15.711657]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.711705]  rcu_uaf+0xb0/0x2d8
[   15.711793]  kunit_try_run_case+0x170/0x3f0
[   15.711837]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.712344]  kthread+0x328/0x630
[   15.712391]  ret_from_fork+0x10/0x20
[   15.712427] 
[   15.712448] Freed by task 0:
[   15.713044]  kasan_save_stack+0x3c/0x68
[   15.713485]  kasan_save_track+0x20/0x40
[   15.713523]  kasan_save_free_info+0x4c/0x78
[   15.713564]  __kasan_slab_free+0x6c/0x98
[   15.714401]  kfree+0x214/0x3c8
[   15.714950]  rcu_uaf_reclaim+0x28/0x70
[   15.715313]  rcu_core+0x9f4/0x1e20
[   15.715900]  rcu_core_si+0x18/0x30
[   15.716377]  handle_softirqs+0x374/0xb28
[   15.716481]  __do_softirq+0x1c/0x28
[   15.716646] 
[   15.716768] Last potentially related work creation:
[   15.717548]  kasan_save_stack+0x3c/0x68
[   15.717898]  kasan_record_aux_stack+0xb4/0xc8
[   15.717944]  __call_rcu_common.constprop.0+0x74/0x8c8
[   15.718477]  call_rcu+0x18/0x30
[   15.719074]  rcu_uaf+0x14c/0x2d8
[   15.719213]  kunit_try_run_case+0x170/0x3f0
[   15.719539]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.719589]  kthread+0x328/0x630
[   15.720257]  ret_from_fork+0x10/0x20
[   15.720699] 
[   15.720737] The buggy address belongs to the object at fff00000c7713d00
[   15.720737]  which belongs to the cache kmalloc-32 of size 32
[   15.721584] The buggy address is located 0 bytes inside of
[   15.721584]  freed 32-byte region [fff00000c7713d00, fff00000c7713d20)
[   15.722747] 
[   15.722800] The buggy address belongs to the physical page:
[   15.722941] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107713
[   15.723801] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.724162] page_type: f5(slab)
[   15.724485] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   15.724582] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   15.724774] page dumped because: kasan: bad access detected
[   15.725553] 
[   15.725710] Memory state around the buggy address:
[   15.725965]  fff00000c7713c00: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.726187]  fff00000c7713c80: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   15.726246] >fff00000c7713d00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.726891]                    ^
[   15.726934]  fff00000c7713d80: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.727274]  fff00000c7713e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.728079] ==================================================================

[   12.758263] ==================================================================
[   12.758752] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   12.759041] Read of size 4 at addr ffff8881029d7680 by task swapper/0/0
[   12.759430] 
[   12.759537] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.759604] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.759617] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.759636] Call Trace:
[   12.759662]  <IRQ>
[   12.759676]  dump_stack_lvl+0x73/0xb0
[   12.759708]  print_report+0xd1/0x610
[   12.759730]  ? __virt_addr_valid+0x1db/0x2d0
[   12.759753]  ? rcu_uaf_reclaim+0x50/0x60
[   12.759772]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.759815]  ? rcu_uaf_reclaim+0x50/0x60
[   12.759835]  kasan_report+0x141/0x180
[   12.759856]  ? rcu_uaf_reclaim+0x50/0x60
[   12.759893]  __asan_report_load4_noabort+0x18/0x20
[   12.759917]  rcu_uaf_reclaim+0x50/0x60
[   12.759937]  rcu_core+0x66f/0x1c40
[   12.759964]  ? __pfx_rcu_core+0x10/0x10
[   12.759985]  ? ktime_get+0x6b/0x150
[   12.760009]  rcu_core_si+0x12/0x20
[   12.760028]  handle_softirqs+0x209/0x730
[   12.760050]  ? hrtimer_interrupt+0x2fe/0x780
[   12.760071]  ? __pfx_handle_softirqs+0x10/0x10
[   12.760096]  __irq_exit_rcu+0xc9/0x110
[   12.760134]  irq_exit_rcu+0x12/0x20
[   12.760153]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.760179]  </IRQ>
[   12.760205]  <TASK>
[   12.760215]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.760316] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   12.760562] 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 23 62 21 00 fb f4 <e9> 3c 1d 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
[   12.760644] RSP: 0000:ffffffff86e07dd8 EFLAGS: 00010212
[   12.760731] RAX: ffff8881d2e72000 RBX: ffffffff86e1cac0 RCX: ffffffff85c76125
[   12.760775] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 000000000000592c
[   12.760819] RBP: ffffffff86e07de0 R08: 0000000000000001 R09: ffffed102b60618a
[   12.760860] R10: ffff88815b030c53 R11: 000000000002ac00 R12: 0000000000000000
[   12.760902] R13: fffffbfff0dc3958 R14: ffffffff879b1490 R15: 0000000000000000
[   12.760968]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   12.761022]  ? default_idle+0xd/0x20
[   12.761044]  arch_cpu_idle+0xd/0x20
[   12.761065]  default_idle_call+0x48/0x80
[   12.761084]  do_idle+0x379/0x4f0
[   12.761109]  ? __pfx_do_idle+0x10/0x10
[   12.761130]  ? trace_preempt_on+0x20/0xc0
[   12.761151]  ? schedule+0x86/0x2e0
[   12.761171]  ? preempt_count_sub+0x50/0x80
[   12.761193]  cpu_startup_entry+0x5c/0x70
[   12.761212]  rest_init+0x11a/0x140
[   12.761229]  ? acpi_subsystem_init+0x5d/0x150
[   12.761254]  start_kernel+0x330/0x410
[   12.761292]  x86_64_start_reservations+0x1c/0x30
[   12.761317]  x86_64_start_kernel+0x10d/0x120
[   12.761341]  common_startup_64+0x13e/0x148
[   12.761372]  </TASK>
[   12.761382] 
[   12.771669] Allocated by task 217:
[   12.771817]  kasan_save_stack+0x45/0x70
[   12.771967]  kasan_save_track+0x18/0x40
[   12.772103]  kasan_save_alloc_info+0x3b/0x50
[   12.772251]  __kasan_kmalloc+0xb7/0xc0
[   12.772394]  __kmalloc_cache_noprof+0x189/0x420
[   12.772615]  rcu_uaf+0xb0/0x330
[   12.772783]  kunit_try_run_case+0x1a5/0x480
[   12.772997]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.773377]  kthread+0x337/0x6f0
[   12.773599]  ret_from_fork+0x116/0x1d0
[   12.773733]  ret_from_fork_asm+0x1a/0x30
[   12.773871] 
[   12.773940] Freed by task 0:
[   12.774046]  kasan_save_stack+0x45/0x70
[   12.774236]  kasan_save_track+0x18/0x40
[   12.774436]  kasan_save_free_info+0x3f/0x60
[   12.774657]  __kasan_slab_free+0x56/0x70
[   12.774850]  kfree+0x222/0x3f0
[   12.775033]  rcu_uaf_reclaim+0x1f/0x60
[   12.775217]  rcu_core+0x66f/0x1c40
[   12.775400]  rcu_core_si+0x12/0x20
[   12.775607]  handle_softirqs+0x209/0x730
[   12.775742]  __irq_exit_rcu+0xc9/0x110
[   12.775871]  irq_exit_rcu+0x12/0x20
[   12.775995]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.776153]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.776413] 
[   12.776519] Last potentially related work creation:
[   12.776749]  kasan_save_stack+0x45/0x70
[   12.776950]  kasan_record_aux_stack+0xb2/0xc0
[   12.777392]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   12.777702]  call_rcu+0x12/0x20
[   12.777820]  rcu_uaf+0x168/0x330
[   12.777940]  kunit_try_run_case+0x1a5/0x480
[   12.778084]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.778585]  kthread+0x337/0x6f0
[   12.778755]  ret_from_fork+0x116/0x1d0
[   12.778941]  ret_from_fork_asm+0x1a/0x30
[   12.779147] 
[   12.779250] The buggy address belongs to the object at ffff8881029d7680
[   12.779250]  which belongs to the cache kmalloc-32 of size 32
[   12.779701] The buggy address is located 0 bytes inside of
[   12.779701]  freed 32-byte region [ffff8881029d7680, ffff8881029d76a0)
[   12.780047] 
[   12.780119] The buggy address belongs to the physical page:
[   12.780408] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029d7
[   12.781166] flags: 0x200000000000000(node=0|zone=2)
[   12.781342] page_type: f5(slab)
[   12.781543] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   12.781854] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   12.782144] page dumped because: kasan: bad access detected
[   12.782331] 
[   12.782423] Memory state around the buggy address:
[   12.782666]  ffff8881029d7580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.783062]  ffff8881029d7600: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.783373] >ffff8881029d7680: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   12.783741]                    ^
[   12.783859]  ffff8881029d7700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.784077]  ffff8881029d7780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.784298] ==================================================================