Hay
Date
June 26, 2025, 9:10 a.m.

Environment
dragonboard-845c
qemu-arm64
qemu-x86_64

[   45.924166] ==================================================================
[   45.935939] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468
[   45.943178] Read of size 1 at addr ffff000094654000 by task kunit_try_catch/299
[   45.950586] 
[   45.952126] CPU: 7 UID: 0 PID: 299 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250626 #1 PREEMPT 
[   45.952162] Tainted: [B]=BAD_PAGE, [N]=TEST
[   45.952170] Hardware name: Thundercomm Dragonboard 845c (DT)
[   45.952185] Call trace:
[   45.952193]  show_stack+0x20/0x38 (C)
[   45.952215]  dump_stack_lvl+0x8c/0xd0
[   45.952236]  print_report+0x118/0x608
[   45.952258]  kasan_report+0xdc/0x128
[   45.952277]  __asan_report_load1_noabort+0x20/0x30
[   45.952293]  kmem_cache_rcu_uaf+0x388/0x468
[   45.952310]  kunit_try_run_case+0x170/0x3f0
[   45.952383]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   45.952402]  kthread+0x328/0x630
[   45.952416]  ret_from_fork+0x10/0x20
[   45.952435] 
[   46.018092] Allocated by task 299:
[   46.021546]  kasan_save_stack+0x3c/0x68
[   46.025450]  kasan_save_track+0x20/0x40
[   46.029353]  kasan_save_alloc_info+0x40/0x58
[   46.033685]  __kasan_slab_alloc+0xa8/0xb0
[   46.037761]  kmem_cache_alloc_noprof+0x10c/0x398
[   46.042448]  kmem_cache_rcu_uaf+0x12c/0x468
[   46.046696]  kunit_try_run_case+0x170/0x3f0
[   46.050943]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   46.056512]  kthread+0x328/0x630
[   46.059793]  ret_from_fork+0x10/0x20
[   46.063423] 
[   46.064954] Freed by task 0:
[   46.067888]  kasan_save_stack+0x3c/0x68
[   46.071790]  kasan_save_track+0x20/0x40
[   46.075693]  kasan_save_free_info+0x4c/0x78
[   46.079938]  __kasan_slab_free+0x6c/0x98
[   46.083928]  slab_free_after_rcu_debug+0xd4/0x2f8
[   46.088697]  rcu_core+0x9f4/0x1e20
[   46.092157]  rcu_core_si+0x18/0x30
[   46.095613]  handle_softirqs+0x374/0xb28
[   46.099602]  __do_softirq+0x1c/0x28
[   46.103147] 
[   46.104675] Last potentially related work creation:
[   46.109611]  kasan_save_stack+0x3c/0x68
[   46.113512]  kasan_record_aux_stack+0xb4/0xc8
[   46.117933]  kmem_cache_free+0x120/0x468
[   46.121920]  kmem_cache_rcu_uaf+0x16c/0x468
[   46.126168]  kunit_try_run_case+0x170/0x3f0
[   46.130415]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   46.135983]  kthread+0x328/0x630
[   46.139267]  ret_from_fork+0x10/0x20
[   46.142899] 
[   46.144425] The buggy address belongs to the object at ffff000094654000
[   46.144425]  which belongs to the cache test_cache of size 200
[   46.156992] The buggy address is located 0 bytes inside of
[   46.156992]  freed 200-byte region [ffff000094654000, ffff0000946540c8)
[   46.169210] 
[   46.170735] The buggy address belongs to the physical page:
[   46.176384] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x114654
[   46.184485] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   46.192235] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   46.199292] page_type: f5(slab)
[   46.202493] raw: 0bfffe0000000040 ffff00008195f040 dead000000000122 0000000000000000
[   46.210332] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   46.218170] head: 0bfffe0000000040 ffff00008195f040 dead000000000122 0000000000000000
[   46.226095] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   46.234019] head: 0bfffe0000000001 fffffdffc2519501 00000000ffffffff 00000000ffffffff
[   46.241943] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   46.249863] page dumped because: kasan: bad access detected
[   46.255500] 
[   46.257032] Memory state around the buggy address:
[   46.261885]  ffff000094653f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   46.269198]  ffff000094653f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   46.276511] >ffff000094654000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   46.283821]                    ^
[   46.287105]  ffff000094654080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   46.294416]  ffff000094654100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   46.301726] ==================================================================

