Hay
Date
June 24, 2025, 11:37 a.m.

Environment
dragonboard-845c
qemu-arm64
qemu-x86_64

[   42.627232] ==================================================================
[   42.637742] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   42.644542] Read of size 4 at addr ffff0000829a85c0 by task swapper/3/0
[   42.651244] 
[   42.652777] CPU: 3 UID: 0 PID: 0 Comm: swapper/3 Tainted: G    B            N  6.16.0-rc3-next-20250624 #1 PREEMPT 
[   42.652807] Tainted: [B]=BAD_PAGE, [N]=TEST
[   42.652817] Hardware name: Thundercomm Dragonboard 845c (DT)
[   42.652830] Call trace:
[   42.652837]  show_stack+0x20/0x38 (C)
[   42.652855]  dump_stack_lvl+0x8c/0xd0
[   42.652875]  print_report+0x118/0x608
[   42.652895]  kasan_report+0xdc/0x128
[   42.652913]  __asan_report_load4_noabort+0x20/0x30
[   42.652932]  rcu_uaf_reclaim+0x64/0x70
[   42.652949]  rcu_core+0x9f4/0x1e20
[   42.652971]  rcu_core_si+0x18/0x30
[   42.652989]  handle_softirqs+0x374/0xb28
[   42.653011]  __do_softirq+0x1c/0x28
[   42.653027]  ____do_softirq+0x18/0x30
[   42.653044]  call_on_irq_stack+0x24/0x30
[   42.653063]  do_softirq_own_stack+0x24/0x38
[   42.653082]  __irq_exit_rcu+0x1fc/0x318
[   42.653099]  irq_exit_rcu+0x1c/0x80
[   42.653116]  el1_interrupt+0x38/0x58
[   42.653138]  el1h_64_irq_handler+0x18/0x28
[   42.653160]  el1h_64_irq+0x6c/0x70
[   42.653176]  arch_local_irq_enable+0x4/0x8 (P)
[   42.653199]  cpuidle_enter+0x60/0xb8
[   42.653217]  do_idle+0x36c/0x4e8
[   42.653238]  cpu_startup_entry+0x64/0x80
[   42.653260]  secondary_start_kernel+0x288/0x340
[   42.653281]  __secondary_switched+0xc0/0xc8
[   42.653306] 
[   42.770292] Allocated by task 296:
[   42.773751]  kasan_save_stack+0x3c/0x68
[   42.777662]  kasan_save_track+0x20/0x40
[   42.781563]  kasan_save_alloc_info+0x40/0x58
[   42.785901]  __kasan_kmalloc+0xd4/0xd8
[   42.789725]  __kmalloc_cache_noprof+0x16c/0x3c0
[   42.794337]  rcu_uaf+0xb0/0x2d8
[   42.797542]  kunit_try_run_case+0x170/0x3f0
[   42.801798]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   42.807370]  kthread+0x328/0x630
[   42.810665]  ret_from_fork+0x10/0x20
[   42.814305] 
[   42.815838] Freed by task 0:
[   42.818775]  kasan_save_stack+0x3c/0x68
[   42.822687]  kasan_save_track+0x20/0x40
[   42.826597]  kasan_save_free_info+0x4c/0x78
[   42.830850]  __kasan_slab_free+0x6c/0x98
[   42.834846]  kfree+0x214/0x3c8
[   42.837965]  rcu_uaf_reclaim+0x28/0x70
[   42.841784]  rcu_core+0x9f4/0x1e20
[   42.845252]  rcu_core_si+0x18/0x30
[   42.848718]  handle_softirqs+0x374/0xb28
[   42.852715]  __do_softirq+0x1c/0x28
[   42.856265] 
[   42.857795] Last potentially related work creation:
[   42.862743]  kasan_save_stack+0x3c/0x68
[   42.866652]  kasan_record_aux_stack+0xb4/0xc8
[   42.871077]  __call_rcu_common.constprop.0+0x74/0x8c8
[   42.876212]  call_rcu+0x18/0x30
[   42.879421]  rcu_uaf+0x14c/0x2d8
[   42.882716]  kunit_try_run_case+0x170/0x3f0
[   42.886970]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   42.892540]  kthread+0x328/0x630
[   42.895832]  ret_from_fork+0x10/0x20
[   42.899475] 
[   42.901002] The buggy address belongs to the object at ffff0000829a85c0
[   42.901002]  which belongs to the cache kmalloc-32 of size 32
[   42.913483] The buggy address is located 0 bytes inside of
[   42.913483]  freed 32-byte region [ffff0000829a85c0, ffff0000829a85e0)
[   42.925624] 
[   42.927152] The buggy address belongs to the physical page:
[   42.932800] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029a8
[   42.940905] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   42.947520] page_type: f5(slab)
[   42.950728] raw: 0bfffe0000000000 ffff000080002780 dead000000000122 0000000000000000
[   42.958575] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   42.966417] page dumped because: kasan: bad access detected
[   42.972061] 
[   42.973592] Memory state around the buggy address:
[   42.978454]  ffff0000829a8480: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   42.985768]  ffff0000829a8500: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   42.993082] >ffff0000829a8580: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   43.000397]                                            ^
[   43.005790]  ffff0000829a8600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   43.013105]  ffff0000829a8680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   43.020418] ==================================================================

