Hay
Date
June 20, 2025, 12:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   32.657951] ==================================================================
[   32.658263] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   32.658726] Read of size 4 at addr fff00000c59d4a80 by task swapper/1/0
[   32.658901] 
[   32.659012] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT 
[   32.659240] Tainted: [B]=BAD_PAGE, [N]=TEST
[   32.659325] Hardware name: linux,dummy-virt (DT)
[   32.659404] Call trace:
[   32.659476]  show_stack+0x20/0x38 (C)
[   32.659817]  dump_stack_lvl+0x8c/0xd0
[   32.660061]  print_report+0x118/0x608
[   32.660179]  kasan_report+0xdc/0x128
[   32.660290]  __asan_report_load4_noabort+0x20/0x30
[   32.660409]  rcu_uaf_reclaim+0x64/0x70
[   32.660638]  rcu_core+0x9f4/0x1e20
[   32.660740]  rcu_core_si+0x18/0x30
[   32.660833]  handle_softirqs+0x374/0xb28
[   32.661117]  __do_softirq+0x1c/0x28
[   32.661258]  ____do_softirq+0x18/0x30
[   32.661395]  call_on_irq_stack+0x24/0x30
[   32.661580]  do_softirq_own_stack+0x24/0x38
[   32.661709]  __irq_exit_rcu+0x1fc/0x318
[   32.661828]  irq_exit_rcu+0x1c/0x80
[   32.661935]  el1_interrupt+0x38/0x58
[   32.662338]  el1h_64_irq_handler+0x18/0x28
[   32.662452]  el1h_64_irq+0x6c/0x70
[   32.662813]  arch_local_irq_enable+0x4/0x8 (P)
[   32.663002]  do_idle+0x384/0x4e8
[   32.663107]  cpu_startup_entry+0x64/0x80
[   32.663268]  secondary_start_kernel+0x288/0x340
[   32.663440]  __secondary_switched+0xc0/0xc8
[   32.663593] 
[   32.663656] Allocated by task 209:
[   32.663725]  kasan_save_stack+0x3c/0x68
[   32.663857]  kasan_save_track+0x20/0x40
[   32.664059]  kasan_save_alloc_info+0x40/0x58
[   32.664156]  __kasan_kmalloc+0xd4/0xd8
[   32.664688]  __kmalloc_cache_noprof+0x16c/0x3c0
[   32.665003]  rcu_uaf+0xb0/0x2d8
[   32.665075]  kunit_try_run_case+0x170/0x3f0
[   32.665150]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.665230]  kthread+0x328/0x630
[   32.665299]  ret_from_fork+0x10/0x20
[   32.665437] 
[   32.665514] Freed by task 0:
[   32.665634]  kasan_save_stack+0x3c/0x68
[   32.665734]  kasan_save_track+0x20/0x40
[   32.665831]  kasan_save_free_info+0x4c/0x78
[   32.665928]  __kasan_slab_free+0x6c/0x98
[   32.666021]  kfree+0x214/0x3c8
[   32.666105]  rcu_uaf_reclaim+0x28/0x70
[   32.666196]  rcu_core+0x9f4/0x1e20
[   32.666288]  rcu_core_si+0x18/0x30
[   32.666371]  handle_softirqs+0x374/0xb28
[   32.666464]  __do_softirq+0x1c/0x28
[   32.666552] 
[   32.666654] Last potentially related work creation:
[   32.666736]  kasan_save_stack+0x3c/0x68
[   32.666866]  kasan_record_aux_stack+0xb4/0xc8
[   32.666987]  __call_rcu_common.constprop.0+0x74/0x8c8
[   32.667692]  call_rcu+0x18/0x30
[   32.667893]  rcu_uaf+0x14c/0x2d8
[   32.667981]  kunit_try_run_case+0x170/0x3f0
[   32.668071]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   32.668184]  kthread+0x328/0x630
[   32.668281]  ret_from_fork+0x10/0x20
[   32.668389] 
[   32.668726] The buggy address belongs to the object at fff00000c59d4a80
[   32.668726]  which belongs to the cache kmalloc-32 of size 32
[   32.669013] The buggy address is located 0 bytes inside of
[   32.669013]  freed 32-byte region [fff00000c59d4a80, fff00000c59d4aa0)
[   32.669165] 
[   32.669213] The buggy address belongs to the physical page:
[   32.669277] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059d4
[   32.669642] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   32.669993] page_type: f5(slab)
[   32.670107] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   32.670239] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   32.670342] page dumped because: kasan: bad access detected
[   32.670429] 
[   32.670485] Memory state around the buggy address:
[   32.670604]  fff00000c59d4980: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   32.670778]  fff00000c59d4a00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   32.670931] >fff00000c59d4a80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   32.671034]                    ^
[   32.671108]  fff00000c59d4b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.671219]  fff00000c59d4b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   32.671325] ==================================================================

