Hay
Date
July 10, 2025, 9:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   29.911954] ==================================================================
[   29.912164] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   29.912237] Read of size 4 at addr fff00000c999dc80 by task ksoftirqd/0/15
[   29.912287] 
[   29.912328] CPU: 0 UID: 0 PID: 15 Comm: ksoftirqd/0 Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT 
[   29.912421] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.912458] Hardware name: linux,dummy-virt (DT)
[   29.912493] Call trace:
[   29.912516]  show_stack+0x20/0x38 (C)
[   29.912568]  dump_stack_lvl+0x8c/0xd0
[   29.912620]  print_report+0x118/0x5d0
[   29.912669]  kasan_report+0xdc/0x128
[   29.912712]  __asan_report_load4_noabort+0x20/0x30
[   29.912759]  rcu_uaf_reclaim+0x64/0x70
[   29.912814]  rcu_core+0x9f4/0x1e20
[   29.912860]  rcu_core_si+0x18/0x30
[   29.912904]  handle_softirqs+0x374/0xb28
[   29.912950]  run_ksoftirqd+0x80/0xb0
[   29.913004]  smpboot_thread_fn+0x2e8/0x760
[   29.913052]  kthread+0x328/0x630
[   29.913100]  ret_from_fork+0x10/0x20
[   29.913171] 
[   29.913192] Allocated by task 229:
[   29.913221]  kasan_save_stack+0x3c/0x68
[   29.913263]  kasan_save_track+0x20/0x40
[   29.913311]  kasan_save_alloc_info+0x40/0x58
[   29.913350]  __kasan_kmalloc+0xd4/0xd8
[   29.913388]  __kmalloc_cache_noprof+0x16c/0x3c0
[   29.913429]  rcu_uaf+0xb0/0x2d8
[   29.913464]  kunit_try_run_case+0x170/0x3f0
[   29.913506]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.913551]  kthread+0x328/0x630
[   29.913591]  ret_from_fork+0x10/0x20
[   29.913628] 
[   29.913647] Freed by task 15:
[   29.913684]  kasan_save_stack+0x3c/0x68
[   29.913723]  kasan_save_track+0x20/0x40
[   29.913763]  kasan_save_free_info+0x4c/0x78
[   29.913799]  __kasan_slab_free+0x6c/0x98
[   29.913838]  kfree+0x214/0x3c8
[   29.913872]  rcu_uaf_reclaim+0x28/0x70
[   29.913908]  rcu_core+0x9f4/0x1e20
[   29.913951]  rcu_core_si+0x18/0x30
[   29.913997]  handle_softirqs+0x374/0xb28
[   29.914035]  run_ksoftirqd+0x80/0xb0
[   29.914084]  smpboot_thread_fn+0x2e8/0x760
[   29.914125]  kthread+0x328/0x630
[   29.914691]  ret_from_fork+0x10/0x20
[   29.914742] 
[   29.914777] Last potentially related work creation:
[   29.914812]  kasan_save_stack+0x3c/0x68
[   29.914975]  kasan_record_aux_stack+0xb4/0xc8
[   29.915045]  __call_rcu_common.constprop.0+0x74/0x8c8
[   29.915121]  call_rcu+0x18/0x30
[   29.915167]  rcu_uaf+0x14c/0x2d8
[   29.915242]  kunit_try_run_case+0x170/0x3f0
[   29.915310]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.915537]  kthread+0x328/0x630
[   29.915575]  ret_from_fork+0x10/0x20
[   29.915622] 
[   29.915690] The buggy address belongs to the object at fff00000c999dc80
[   29.915690]  which belongs to the cache kmalloc-32 of size 32
[   29.915795] The buggy address is located 0 bytes inside of
[   29.915795]  freed 32-byte region [fff00000c999dc80, fff00000c999dca0)
[   29.915926] 
[   29.915987] The buggy address belongs to the physical page:
[   29.916032] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10999d
[   29.916105] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   29.916204] page_type: f5(slab)
[   29.916257] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   29.916344] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   29.916407] page dumped because: kasan: bad access detected
[   29.916466] 
[   29.916516] Memory state around the buggy address:
[   29.916584]  fff00000c999db80: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   29.916646]  fff00000c999dc00: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   29.916709] >fff00000c999dc80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   29.916773]                    ^
[   29.916802]  fff00000c999dd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.916861]  fff00000c999dd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.916900] ==================================================================