[   33.544753] ==================================================================
[   33.545038] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   33.545357] Read of size 4 at addr fff00000c7738400 by task swapper/0/0
[   33.545497] 
[   33.545580] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc3-next-20250624 #1 PREEMPT 
[   33.545780] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.545840] Hardware name: linux,dummy-virt (DT)
[   33.546001] Call trace:
[   33.546284]  show_stack+0x20/0x38 (C)
[   33.546444]  dump_stack_lvl+0x8c/0xd0
[   33.546538]  print_report+0x118/0x608
[   33.546600]  kasan_report+0xdc/0x128
[   33.546694]  __asan_report_load4_noabort+0x20/0x30
[   33.546775]  rcu_uaf_reclaim+0x64/0x70
[   33.546830]  rcu_core+0x9f4/0x1e20
[   33.546908]  rcu_core_si+0x18/0x30
[   33.547183]  handle_softirqs+0x374/0xb28
[   33.547342]  __do_softirq+0x1c/0x28
[   33.547499]  ____do_softirq+0x18/0x30
[   33.547653]  call_on_irq_stack+0x24/0x30
[   33.547835]  do_softirq_own_stack+0x24/0x38
[   33.548185]  __irq_exit_rcu+0x1fc/0x318
[   33.548306]  irq_exit_rcu+0x1c/0x80
[   33.548453]  el1_interrupt+0x38/0x58
[   33.548818]  el1h_64_irq_handler+0x18/0x28
[   33.548955]  el1h_64_irq+0x6c/0x70
[   33.549138]  arch_local_irq_enable+0x4/0x8 (P)
[   33.549272]  do_idle+0x384/0x4e8
[   33.549381]  cpu_startup_entry+0x68/0x80
[   33.549498]  rest_init+0x160/0x188
[   33.549623]  start_kernel+0x30c/0x3d0
[   33.549752]  __primary_switched+0x8c/0xa0
[   33.549880] 
[   33.549948] Allocated by task 209:
[   33.550019]  kasan_save_stack+0x3c/0x68
[   33.550125]  kasan_save_track+0x20/0x40
[   33.550222]  kasan_save_alloc_info+0x40/0x58
[   33.550327]  __kasan_kmalloc+0xd4/0xd8
[   33.550433]  __kmalloc_cache_noprof+0x16c/0x3c0
[   33.550562]  rcu_uaf+0xb0/0x2d8
[   33.550662]  kunit_try_run_case+0x170/0x3f0
[   33.550837]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.550981]  kthread+0x328/0x630
[   33.551191]  ret_from_fork+0x10/0x20
[   33.551300] 
[   33.551353] Freed by task 0:
[   33.551449]  kasan_save_stack+0x3c/0x68
[   33.551583]  kasan_save_track+0x20/0x40
[   33.551697]  kasan_save_free_info+0x4c/0x78
[   33.551839]  __kasan_slab_free+0x6c/0x98
[   33.552037]  kfree+0x214/0x3c8
[   33.552129]  rcu_uaf_reclaim+0x28/0x70
[   33.552238]  rcu_core+0x9f4/0x1e20
[   33.552377]  rcu_core_si+0x18/0x30
[   33.552473]  handle_softirqs+0x374/0xb28
[   33.552581]  __do_softirq+0x1c/0x28
[   33.552705] 
[   33.552810] Last potentially related work creation:
[   33.552917]  kasan_save_stack+0x3c/0x68
[   33.553077]  kasan_record_aux_stack+0xb4/0xc8
[   33.553203]  __call_rcu_common.constprop.0+0x74/0x8c8
[   33.553632]  call_rcu+0x18/0x30
[   33.553834]  rcu_uaf+0x14c/0x2d8
[   33.554010]  kunit_try_run_case+0x170/0x3f0
[   33.554201]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.554510]  kthread+0x328/0x630
[   33.554610]  ret_from_fork+0x10/0x20
[   33.554723] 
[   33.555047] The buggy address belongs to the object at fff00000c7738400
[   33.555047]  which belongs to the cache kmalloc-32 of size 32
[   33.555182] The buggy address is located 0 bytes inside of
[   33.555182]  freed 32-byte region [fff00000c7738400, fff00000c7738420)
[   33.555261] 
[   33.555343] The buggy address belongs to the physical page:
[   33.555448] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107738
[   33.555529] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.555591] page_type: f5(slab)
[   33.555639] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   33.555699] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   33.555749] page dumped because: kasan: bad access detected
[   33.555787] 
[   33.555808] Memory state around the buggy address:
[   33.555848]  fff00000c7738300: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   33.556875]  fff00000c7738380: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   33.557672] >fff00000c7738400: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   33.558030]                    ^
[   33.558386]  fff00000c7738480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.558496]  fff00000c7738500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   33.559037] ==================================================================

