Hay
Date
July 19, 2025, 11:11 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.719182] ==================================================================
[   15.719323] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x64/0x70
[   15.719390] Read of size 4 at addr fff00000c6e662c0 by task swapper/1/0
[   15.719437] 
[   15.719478] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.719574] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.719600] Hardware name: linux,dummy-virt (DT)
[   15.719661] Call trace:
[   15.719693]  show_stack+0x20/0x38 (C)
[   15.719821]  dump_stack_lvl+0x8c/0xd0
[   15.719870]  print_report+0x118/0x5d0
[   15.719916]  kasan_report+0xdc/0x128
[   15.719962]  __asan_report_load4_noabort+0x20/0x30
[   15.720011]  rcu_uaf_reclaim+0x64/0x70
[   15.720060]  rcu_core+0x9f4/0x1e20
[   15.720315]  rcu_core_si+0x18/0x30
[   15.720545]  handle_softirqs+0x374/0xb28
[   15.720643]  __do_softirq+0x1c/0x28
[   15.720866]  ____do_softirq+0x18/0x30
[   15.720913]  call_on_irq_stack+0x24/0x30
[   15.720963]  do_softirq_own_stack+0x24/0x38
[   15.721147]  __irq_exit_rcu+0x1fc/0x318
[   15.721205]  irq_exit_rcu+0x1c/0x80
[   15.721409]  el1_interrupt+0x38/0x58
[   15.721463]  el1h_64_irq_handler+0x18/0x28
[   15.722036]  el1h_64_irq+0x6c/0x70
[   15.722470]  arch_local_irq_enable+0x4/0x8 (P)
[   15.722550]  do_idle+0x384/0x4e8
[   15.722696]  cpu_startup_entry+0x64/0x80
[   15.722921]  secondary_start_kernel+0x288/0x340
[   15.723005]  __secondary_switched+0xc0/0xc8
[   15.723061] 
[   15.723079] Allocated by task 199:
[   15.723115]  kasan_save_stack+0x3c/0x68
[   15.723184]  kasan_save_track+0x20/0x40
[   15.723324]  kasan_save_alloc_info+0x40/0x58
[   15.723522]  __kasan_kmalloc+0xd4/0xd8
[   15.723681]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.723759]  rcu_uaf+0xb0/0x2d8
[   15.723843]  kunit_try_run_case+0x170/0x3f0
[   15.723964]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.724010]  kthread+0x328/0x630
[   15.724065]  ret_from_fork+0x10/0x20
[   15.724252] 
[   15.724321] Freed by task 0:
[   15.724347]  kasan_save_stack+0x3c/0x68
[   15.724385]  kasan_save_track+0x20/0x40
[   15.724422]  kasan_save_free_info+0x4c/0x78
[   15.724460]  __kasan_slab_free+0x6c/0x98
[   15.724518]  kfree+0x214/0x3c8
[   15.725232]  rcu_uaf_reclaim+0x28/0x70
[   15.725721]  rcu_core+0x9f4/0x1e20
[   15.726010]  rcu_core_si+0x18/0x30
[   15.726053]  handle_softirqs+0x374/0xb28
[   15.726091]  __do_softirq+0x1c/0x28
[   15.726363] 
[   15.726494] Last potentially related work creation:
[   15.726543]  kasan_save_stack+0x3c/0x68
[   15.726589]  kasan_record_aux_stack+0xb4/0xc8
[   15.726631]  __call_rcu_common.constprop.0+0x74/0x8c8
[   15.726685]  call_rcu+0x18/0x30
[   15.726765]  rcu_uaf+0x14c/0x2d8
[   15.726800]  kunit_try_run_case+0x170/0x3f0
[   15.726860]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.726904]  kthread+0x328/0x630
[   15.726936]  ret_from_fork+0x10/0x20
[   15.727208] 
[   15.727240] The buggy address belongs to the object at fff00000c6e662c0
[   15.727240]  which belongs to the cache kmalloc-32 of size 32
[   15.727561] The buggy address is located 0 bytes inside of
[   15.727561]  freed 32-byte region [fff00000c6e662c0, fff00000c6e662e0)
[   15.727809] 
[   15.727856] The buggy address belongs to the physical page:
[   15.727894] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106e66
[   15.728129] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.728321] page_type: f5(slab)
[   15.728364] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   15.728444] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   15.728484] page dumped because: kasan: bad access detected
[   15.728516] 
[   15.728629] Memory state around the buggy address:
[   15.728863]  fff00000c6e66180: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc
[   15.728915]  fff00000c6e66200: 00 00 05 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   15.728958] >fff00000c6e66280: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   15.728996]                                            ^
[   15.729117]  fff00000c6e66300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.729381]  fff00000c6e66380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.729424] ==================================================================

