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

Environment
qemu-arm64
qemu-x86_64

[   16.968800] ==================================================================
[   16.969557] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   16.969648] Read of size 4 at addr fff00000c7859c00 by task swapper/1/0
[   16.969696] 
[   16.969858] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   16.969964] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.969990] Hardware name: linux,dummy-virt (DT)
[   16.970156] Call trace:
[   16.970534]  show_stack+0x20/0x38 (C)
[   16.970632]  dump_stack_lvl+0x8c/0xd0
[   16.970939]  print_report+0x118/0x5d0
[   16.971007]  kasan_report+0xdc/0x128
[   16.971079]  __asan_report_load4_noabort+0x20/0x30
[   16.971266]  rcu_uaf_reclaim+0x64/0x70
[   16.971533]  rcu_core+0x9f4/0x1e20
[   16.971605]  rcu_core_si+0x18/0x30
[   16.971649]  handle_softirqs+0x374/0xb28
[   16.971994]  __do_softirq+0x1c/0x28
[   16.972060]  ____do_softirq+0x18/0x30
[   16.972284]  call_on_irq_stack+0x24/0x30
[   16.972577]  do_softirq_own_stack+0x24/0x38
[   16.972732]  __irq_exit_rcu+0x1fc/0x318
[   16.972947]  irq_exit_rcu+0x1c/0x80
[   16.973072]  el1_interrupt+0x38/0x58
[   16.973252]  el1h_64_irq_handler+0x18/0x28
[   16.973364]  el1h_64_irq+0x6c/0x70
[   16.973486]  finish_task_switch.isra.0+0x120/0x5e8 (P)
[   16.973542]  __schedule+0xab4/0x2840
[   16.973604]  schedule_idle+0x60/0xa8
[   16.973668]  do_idle+0x2c4/0x4e8
[   16.973711]  cpu_startup_entry+0x68/0x80
[   16.973757]  secondary_start_kernel+0x288/0x340
[   16.973803]  __secondary_switched+0xc0/0xc8
[   16.973856] 
[   16.973887] Allocated by task 198:
[   16.974141]  kasan_save_stack+0x3c/0x68
[   16.974592]  kasan_save_track+0x20/0x40
[   16.974663]  kasan_save_alloc_info+0x40/0x58
[   16.974740]  __kasan_kmalloc+0xd4/0xd8
[   16.974961]  __kmalloc_cache_noprof+0x16c/0x3c0
[   16.975187]  rcu_uaf+0xb0/0x2d8
[   16.975425]  kunit_try_run_case+0x170/0x3f0
[   16.975606]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.975755]  kthread+0x328/0x630
[   16.975977]  ret_from_fork+0x10/0x20
[   16.976197] 
[   16.976223] Freed by task 0:
[   16.976251]  kasan_save_stack+0x3c/0x68
[   16.976295]  kasan_save_track+0x20/0x40
[   16.976340]  kasan_save_free_info+0x4c/0x78
[   16.976811]  __kasan_slab_free+0x6c/0x98
[   16.977373]  kfree+0x214/0x3c8
[   16.977601]  rcu_uaf_reclaim+0x28/0x70
[   16.977695]  rcu_core+0x9f4/0x1e20
[   16.977921]  rcu_core_si+0x18/0x30
[   16.978074]  handle_softirqs+0x374/0xb28
[   16.978258]  __do_softirq+0x1c/0x28
[   16.978297] 
[   16.978395] Last potentially related work creation:
[   16.978609]  kasan_save_stack+0x3c/0x68
[   16.979079]  kasan_record_aux_stack+0xb4/0xc8
[   16.979227]  __call_rcu_common.constprop.0+0x74/0x8c8
[   16.979321]  call_rcu+0x18/0x30
[   16.979702]  rcu_uaf+0x14c/0x2d8
[   16.979917]  kunit_try_run_case+0x170/0x3f0
[   16.980198]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   16.980272]  kthread+0x328/0x630
[   16.980305]  ret_from_fork+0x10/0x20
[   16.980716] 
[   16.981009] The buggy address belongs to the object at fff00000c7859c00
[   16.981009]  which belongs to the cache kmalloc-32 of size 32
[   16.981172] The buggy address is located 0 bytes inside of
[   16.981172]  freed 32-byte region [fff00000c7859c00, fff00000c7859c20)
[   16.981303] 
[   16.981327] The buggy address belongs to the physical page:
[   16.981679] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107859
[   16.981840] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   16.982015] page_type: f5(slab)
[   16.982242] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   16.982737] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   16.982880] page dumped because: kasan: bad access detected
[   16.982963] 
[   16.983332] Memory state around the buggy address:
[   16.983588]  fff00000c7859b00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   16.983644]  fff00000c7859b80: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   16.983770] >fff00000c7859c00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   16.983810]                    ^
[   16.983974]  fff00000c7859c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.984223]  fff00000c7859d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.984327] ==================================================================