[   26.271852] ==================================================================
[   26.272525] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   26.272718] Read of size 4 at addr ffff888102328d00 by task swapper/0/0
[   26.273252] 
[   26.273362] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) 
[   26.273424] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.273452] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.273481] Call Trace:
[   26.273513]  <IRQ>
[   26.273537]  dump_stack_lvl+0x73/0xb0
[   26.273574]  print_report+0xd1/0x650
[   26.273599]  ? __virt_addr_valid+0x1db/0x2d0
[   26.273627]  ? rcu_uaf_reclaim+0x50/0x60
[   26.273648]  ? kasan_complete_mode_report_info+0x64/0x200
[   26.273676]  ? rcu_uaf_reclaim+0x50/0x60
[   26.273698]  kasan_report+0x141/0x180
[   26.273721]  ? rcu_uaf_reclaim+0x50/0x60
[   26.273747]  __asan_report_load4_noabort+0x18/0x20
[   26.273773]  rcu_uaf_reclaim+0x50/0x60
[   26.273795]  rcu_core+0x66f/0x1c40
[   26.273828]  ? __pfx_rcu_core+0x10/0x10
[   26.273852]  ? ktime_get+0x6b/0x150
[   26.273881]  rcu_core_si+0x12/0x20
[   26.273903]  handle_softirqs+0x209/0x730
[   26.273926]  ? hrtimer_interrupt+0x2fe/0x780
[   26.273952]  ? __pfx_handle_softirqs+0x10/0x10
[   26.273979]  __irq_exit_rcu+0xc9/0x110
[   26.274000]  irq_exit_rcu+0x12/0x20
[   26.274022]  sysvec_apic_timer_interrupt+0x81/0x90
[   26.274062]  </IRQ>
[   26.274092]  <TASK>
[   26.274105]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   26.274323] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   26.274896] 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 d8 1e 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
[   26.275066] RSP: 0000:ffffffffb4807dd8 EFLAGS: 00010216
[   26.275208] RAX: ffff8881a545e000 RBX: ffffffffb481cac0 RCX: ffffffffb369e285
[   26.275264] RDX: ffffed102b606193 RSI: 0000000000000004 RDI: 000000000006f9dc
[   26.275312] RBP: ffffffffb4807de0 R08: 0000000000000001 R09: ffffed102b606192
[   26.275374] R10: ffff88815b030c93 R11: 0000000000035000 R12: 0000000000000000
[   26.275423] R13: fffffbfff6903958 R14: ffffffffb53c1d90 R15: 0000000000000000
[   26.275516]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   26.275592]  ? default_idle+0xd/0x20
[   26.275621]  arch_cpu_idle+0xd/0x20
[   26.275646]  default_idle_call+0x48/0x80
[   26.275671]  do_idle+0x379/0x4f0
[   26.275701]  ? __pfx_do_idle+0x10/0x10
[   26.275731]  cpu_startup_entry+0x5c/0x70
[   26.275757]  rest_init+0x11a/0x140
[   26.275776]  ? acpi_subsystem_init+0x5d/0x150
[   26.275805]  start_kernel+0x330/0x410
[   26.275832]  x86_64_start_reservations+0x1c/0x30
[   26.275858]  x86_64_start_kernel+0x10d/0x120
[   26.275884]  common_startup_64+0x13e/0x148
[   26.275919]  </TASK>
[   26.275934] 
[   26.287434] Allocated by task 227:
[   26.288615]  kasan_save_stack+0x45/0x70
[   26.288876]  kasan_save_track+0x18/0x40
[   26.289070]  kasan_save_alloc_info+0x3b/0x50
[   26.289811]  __kasan_kmalloc+0xb7/0xc0
[   26.289943]  __kmalloc_cache_noprof+0x189/0x420
[   26.290413]  rcu_uaf+0xb0/0x330
[   26.290575]  kunit_try_run_case+0x1a5/0x480
[   26.290698]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.290821]  kthread+0x337/0x6f0
[   26.290911]  ret_from_fork+0x116/0x1d0
[   26.291202]  ret_from_fork_asm+0x1a/0x30
[   26.291504] 
[   26.291649] Freed by task 0:
[   26.291887]  kasan_save_stack+0x45/0x70
[   26.292205]  kasan_save_track+0x18/0x40
[   26.293036]  kasan_save_free_info+0x3f/0x60
[   26.293209]  __kasan_slab_free+0x56/0x70
[   26.293537]  kfree+0x222/0x3f0
[   26.294086]  rcu_uaf_reclaim+0x1f/0x60
[   26.294477]  rcu_core+0x66f/0x1c40
[   26.294706]  rcu_core_si+0x12/0x20
[   26.294904]  handle_softirqs+0x209/0x730
[   26.295258]  __irq_exit_rcu+0xc9/0x110
[   26.295804]  irq_exit_rcu+0x12/0x20
[   26.296039]  sysvec_apic_timer_interrupt+0x81/0x90
[   26.296205]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   26.296326] 
[   26.296427] Last potentially related work creation:
[   26.297169]  kasan_save_stack+0x45/0x70
[   26.297437]  kasan_record_aux_stack+0xb2/0xc0
[   26.297563]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   26.297680]  call_rcu+0x12/0x20
[   26.298006]  rcu_uaf+0x168/0x330
[   26.298157]  kunit_try_run_case+0x1a5/0x480
[   26.298311]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.298540]  kthread+0x337/0x6f0
[   26.298724]  ret_from_fork+0x116/0x1d0
[   26.298982]  ret_from_fork_asm+0x1a/0x30
[   26.299166] 
[   26.299283] The buggy address belongs to the object at ffff888102328d00
[   26.299283]  which belongs to the cache kmalloc-32 of size 32
[   26.299607] The buggy address is located 0 bytes inside of
[   26.299607]  freed 32-byte region [ffff888102328d00, ffff888102328d20)
[   26.300490] 
[   26.300560] The buggy address belongs to the physical page:
[   26.300677] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102328
[   26.300835] flags: 0x200000000000000(node=0|zone=2)
[   26.300949] page_type: f5(slab)
[   26.301695] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   26.302098] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   26.302475] page dumped because: kasan: bad access detected
[   26.302840] 
[   26.302916] Memory state around the buggy address:
[   26.303179]  ffff888102328c00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   26.303476]  ffff888102328c80: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   26.303991] >ffff888102328d00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   26.304160]                    ^
[   26.304414]  ffff888102328d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.305129]  ffff888102328e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   26.305691] ==================================================================