[   29.837313] ==================================================================
[   29.837966] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   29.838846] Read of size 4 at addr ffff888102de1380 by task swapper/0/0
[   29.839618] 
[   29.840488] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Tainted: G    B            N  6.16.0-rc3-next-20250624 #1 PREEMPT(voluntary) 
[   29.840672] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.840722] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   29.840763] Call Trace:
[   29.840804]  <IRQ>
[   29.840829]  dump_stack_lvl+0x73/0xb0
[   29.840878]  print_report+0xd1/0x650
[   29.840911]  ? __virt_addr_valid+0x1db/0x2d0
[   29.840946]  ? rcu_uaf_reclaim+0x50/0x60
[   29.840973]  ? kasan_complete_mode_report_info+0x64/0x200
[   29.841006]  ? rcu_uaf_reclaim+0x50/0x60
[   29.841033]  kasan_report+0x141/0x180
[   29.841086]  ? rcu_uaf_reclaim+0x50/0x60
[   29.841142]  __asan_report_load4_noabort+0x18/0x20
[   29.841195]  rcu_uaf_reclaim+0x50/0x60
[   29.841225]  rcu_core+0x66f/0x1c40
[   29.841263]  ? __pfx_rcu_core+0x10/0x10
[   29.841292]  ? ktime_get+0x6b/0x150
[   29.841326]  rcu_core_si+0x12/0x20
[   29.841352]  handle_softirqs+0x209/0x730
[   29.841380]  ? hrtimer_interrupt+0x2fe/0x780
[   29.841415]  ? __pfx_handle_softirqs+0x10/0x10
[   29.841447]  __irq_exit_rcu+0xc9/0x110
[   29.841473]  irq_exit_rcu+0x12/0x20
[   29.841499]  sysvec_apic_timer_interrupt+0x81/0x90
[   29.841533]  </IRQ>
[   29.841594]  <TASK>
[   29.841610]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   29.841750] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   29.842023] 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 83 d9 1a 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
[   29.842220] RSP: 0000:ffffffffa0607dd8 EFLAGS: 00010206
[   29.842342] RAX: ffff8881b962f000 RBX: ffffffffa061cac0 RCX: ffffffff9f4de165
[   29.842401] RDX: ffffed102b606193 RSI: 0000000000000004 RDI: 0000000000039794
[   29.842457] RBP: ffffffffa0607de0 R08: 0000000000000001 R09: ffffed102b606192
[   29.842511] R10: ffff88815b030c93 R11: 0000000000063800 R12: 0000000000000000
[   29.842587] R13: fffffbfff40c3958 R14: ffffffffa11e9490 R15: 0000000000000000
[   29.842678]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   29.842759]  ? default_idle+0xd/0x20
[   29.842790]  arch_cpu_idle+0xd/0x20
[   29.842817]  default_idle_call+0x48/0x80
[   29.842845]  do_idle+0x379/0x4f0
[   29.842880]  ? __pfx_do_idle+0x10/0x10
[   29.842915]  cpu_startup_entry+0x5c/0x70
[   29.842946]  rest_init+0x11a/0x140
[   29.842971]  ? acpi_subsystem_init+0x5d/0x150
[   29.843006]  start_kernel+0x352/0x400
[   29.843035]  x86_64_start_reservations+0x1c/0x30
[   29.843082]  x86_64_start_kernel+0x10d/0x120
[   29.843135]  common_startup_64+0x13e/0x148
[   29.843194]  </TASK>
[   29.843211] 
[   29.866530] Allocated by task 228:
[   29.867359]  kasan_save_stack+0x45/0x70
[   29.867618]  kasan_save_track+0x18/0x40
[   29.868089]  kasan_save_alloc_info+0x3b/0x50
[   29.868575]  __kasan_kmalloc+0xb7/0xc0
[   29.869070]  __kmalloc_cache_noprof+0x189/0x420
[   29.869832]  rcu_uaf+0xb0/0x330
[   29.870262]  kunit_try_run_case+0x1a5/0x480
[   29.870643]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   29.871925]  kthread+0x337/0x6f0
[   29.872267]  ret_from_fork+0x116/0x1d0
[   29.872715]  ret_from_fork_asm+0x1a/0x30
[   29.873097] 
[   29.873284] Freed by task 0:
[   29.874087]  kasan_save_stack+0x45/0x70
[   29.874296]  kasan_save_track+0x18/0x40
[   29.874748]  kasan_save_free_info+0x3f/0x60
[   29.875193]  __kasan_slab_free+0x56/0x70
[   29.875964]  kfree+0x222/0x3f0
[   29.876618]  rcu_uaf_reclaim+0x1f/0x60
[   29.876910]  rcu_core+0x66f/0x1c40
[   29.877282]  rcu_core_si+0x12/0x20
[   29.877835]  handle_softirqs+0x209/0x730
[   29.878186]  __irq_exit_rcu+0xc9/0x110
[   29.879111]  irq_exit_rcu+0x12/0x20
[   29.879597]  sysvec_apic_timer_interrupt+0x81/0x90
[   29.880006]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   29.880382] 
[   29.881030] Last potentially related work creation:
[   29.881669]  kasan_save_stack+0x45/0x70
[   29.881965]  kasan_record_aux_stack+0xb2/0xc0
[   29.882913]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   29.883733]  call_rcu+0x12/0x20
[   29.884209]  rcu_uaf+0x168/0x330
[   29.884812]  kunit_try_run_case+0x1a5/0x480
[   29.885523]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   29.886337]  kthread+0x337/0x6f0
[   29.886778]  ret_from_fork+0x116/0x1d0
[   29.887301]  ret_from_fork_asm+0x1a/0x30
[   29.887859] 
[   29.888101] The buggy address belongs to the object at ffff888102de1380
[   29.888101]  which belongs to the cache kmalloc-32 of size 32
[   29.888866] The buggy address is located 0 bytes inside of
[   29.888866]  freed 32-byte region [ffff888102de1380, ffff888102de13a0)
[   29.890083] 
[   29.890284] The buggy address belongs to the physical page:
[   29.891262] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102de1
[   29.891484] flags: 0x200000000000000(node=0|zone=2)
[   29.891727] page_type: f5(slab)
[   29.892057] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   29.892624] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   29.893390] page dumped because: kasan: bad access detected
[   29.894592] 
[   29.894769] Memory state around the buggy address:
[   29.895228]  ffff888102de1280: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   29.895865]  ffff888102de1300: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   29.896601] >ffff888102de1380: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   29.897053]                    ^
[   29.897799]  ffff888102de1400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.898674]  ffff888102de1480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   29.899148] ==================================================================