[   28.172157] ==================================================================
[   28.172246] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468
[   28.172324] Read of size 1 at addr fff00000c77fa000 by task kunit_try_catch/225
[   28.172375] 
[   28.172418] CPU: 1 UID: 0 PID: 225 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250626 #1 PREEMPT 
[   28.172509] Tainted: [B]=BAD_PAGE, [N]=TEST
[   28.172537] Hardware name: linux,dummy-virt (DT)
[   28.172570] Call trace:
[   28.172596]  show_stack+0x20/0x38 (C)
[   28.172650]  dump_stack_lvl+0x8c/0xd0
[   28.172704]  print_report+0x118/0x608
[   28.172751]  kasan_report+0xdc/0x128
[   28.172797]  __asan_report_load1_noabort+0x20/0x30
[   28.172846]  kmem_cache_rcu_uaf+0x388/0x468
[   28.172896]  kunit_try_run_case+0x170/0x3f0
[   28.172948]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.173000]  kthread+0x328/0x630
[   28.173046]  ret_from_fork+0x10/0x20
[   28.173110] 
[   28.173130] Allocated by task 225:
[   28.173159]  kasan_save_stack+0x3c/0x68
[   28.173201]  kasan_save_track+0x20/0x40
[   28.173240]  kasan_save_alloc_info+0x40/0x58
[   28.173277]  __kasan_slab_alloc+0xa8/0xb0
[   28.173315]  kmem_cache_alloc_noprof+0x10c/0x398
[   28.173356]  kmem_cache_rcu_uaf+0x12c/0x468
[   28.173394]  kunit_try_run_case+0x170/0x3f0
[   28.173431]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.173475]  kthread+0x328/0x630
[   28.173506]  ret_from_fork+0x10/0x20
[   28.173541] 
[   28.173560] Freed by task 0:
[   28.173586]  kasan_save_stack+0x3c/0x68
[   28.173623]  kasan_save_track+0x20/0x40
[   28.173659]  kasan_save_free_info+0x4c/0x78
[   28.173696]  __kasan_slab_free+0x6c/0x98
[   28.173732]  slab_free_after_rcu_debug+0xd4/0x2f8
[   28.173773]  rcu_core+0x9f4/0x1e20
[   28.173810]  rcu_core_si+0x18/0x30
[   28.173844]  handle_softirqs+0x374/0xb28
[   28.173881]  __do_softirq+0x1c/0x28
[   28.173916] 
[   28.173935] Last potentially related work creation:
[   28.173962]  kasan_save_stack+0x3c/0x68
[   28.174001]  kasan_record_aux_stack+0xb4/0xc8
[   28.174038]  kmem_cache_free+0x120/0x468
[   28.174087]  kmem_cache_rcu_uaf+0x16c/0x468
[   28.174124]  kunit_try_run_case+0x170/0x3f0
[   28.174167]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.174212]  kthread+0x328/0x630
[   28.174244]  ret_from_fork+0x10/0x20
[   28.174280] 
[   28.174298] The buggy address belongs to the object at fff00000c77fa000
[   28.174298]  which belongs to the cache test_cache of size 200
[   28.174357] The buggy address is located 0 bytes inside of
[   28.174357]  freed 200-byte region [fff00000c77fa000, fff00000c77fa0c8)
[   28.174417] 
[   28.174439] The buggy address belongs to the physical page:
[   28.174471] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077fa
[   28.174528] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   28.174580] page_type: f5(slab)
[   28.174621] raw: 0bfffe0000000000 fff00000c56c28c0 dead000000000122 0000000000000000
[   28.174671] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   28.174713] page dumped because: kasan: bad access detected
[   28.174745] 
[   28.174762] Memory state around the buggy address:
[   28.174793]  fff00000c77f9f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   28.174836]  fff00000c77f9f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   28.174879] >fff00000c77fa000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   28.174917]                    ^
[   28.174943]  fff00000c77fa080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   28.174985]  fff00000c77fa100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   28.175025] ==================================================================