[   12.606158] ==================================================================
[   12.606645] BUG: KASAN: slab-use-after-free in rcu_uaf_reclaim+0x50/0x60
[   12.606987] Read of size 4 at addr ffff888102f63940 by task swapper/1/0
[   12.607265] 
[   12.607368] CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.607472] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.607484] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.607517] Call Trace:
[   12.607544]  <IRQ>
[   12.607562]  dump_stack_lvl+0x73/0xb0
[   12.607595]  print_report+0xd1/0x610
[   12.607655]  ? __virt_addr_valid+0x1db/0x2d0
[   12.607706]  ? rcu_uaf_reclaim+0x50/0x60
[   12.607725]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.607747]  ? rcu_uaf_reclaim+0x50/0x60
[   12.607767]  kasan_report+0x141/0x180
[   12.607788]  ? rcu_uaf_reclaim+0x50/0x60
[   12.607812]  __asan_report_load4_noabort+0x18/0x20
[   12.607835]  rcu_uaf_reclaim+0x50/0x60
[   12.607855]  rcu_core+0x66f/0x1c40
[   12.607883]  ? __pfx_rcu_core+0x10/0x10
[   12.607903]  ? ktime_get+0x6b/0x150
[   12.607924]  ? handle_softirqs+0x18e/0x730
[   12.607949]  rcu_core_si+0x12/0x20
[   12.607968]  handle_softirqs+0x209/0x730
[   12.607987]  ? hrtimer_interrupt+0x2fe/0x780
[   12.608008]  ? __pfx_handle_softirqs+0x10/0x10
[   12.608033]  __irq_exit_rcu+0xc9/0x110
[   12.608053]  irq_exit_rcu+0x12/0x20
[   12.608072]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.608096]  </IRQ>
[   12.608121]  <TASK>
[   12.608131]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.608301] RIP: 0010:pv_native_safe_halt+0xf/0x20
[   12.608533] 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.608616] RSP: 0000:ffff888100877dc8 EFLAGS: 00010202
[   12.608703] RAX: ffff88819e772000 RBX: ffff888100853000 RCX: ffffffffba476125
[   12.608747] RDX: ffffed102b62618b RSI: 0000000000000004 RDI: 000000000000e714
[   12.608788] RBP: ffff888100877dd0 R08: 0000000000000001 R09: ffffed102b62618a
[   12.608829] R10: ffff88815b130c53 R11: 0000000000000000 R12: 0000000000000001
[   12.608873] R13: ffffed102010a600 R14: ffffffffbc1b1490 R15: 0000000000000000
[   12.608934]  ? ct_kernel_exit.constprop.0+0xa5/0xd0
[   12.608986]  ? default_idle+0xd/0x20
[   12.609007]  arch_cpu_idle+0xd/0x20
[   12.609028]  default_idle_call+0x48/0x80
[   12.609047]  do_idle+0x379/0x4f0
[   12.609072]  ? __pfx_do_idle+0x10/0x10
[   12.609099]  cpu_startup_entry+0x5c/0x70
[   12.609118]  start_secondary+0x211/0x290
[   12.609139]  ? __pfx_start_secondary+0x10/0x10
[   12.609164]  common_startup_64+0x13e/0x148
[   12.609195]  </TASK>
[   12.609205] 
[   12.623787] Allocated by task 216:
[   12.624099]  kasan_save_stack+0x45/0x70
[   12.624429]  kasan_save_track+0x18/0x40
[   12.624867]  kasan_save_alloc_info+0x3b/0x50
[   12.625285]  __kasan_kmalloc+0xb7/0xc0
[   12.625484]  __kmalloc_cache_noprof+0x189/0x420
[   12.625673]  rcu_uaf+0xb0/0x330
[   12.625859]  kunit_try_run_case+0x1a5/0x480
[   12.626048]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.626359]  kthread+0x337/0x6f0
[   12.626533]  ret_from_fork+0x116/0x1d0
[   12.626735]  ret_from_fork_asm+0x1a/0x30
[   12.626882] 
[   12.626978] Freed by task 0:
[   12.627217]  kasan_save_stack+0x45/0x70
[   12.627399]  kasan_save_track+0x18/0x40
[   12.627603]  kasan_save_free_info+0x3f/0x60
[   12.627814]  __kasan_slab_free+0x56/0x70
[   12.628001]  kfree+0x222/0x3f0
[   12.628157]  rcu_uaf_reclaim+0x1f/0x60
[   12.628442]  rcu_core+0x66f/0x1c40
[   12.628651]  rcu_core_si+0x12/0x20
[   12.628859]  handle_softirqs+0x209/0x730
[   12.629218]  __irq_exit_rcu+0xc9/0x110
[   12.629415]  irq_exit_rcu+0x12/0x20
[   12.629619]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.629860]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.630146] 
[   12.630311] Last potentially related work creation:
[   12.630550]  kasan_save_stack+0x45/0x70
[   12.630752]  kasan_record_aux_stack+0xb2/0xc0
[   12.630979]  __call_rcu_common.constprop.0+0x7b/0x9e0
[   12.631363]  call_rcu+0x12/0x20
[   12.631523]  rcu_uaf+0x168/0x330
[   12.631716]  kunit_try_run_case+0x1a5/0x480
[   12.631913]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.632150]  kthread+0x337/0x6f0
[   12.632266]  ret_from_fork+0x116/0x1d0
[   12.632394]  ret_from_fork_asm+0x1a/0x30
[   12.632552] 
[   12.632661] The buggy address belongs to the object at ffff888102f63940
[   12.632661]  which belongs to the cache kmalloc-32 of size 32
[   12.633386] The buggy address is located 0 bytes inside of
[   12.633386]  freed 32-byte region [ffff888102f63940, ffff888102f63960)
[   12.633861] 
[   12.633958] The buggy address belongs to the physical page:
[   12.634387] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f63
[   12.634810] flags: 0x200000000000000(node=0|zone=2)
[   12.635042] page_type: f5(slab)
[   12.635163] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   12.635576] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   12.635841] page dumped because: kasan: bad access detected
[   12.636015] 
[   12.636105] Memory state around the buggy address:
[   12.636326]  ffff888102f63800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   12.636877]  ffff888102f63880: 00 00 00 fc fc fc fc fc 00 00 05 fc fc fc fc fc
[   12.637566] >ffff888102f63900: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   12.638168]                                            ^
[   12.639036]  ffff888102f63980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.639284]  ffff888102f63a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.639769] ==================================================================