[   25.631885] ==================================================================
[   25.632875] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   25.633460] Read of size 4 at addr ffff888105846e40 by task swapper/0/0
[   25.633888] 
[   25.633981] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT(voluntary) 
[   25.634031] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.634043] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.634065] Call Trace:
[   25.634091]  <IRQ>
[   25.634111]  dump_stack_lvl+0x73/0xb0
[   25.634143]  print_report+0xd1/0x610
[   25.634166]  ? __virt_addr_valid+0x1db/0x2d0
[   25.634192]  ? rcu_uaf_reclaim+0x50/0x60
[   25.634213]  ? kasan_complete_mode_report_info+0x64/0x200
[   25.634239]  ? rcu_uaf_reclaim+0x50/0x60
[   25.634259]  kasan_report+0x141/0x180
[   25.634283]  ? rcu_uaf_reclaim+0x50/0x60
[   25.634308]  __asan_report_load4_noabort+0x18/0x20
[   25.634333]  rcu_uaf_reclaim+0x50/0x60
[   25.634353]  rcu_core+0x66f/0x1c40
[   25.634383]  ? __pfx_rcu_core+0x10/0x10
[   25.634405]  ? ktime_get+0x6b/0x150
[   25.634428]  ? handle_softirqs+0x18e/0x730
[   25.634453]  rcu_core_si+0x12/0x20
[   25.634474]  handle_softirqs+0x209/0x730
[   25.634505]  ? hrtimer_interrupt+0x2fe/0x780
[   25.634528]  ? __pfx_handle_softirqs+0x10/0x10
[   25.634553]  __irq_exit_rcu+0xc9/0x110
[   25.634574]  irq_exit_rcu+0x12/0x20
[   25.634594]  sysvec_apic_timer_interrupt+0x81/0x90
[   25.634619]  </IRQ>
[   25.634643]  <TASK>
[   25.634655]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   25.634755] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   25.635139] 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 c3 0f 18 00 fb f4 <e9> 7c 1d 02 00 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90
[   25.635234] RSP: 0000:ffffffff91a07dd8 EFLAGS: 00010216
[   25.635323] RAX: ffff8881c821d000 RBX: ffffffff91a1cb00 RCX: ffffffff9090aa25
[   25.635371] RDX: ffffed102b606193 RSI: 0000000000000004 RDI: 000000000012d91c
[   25.635422] RBP: ffffffff91a07de0 R08: 0000000000000001 R09: ffffed102b606192
[   25.635465] R10: ffff88815b030c93 R11: ffffffff92e18700 R12: 0000000000000000
[   25.635537] R13: fffffbfff2343960 R14: ffffffff925f2fd0 R15: 0000000000000000
[   25.635604]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   25.635661]  ? default_idle+0xd/0x20
[   25.635684]  arch_cpu_idle+0xd/0x20
[   25.635717]  default_idle_call+0x48/0x80
[   25.635740]  do_idle+0x379/0x4f0
[   25.635766]  ? __pfx_do_idle+0x10/0x10
[   25.635863]  cpu_startup_entry+0x5c/0x70
[   25.635901]  rest_init+0x11a/0x140
[   25.635920]  ? acpi_subsystem_init+0x5d/0x150
[   25.635947]  start_kernel+0x352/0x400
[   25.635972]  x86_64_start_reservations+0x1c/0x30
[   25.635997]  x86_64_start_kernel+0x10d/0x120
[   25.636021]  common_startup_64+0x13e/0x148
[   25.636054]  </TASK>
[   25.636066] 
[   25.655085] Allocated by task 246:
[   25.655437]  kasan_save_stack+0x45/0x70
[   25.655832]  kasan_save_track+0x18/0x40
[   25.656107]  kasan_save_alloc_info+0x3b/0x50
[   25.656256]  __kasan_kmalloc+0xb7/0xc0
[   25.656384]  __kmalloc_cache_noprof+0x189/0x420
[   25.656562]  rcu_uaf+0xb0/0x330
[   25.656877]  kunit_try_run_case+0x1a5/0x480
[   25.657328]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.657989]  kthread+0x337/0x6f0
[   25.658305]  ret_from_fork+0x116/0x1d0
[   25.658650]  ret_from_fork_asm+0x1a/0x30
[   25.659176] 
[   25.659337] Freed by task 0:
[   25.659626]  kasan_save_stack+0x45/0x70
[   25.660026]  kasan_save_track+0x18/0x40
[   25.660163]  kasan_save_free_info+0x3f/0x60
[   25.660299]  __kasan_slab_free+0x56/0x70
[   25.660426]  kfree+0x222/0x3f0
[   25.660596]  rcu_uaf_reclaim+0x1f/0x60
[   25.661038]  rcu_core+0x66f/0x1c40
[   25.661296]  rcu_core_si+0x12/0x20
[   25.661414]  handle_softirqs+0x209/0x730
[   25.661650]  __irq_exit_rcu+0xc9/0x110
[   25.662047]  irq_exit_rcu+0x12/0x20
[   25.662376]  sysvec_apic_timer_interrupt+0x81/0x90
[   25.662964]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   25.663207] 
[   25.663299] Last potentially related work creation:
[   25.663453]  kasan_save_stack+0x45/0x70
[   25.663806]  kasan_record_aux_stack+0xb2/0xc0
[   25.664290]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   25.664853]  call_rcu+0x12/0x20
[   25.665190]  rcu_uaf+0x168/0x330
[   25.665547]  kunit_try_run_case+0x1a5/0x480
[   25.666004]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.666228]  kthread+0x337/0x6f0
[   25.666341]  ret_from_fork+0x116/0x1d0
[   25.666465]  ret_from_fork_asm+0x1a/0x30
[   25.666846] 
[   25.667153] The buggy address belongs to the object at ffff888105846e40
[   25.667153]  which belongs to the cache kmalloc-32 of size 32
[   25.668346] The buggy address is located 0 bytes inside of
[   25.668346]  freed 32-byte region [ffff888105846e40, ffff888105846e60)
[   25.669276] 
[   25.669350] The buggy address belongs to the physical page:
[   25.669559] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105846
[   25.670348] flags: 0x200000000000000(node=0|zone=2)
[   25.670988] page_type: f5(slab)
[   25.671312] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   25.671950] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   25.672178] page dumped because: kasan: bad access detected
[   25.672340] 
[   25.672402] Memory state around the buggy address:
[   25.672606]  ffff888105846d00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   25.672967]  ffff888105846d80: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   25.673288] >ffff888105846e00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   25.673547]                                            ^
[   25.673823]  ffff888105846e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.674101]  ffff888105846f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   25.674365] ==================================================================