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

Environment
qemu-arm64
qemu-x86_64

[   19.749383] ==================================================================
[   19.749776] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   19.749962] Read of size 4 at addr fff00000c63d9600 by task swapper/1/0
[   19.750128] 
[   19.750548] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   19.750741] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.750767] Hardware name: linux,dummy-virt (DT)
[   19.751003] Call trace:
[   19.751095]  show_stack+0x20/0x38 (C)
[   19.751225]  dump_stack_lvl+0x8c/0xd0
[   19.751275]  print_report+0x118/0x608
[   19.751321]  kasan_report+0xdc/0x128
[   19.751367]  __asan_report_load4_noabort+0x20/0x30
[   19.751419]  rcu_uaf_reclaim+0x64/0x70
[   19.751462]  rcu_core+0x9f4/0x1e20
[   19.751714]  rcu_core_si+0x18/0x30
[   19.752012]  handle_softirqs+0x374/0xb28
[   19.752389]  __do_softirq+0x1c/0x28
[   19.752434]  ____do_softirq+0x18/0x30
[   19.752479]  call_on_irq_stack+0x24/0x30
[   19.752523]  do_softirq_own_stack+0x24/0x38
[   19.752569]  __irq_exit_rcu+0x1fc/0x318
[   19.752614]  irq_exit_rcu+0x1c/0x80
[   19.753258]  el1_interrupt+0x38/0x58
[   19.753572]  el1h_64_irq_handler+0x18/0x28
[   19.753734]  el1h_64_irq+0x6c/0x70
[   19.754174]  finish_task_switch.isra.0+0x120/0x5e8 (P)
[   19.754252]  __schedule+0xab4/0x2840
[   19.754603]  schedule_idle+0x60/0xa8
[   19.754648]  do_idle+0x2c4/0x4e8
[   19.754861]  cpu_startup_entry+0x64/0x80
[   19.754918]  secondary_start_kernel+0x288/0x340
[   19.755005]  __secondary_switched+0xc0/0xc8
[   19.755060] 
[   19.755078] Allocated by task 198:
[   19.755143]  kasan_save_stack+0x3c/0x68
[   19.755196]  kasan_save_track+0x20/0x40
[   19.755233]  kasan_save_alloc_info+0x40/0x58
[   19.755352]  __kasan_kmalloc+0xd4/0xd8
[   19.755520]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.755794]  rcu_uaf+0xb0/0x2d8
[   19.755958]  kunit_try_run_case+0x170/0x3f0
[   19.756073]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.756129]  kthread+0x328/0x630
[   19.756279]  ret_from_fork+0x10/0x20
[   19.756314] 
[   19.756335] Freed by task 0:
[   19.756360]  kasan_save_stack+0x3c/0x68
[   19.756533]  kasan_save_track+0x20/0x40
[   19.756573]  kasan_save_free_info+0x4c/0x78
[   19.756697]  __kasan_slab_free+0x6c/0x98
[   19.756759]  kfree+0x214/0x3c8
[   19.756819]  rcu_uaf_reclaim+0x28/0x70
[   19.756926]  rcu_core+0x9f4/0x1e20
[   19.756962]  rcu_core_si+0x18/0x30
[   19.757057]  handle_softirqs+0x374/0xb28
[   19.757265]  __do_softirq+0x1c/0x28
[   19.757300] 
[   19.757349] Last potentially related work creation:
[   19.757384]  kasan_save_stack+0x3c/0x68
[   19.757425]  kasan_record_aux_stack+0xb4/0xc8
[   19.757482]  __call_rcu_common.constprop.0+0x74/0x8c8
[   19.757525]  call_rcu+0x18/0x30
[   19.757557]  rcu_uaf+0x14c/0x2d8
[   19.757866]  kunit_try_run_case+0x170/0x3f0
[   19.757925]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.757970]  kthread+0x328/0x630
[   19.758002]  ret_from_fork+0x10/0x20
[   19.758134] 
[   19.758173] The buggy address belongs to the object at fff00000c63d9600
[   19.758173]  which belongs to the cache kmalloc-32 of size 32
[   19.758391] The buggy address is located 0 bytes inside of
[   19.758391]  freed 32-byte region [fff00000c63d9600, fff00000c63d9620)
[   19.758681] 
[   19.758707] The buggy address belongs to the physical page:
[   19.758821] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1063d9
[   19.758878] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.758931] page_type: f5(slab)
[   19.759083] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   19.759206] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   19.759248] page dumped because: kasan: bad access detected
[   19.759279] 
[   19.759297] Memory state around the buggy address:
[   19.759545]  fff00000c63d9500: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   19.759682]  fff00000c63d9580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   19.759898] >fff00000c63d9600: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   19.759940]                    ^
[   19.760006]  fff00000c63d9680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.760079]  fff00000c63d9700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.760342] ==================================================================