[   22.910198] ==================================================================
[   22.911421] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510
[   22.911779] Read of size 1 at addr ffff888102d58000 by task kunit_try_catch/242
[   22.912288] 
[   22.912396] CPU: 1 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250626 #1 PREEMPT(voluntary) 
[   22.912452] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.912465] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   22.912489] Call Trace:
[   22.912852]  <TASK>
[   22.912882]  dump_stack_lvl+0x73/0xb0
[   22.912918]  print_report+0xd1/0x650
[   22.912942]  ? __virt_addr_valid+0x1db/0x2d0
[   22.913191]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   22.913216]  ? kasan_complete_mode_report_info+0x64/0x200
[   22.913257]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   22.913279]  kasan_report+0x141/0x180
[   22.913301]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   22.913326]  __asan_report_load1_noabort+0x18/0x20
[   22.913349]  kmem_cache_rcu_uaf+0x3e3/0x510
[   22.913371]  ? __pfx_kmem_cache_rcu_uaf+0x10/0x10
[   22.913392]  ? finish_task_switch.isra.0+0x153/0x700
[   22.913415]  ? __switch_to+0x47/0xf50
[   22.913444]  ? __pfx_read_tsc+0x10/0x10
[   22.913466]  ? ktime_get_ts64+0x86/0x230
[   22.913492]  kunit_try_run_case+0x1a5/0x480
[   22.913518]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.913539]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   22.913566]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   22.913590]  ? __kthread_parkme+0x82/0x180
[   22.913610]  ? preempt_count_sub+0x50/0x80
[   22.913636]  ? __pfx_kunit_try_run_case+0x10/0x10
[   22.913659]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.913681]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   22.913705]  kthread+0x337/0x6f0
[   22.913723]  ? trace_preempt_on+0x20/0xc0
[   22.913748]  ? __pfx_kthread+0x10/0x10
[   22.913773]  ? _raw_spin_unlock_irq+0x47/0x80
[   22.913973]  ? calculate_sigpending+0x7b/0xa0
[   22.914001]  ? __pfx_kthread+0x10/0x10
[   22.914023]  ret_from_fork+0x116/0x1d0
[   22.914042]  ? __pfx_kthread+0x10/0x10
[   22.914062]  ret_from_fork_asm+0x1a/0x30
[   22.914093]  </TASK>
[   22.914106] 
[   22.924774] Allocated by task 242:
[   22.925296]  kasan_save_stack+0x45/0x70
[   22.925638]  kasan_save_track+0x18/0x40
[   22.925879]  kasan_save_alloc_info+0x3b/0x50
[   22.926211]  __kasan_slab_alloc+0x91/0xa0
[   22.926411]  kmem_cache_alloc_noprof+0x123/0x3f0
[   22.926622]  kmem_cache_rcu_uaf+0x155/0x510
[   22.926814]  kunit_try_run_case+0x1a5/0x480
[   22.927002]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.927327]  kthread+0x337/0x6f0
[   22.927454]  ret_from_fork+0x116/0x1d0
[   22.927624]  ret_from_fork_asm+0x1a/0x30
[   22.927812] 
[   22.928065] Freed by task 0:
[   22.928260]  kasan_save_stack+0x45/0x70
[   22.928469]  kasan_save_track+0x18/0x40
[   22.928622]  kasan_save_free_info+0x3f/0x60
[   22.928781]  __kasan_slab_free+0x56/0x70
[   22.929260]  slab_free_after_rcu_debug+0xe4/0x310
[   22.929508]  rcu_core+0x66f/0x1c40
[   22.929695]  rcu_core_si+0x12/0x20
[   22.929958]  handle_softirqs+0x209/0x730
[   22.930172]  __irq_exit_rcu+0xc9/0x110
[   22.930332]  irq_exit_rcu+0x12/0x20
[   22.930451]  sysvec_apic_timer_interrupt+0x81/0x90
[   22.930670]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   22.930904] 
[   22.930972] Last potentially related work creation:
[   22.931198]  kasan_save_stack+0x45/0x70
[   22.931396]  kasan_record_aux_stack+0xb2/0xc0
[   22.931742]  kmem_cache_free+0x131/0x420
[   22.931904]  kmem_cache_rcu_uaf+0x194/0x510
[   22.932185]  kunit_try_run_case+0x1a5/0x480
[   22.932336]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   22.932681]  kthread+0x337/0x6f0
[   22.933141]  ret_from_fork+0x116/0x1d0
[   22.933468]  ret_from_fork_asm+0x1a/0x30
[   22.933652] 
[   22.933746] The buggy address belongs to the object at ffff888102d58000
[   22.933746]  which belongs to the cache test_cache of size 200
[   22.934298] The buggy address is located 0 bytes inside of
[   22.934298]  freed 200-byte region [ffff888102d58000, ffff888102d580c8)
[   22.935039] 
[   22.935133] The buggy address belongs to the physical page:
[   22.935476] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d58
[   22.935752] flags: 0x200000000000000(node=0|zone=2)
[   22.935992] page_type: f5(slab)
[   22.936206] raw: 0200000000000000 ffff8881015d98c0 dead000000000122 0000000000000000
[   22.936561] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   22.936901] page dumped because: kasan: bad access detected
[   22.937066] 
[   22.937176] Memory state around the buggy address:
[   22.937415]  ffff888102d57f00: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
[   22.938163]  ffff888102d57f80: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc
[   22.938488] >ffff888102d58000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.938764]                    ^
[   22.938948]  ffff888102d58080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   22.939336]  ffff888102d58100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.939914] ==================================================================