[   12.854028] ==================================================================
[   12.854494] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   12.854845] Read of size 4 at addr ffff888102f45600 by task swapper/0/0
[   12.855124] 
[   12.855242] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.855297] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.855308] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.855330] Call Trace:
[   12.855359]  <IRQ>
[   12.855389]  dump_stack_lvl+0x73/0xb0
[   12.855420]  print_report+0xd1/0x610
[   12.855442]  ? __virt_addr_valid+0x1db/0x2d0
[   12.855465]  ? rcu_uaf_reclaim+0x50/0x60
[   12.855484]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.855507]  ? rcu_uaf_reclaim+0x50/0x60
[   12.855527]  kasan_report+0x141/0x180
[   12.855548]  ? rcu_uaf_reclaim+0x50/0x60
[   12.855583]  __asan_report_load4_noabort+0x18/0x20
[   12.855618]  rcu_uaf_reclaim+0x50/0x60
[   12.855639]  rcu_core+0x66f/0x1c40
[   12.855679]  ? __pfx_rcu_core+0x10/0x10
[   12.855700]  ? ktime_get+0x6b/0x150
[   12.855721]  ? handle_softirqs+0x18e/0x730
[   12.855746]  rcu_core_si+0x12/0x20
[   12.855765]  handle_softirqs+0x209/0x730
[   12.855784]  ? hrtimer_interrupt+0x2fe/0x780
[   12.855807]  ? __pfx_handle_softirqs+0x10/0x10
[   12.855832]  __irq_exit_rcu+0xc9/0x110
[   12.855861]  irq_exit_rcu+0x12/0x20
[   12.855880]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.855905]  </IRQ>
[   12.855947]  <TASK>
[   12.855958]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.856065] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   12.856285] 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.856366] RSP: 0000:ffffffff9d007dd8 EFLAGS: 00010206
[   12.856450] RAX: ffff8881bcc72000 RBX: ffffffff9d01cac0 RCX: ffffffff9be76125
[   12.856495] RDX: ffffed102b60618b RSI: 0000000000000004 RDI: 0000000000012bc4
[   12.856537] RBP: ffffffff9d007de0 R08: 0000000000000001 R09: ffffed102b60618a
[   12.856578] R10: ffff88815b030c53 R11: ffffffff9e3c36c0 R12: 0000000000000000
[   12.856634] R13: fffffbfff3a03958 R14: ffffffff9dbb1490 R15: 0000000000000000
[   12.856692]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   12.856747]  ? default_idle+0xd/0x20
[   12.856769]  arch_cpu_idle+0xd/0x20
[   12.856790]  default_idle_call+0x48/0x80
[   12.856808]  do_idle+0x379/0x4f0
[   12.856834]  ? __pfx_do_idle+0x10/0x10
[   12.856862]  cpu_startup_entry+0x5c/0x70
[   12.856882]  rest_init+0x11a/0x140
[   12.856899]  ? acpi_subsystem_init+0x5d/0x150
[   12.856924]  start_kernel+0x330/0x410
[   12.856949]  x86_64_start_reservations+0x1c/0x30
[   12.856974]  x86_64_start_kernel+0x10d/0x120
[   12.856997]  common_startup_64+0x13e/0x148
[   12.857031]  </TASK>
[   12.857041] 
[   12.870654] Allocated by task 215:
[   12.870805]  kasan_save_stack+0x45/0x70
[   12.871164]  kasan_save_track+0x18/0x40
[   12.871425]  kasan_save_alloc_info+0x3b/0x50
[   12.871587]  __kasan_kmalloc+0xb7/0xc0
[   12.871909]  __kmalloc_cache_noprof+0x189/0x420
[   12.872140]  rcu_uaf+0xb0/0x330
[   12.872289]  kunit_try_run_case+0x1a5/0x480
[   12.872482]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.872914]  kthread+0x337/0x6f0
[   12.873090]  ret_from_fork+0x116/0x1d0
[   12.873342]  ret_from_fork_asm+0x1a/0x30
[   12.873626] 
[   12.873738] Freed by task 0:
[   12.873868]  kasan_save_stack+0x45/0x70
[   12.874204]  kasan_save_track+0x18/0x40
[   12.874395]  kasan_save_free_info+0x3f/0x60
[   12.874581]  __kasan_slab_free+0x56/0x70
[   12.874859]  kfree+0x222/0x3f0
[   12.875015]  rcu_uaf_reclaim+0x1f/0x60
[   12.875199]  rcu_core+0x66f/0x1c40
[   12.875363]  rcu_core_si+0x12/0x20
[   12.875517]  handle_softirqs+0x209/0x730
[   12.876026]  __irq_exit_rcu+0xc9/0x110
[   12.876221]  irq_exit_rcu+0x12/0x20
[   12.876351]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.876695]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.877032] 
[   12.877168] Last potentially related work creation:
[   12.877508]  kasan_save_stack+0x45/0x70
[   12.877759]  kasan_record_aux_stack+0xb2/0xc0
[   12.878083]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   12.878332]  call_rcu+0x12/0x20
[   12.878595]  rcu_uaf+0x168/0x330
[   12.878836]  kunit_try_run_case+0x1a5/0x480
[   12.879176]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.879493]  kthread+0x337/0x6f0
[   12.879686]  ret_from_fork+0x116/0x1d0
[   12.879846]  ret_from_fork_asm+0x1a/0x30
[   12.880033] 
[   12.880155] The buggy address belongs to the object at ffff888102f45600
[   12.880155]  which belongs to the cache kmalloc-32 of size 32
[   12.880966] The buggy address is located 0 bytes inside of
[   12.880966]  freed 32-byte region [ffff888102f45600, ffff888102f45620)
[   12.881439] 
[   12.881666] The buggy address belongs to the physical page:
[   12.881872] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f45
[   12.882369] flags: 0x200000000000000(node=0|zone=2)
[   12.882719] page_type: f5(slab)
[   12.882869] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   12.883353] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   12.883687] page dumped because: kasan: bad access detected
[   12.883983] 
[   12.884097] Memory state around the buggy address:
[   12.884295]  ffff888102f45500: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   12.884597]  ffff888102f45580: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   12.885140] >ffff888102f45600: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   12.885485]                    ^
[   12.885674]  ffff888102f45680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.886227]  ffff888102f45700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.886662] ==================================================================