[   13.098313] ==================================================================
[   13.098852] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   13.099161] Read of size 4 at addr ffff888102b87b00 by task swapper/0/0
[   13.099458] 
[   13.099701] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   13.099751] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.099762] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.099783] Call Trace:
[   13.099820]  <IRQ>
[   13.099840]  dump_stack_lvl+0x73/0xb0
[   13.099896]  print_report+0xd1/0x650
[   13.099921]  ? __virt_addr_valid+0x1db/0x2d0
[   13.099946]  ? rcu_uaf_reclaim+0x50/0x60
[   13.100015]  ? kasan_complete_mode_report_info+0x64/0x200
[   13.100040]  ? rcu_uaf_reclaim+0x50/0x60
[   13.100061]  kasan_report+0x141/0x180
[   13.100083]  ? rcu_uaf_reclaim+0x50/0x60
[   13.100109]  __asan_report_load4_noabort+0x18/0x20
[   13.100134]  rcu_uaf_reclaim+0x50/0x60
[   13.100166]  rcu_core+0x66f/0x1c40
[   13.100196]  ? __pfx_rcu_core+0x10/0x10
[   13.100217]  ? ktime_get+0x6b/0x150
[   13.100252]  ? handle_softirqs+0x18e/0x730
[   13.100277]  rcu_core_si+0x12/0x20
[   13.100297]  handle_softirqs+0x209/0x730
[   13.100327]  ? hrtimer_interrupt+0x2fe/0x780
[   13.100350]  ? __pfx_handle_softirqs+0x10/0x10
[   13.100376]  __irq_exit_rcu+0xc9/0x110
[   13.100406]  irq_exit_rcu+0x12/0x20
[   13.100425]  sysvec_apic_timer_interrupt+0x81/0x90
[   13.100451]  </IRQ>
[   13.100478]  <TASK>
[   13.100488]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   13.100607] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   13.100819] 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
[   13.100896] RSP: 0000:ffffffff8fa07dd8 EFLAGS: 00010206
[   13.100984] RAX: ffff8881ca272000 RBX: ffffffff8fa1cac0 RCX: ffffffff8e874105
[   13.101030] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 0000000000006a04
[   13.101073] RBP: ffffffff8fa07de0 R08: 0000000000000001 R09: ffffed102b60618a
[   13.101116] R10: ffff88815b030c53 R11: 0000000000061800 R12: 0000000000000000
[   13.101158] R13: fffffbfff1f43958 R14: ffffffff905b1390 R15: 0000000000000000
[   13.101215]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   13.101270]  ? default_idle+0xd/0x20
[   13.101291]  arch_cpu_idle+0xd/0x20
[   13.101313]  default_idle_call+0x48/0x80
[   13.101332]  do_idle+0x379/0x4f0
[   13.101358]  ? __pfx_do_idle+0x10/0x10
[   13.101385]  cpu_startup_entry+0x5c/0x70
[   13.101405]  rest_init+0x11a/0x140
[   13.101421]  ? acpi_subsystem_init+0x5d/0x150
[   13.101447]  start_kernel+0x330/0x410
[   13.101472]  x86_64_start_reservations+0x1c/0x30
[   13.101497]  x86_64_start_kernel+0x10d/0x120
[   13.101521]  common_startup_64+0x13e/0x148
[   13.101554]  </TASK>
[   13.101565] 
[   13.115727] Allocated by task 216:
[   13.115876]  kasan_save_stack+0x45/0x70
[   13.116092]  kasan_save_track+0x18/0x40
[   13.116266]  kasan_save_alloc_info+0x3b/0x50
[   13.116476]  __kasan_kmalloc+0xb7/0xc0
[   13.117057]  __kmalloc_cache_noprof+0x189/0x420
[   13.117458]  rcu_uaf+0xb0/0x330
[   13.117718]  kunit_try_run_case+0x1a5/0x480
[   13.118098]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.118513]  kthread+0x337/0x6f0
[   13.118674]  ret_from_fork+0x116/0x1d0
[   13.118999]  ret_from_fork_asm+0x1a/0x30
[   13.119288] 
[   13.119424] Freed by task 0:
[   13.119617]  kasan_save_stack+0x45/0x70
[   13.120047]  kasan_save_track+0x18/0x40
[   13.120231]  kasan_save_free_info+0x3f/0x60
[   13.120547]  __kasan_slab_free+0x56/0x70
[   13.120740]  kfree+0x222/0x3f0
[   13.121193]  rcu_uaf_reclaim+0x1f/0x60
[   13.121349]  rcu_core+0x66f/0x1c40
[   13.121544]  rcu_core_si+0x12/0x20
[   13.121718]  handle_softirqs+0x209/0x730
[   13.121924]  __irq_exit_rcu+0xc9/0x110
[   13.122434]  irq_exit_rcu+0x12/0x20
[   13.122570]  sysvec_apic_timer_interrupt+0x81/0x90
[   13.123010]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   13.123227] 
[   13.123473] Last potentially related work creation:
[   13.123686]  kasan_save_stack+0x45/0x70
[   13.124025]  kasan_record_aux_stack+0xb2/0xc0
[   13.124231]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   13.124449]  call_rcu+0x12/0x20
[   13.124763]  rcu_uaf+0x168/0x330
[   13.124937]  kunit_try_run_case+0x1a5/0x480
[   13.125332]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.125632]  kthread+0x337/0x6f0
[   13.125867]  ret_from_fork+0x116/0x1d0
[   13.126011]  ret_from_fork_asm+0x1a/0x30
[   13.126444] 
[   13.126623] The buggy address belongs to the object at ffff888102b87b00
[   13.126623]  which belongs to the cache kmalloc-32 of size 32
[   13.127525] The buggy address is located 0 bytes inside of
[   13.127525]  freed 32-byte region [ffff888102b87b00, ffff888102b87b20)
[   13.128248] 
[   13.128353] The buggy address belongs to the physical page:
[   13.128580] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b87
[   13.129172] flags: 0x200000000000000(node=0|zone=2)
[   13.129403] page_type: f5(slab)
[   13.129772] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.130182] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.130536] page dumped because: kasan: bad access detected
[   13.130789] 
[   13.130887] Memory state around the buggy address:
[   13.131272]  ffff888102b87a00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.131679]  ffff888102b87a80: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   13.132080] >ffff888102b87b00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   13.132368]                    ^
[   13.132508]  ffff888102b87b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.132810]  ffff888102b87c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.133113] ==================================================================