Hay
Date
April 20, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64
rk3399-rock-pi-4b

[   24.733296] ==================================================================
[   24.733471] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468
[   24.733626] Read of size 1 at addr fff00000c67fd000 by task kunit_try_catch/215
[   24.733749] 
[   24.733837] CPU: 0 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   24.739362] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.739634] Hardware name: linux,dummy-virt (DT)
[   24.739878] Call trace:
[   24.740098]  show_stack+0x20/0x38 (C)
[   24.740236]  dump_stack_lvl+0x8c/0xd0
[   24.741498]  print_report+0x118/0x608
[   24.741686]  kasan_report+0xdc/0x128
[   24.741799]  __asan_report_load1_noabort+0x20/0x30
[   24.743450]  kmem_cache_rcu_uaf+0x388/0x468
[   24.743626]  kunit_try_run_case+0x170/0x3f0
[   24.743742]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.743820]  kthread+0x328/0x630
[   24.743994]  ret_from_fork+0x10/0x20
[   24.744301] 
[   24.744368] Allocated by task 215:
[   24.744476]  kasan_save_stack+0x3c/0x68
[   24.744579]  kasan_save_track+0x20/0x40
[   24.744667]  kasan_save_alloc_info+0x40/0x58
[   24.744903]  __kasan_slab_alloc+0xa8/0xb0
[   24.745035]  kmem_cache_alloc_noprof+0x10c/0x3a0
[   24.745168]  kmem_cache_rcu_uaf+0x12c/0x468
[   24.745264]  kunit_try_run_case+0x170/0x3f0
[   24.745359]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.745494]  kthread+0x328/0x630
[   24.745627]  ret_from_fork+0x10/0x20
[   24.745721] 
[   24.745767] Freed by task 0:
[   24.745841]  kasan_save_stack+0x3c/0x68
[   24.745977]  kasan_save_track+0x20/0x40
[   24.746094]  kasan_save_free_info+0x4c/0x78
[   24.746192]  __kasan_slab_free+0x6c/0x98
[   24.746303]  slab_free_after_rcu_debug+0xd4/0x2f8
[   24.746403]  rcu_core+0x9f4/0x1e20
[   24.746521]  rcu_core_si+0x18/0x30
[   24.746629]  handle_softirqs+0x374/0xb28
[   24.746726]  __do_softirq+0x1c/0x28
[   24.746841] 
[   24.746889] Last potentially related work creation:
[   24.747177]  kasan_save_stack+0x3c/0x68
[   24.747293]  kasan_record_aux_stack+0xb4/0xc8
[   24.747737]  kmem_cache_free+0x120/0x470
[   24.747899]  kmem_cache_rcu_uaf+0x16c/0x468
[   24.748158]  kunit_try_run_case+0x170/0x3f0
[   24.748371]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.748580]  kthread+0x328/0x630
[   24.748819]  ret_from_fork+0x10/0x20
[   24.749029] 
[   24.749431] The buggy address belongs to the object at fff00000c67fd000
[   24.749431]  which belongs to the cache test_cache of size 200
[   24.749718] The buggy address is located 0 bytes inside of
[   24.749718]  freed 200-byte region [fff00000c67fd000, fff00000c67fd0c8)
[   24.749994] 
[   24.750148] The buggy address belongs to the physical page:
[   24.750383] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1067fd
[   24.750673] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.750837] page_type: f5(slab)
[   24.750954] raw: 0bfffe0000000000 fff00000c1743a00 dead000000000122 0000000000000000
[   24.751087] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   24.751306] page dumped because: kasan: bad access detected
[   24.751442] 
[   24.751490] Memory state around the buggy address:
[   24.751565]  fff00000c67fcf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   24.751986]  fff00000c67fcf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   24.752527] >fff00000c67fd000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   24.752656]                    ^
[   24.752731]  fff00000c67fd080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   24.753437]  fff00000c67fd100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.753546] ==================================================================

[   12.264654] ==================================================================
[   12.265168] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510
[   12.265565] Read of size 1 at addr ffff888102b47000 by task kunit_try_catch/233
[   12.265862] 
[   12.265953] CPU: 1 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   12.265998] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.266009] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.266030] Call Trace:
[   12.266043]  <TASK>
[   12.266079]  dump_stack_lvl+0x73/0xb0
[   12.266107]  print_report+0xd1/0x650
[   12.266143]  ? __virt_addr_valid+0x1db/0x2d0
[   12.266166]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   12.266184]  ? kasan_complete_mode_report_info+0x64/0x200
[   12.266219]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   12.266582]  kasan_report+0x141/0x180
[   12.266609]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   12.266634]  __asan_report_load1_noabort+0x18/0x20
[   12.266656]  kmem_cache_rcu_uaf+0x3e3/0x510
[   12.266676]  ? __pfx_kmem_cache_rcu_uaf+0x10/0x10
[   12.266695]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   12.266728]  ? __pfx_kmem_cache_rcu_uaf+0x10/0x10
[   12.266753]  kunit_try_run_case+0x1a5/0x480
[   12.266777]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.266799]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.266824]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.266847]  ? __kthread_parkme+0x82/0x180
[   12.266869]  ? preempt_count_sub+0x50/0x80
[   12.266895]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.266918]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.266940]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.266963]  kthread+0x337/0x6f0
[   12.266983]  ? trace_preempt_on+0x20/0xc0
[   12.267008]  ? __pfx_kthread+0x10/0x10
[   12.267030]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.267051]  ? calculate_sigpending+0x7b/0xa0
[   12.267074]  ? __pfx_kthread+0x10/0x10
[   12.267096]  ret_from_fork+0x41/0x80
[   12.267117]  ? __pfx_kthread+0x10/0x10
[   12.267139]  ret_from_fork_asm+0x1a/0x30
[   12.267172]  </TASK>
[   12.267183] 
[   12.275057] Allocated by task 233:
[   12.275271]  kasan_save_stack+0x45/0x70
[   12.275559]  kasan_save_track+0x18/0x40
[   12.275835]  kasan_save_alloc_info+0x3b/0x50
[   12.276074]  __kasan_slab_alloc+0x91/0xa0
[   12.276382]  kmem_cache_alloc_noprof+0x123/0x3f0
[   12.276758]  kmem_cache_rcu_uaf+0x155/0x510
[   12.276984]  kunit_try_run_case+0x1a5/0x480
[   12.277205]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.277609]  kthread+0x337/0x6f0
[   12.277803]  ret_from_fork+0x41/0x80
[   12.277955]  ret_from_fork_asm+0x1a/0x30
[   12.278133] 
[   12.278226] Freed by task 0:
[   12.278493]  kasan_save_stack+0x45/0x70
[   12.278729]  kasan_save_track+0x18/0x40
[   12.278887]  kasan_save_free_info+0x3f/0x60
[   12.279079]  __kasan_slab_free+0x56/0x70
[   12.279443]  slab_free_after_rcu_debug+0xe4/0x310
[   12.279741]  rcu_core+0x66c/0x1c30
[   12.279877]  rcu_core_si+0x12/0x20
[   12.280135]  handle_softirqs+0x209/0x730
[   12.280422]  __irq_exit_rcu+0xc9/0x110
[   12.280559]  irq_exit_rcu+0x12/0x20
[   12.280914]  sysvec_apic_timer_interrupt+0x81/0x90
[   12.281337]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   12.281730] 
[   12.281812] Last potentially related work creation:
[   12.281965]  kasan_save_stack+0x45/0x70
[   12.282590]  kasan_record_aux_stack+0xb2/0xc0
[   12.282892]  kmem_cache_free+0x131/0x420
[   12.283097]  kmem_cache_rcu_uaf+0x194/0x510
[   12.283317]  kunit_try_run_case+0x1a5/0x480
[   12.283578]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.283809]  kthread+0x337/0x6f0
[   12.284049]  ret_from_fork+0x41/0x80
[   12.284215]  ret_from_fork_asm+0x1a/0x30
[   12.284627] 
[   12.284718] The buggy address belongs to the object at ffff888102b47000
[   12.284718]  which belongs to the cache test_cache of size 200
[   12.285641] The buggy address is located 0 bytes inside of
[   12.285641]  freed 200-byte region [ffff888102b47000, ffff888102b470c8)
[   12.286096] 
[   12.286191] The buggy address belongs to the physical page:
[   12.286516] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b47
[   12.287228] flags: 0x200000000000000(node=0|zone=2)
[   12.287449] page_type: f5(slab)
[   12.287749] raw: 0200000000000000 ffff88810103c500 dead000000000122 0000000000000000
[   12.288101] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   12.288749] page dumped because: kasan: bad access detected
[   12.288989] 
[   12.289110] Memory state around the buggy address:
[   12.289630]  ffff888102b46f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.290063]  ffff888102b46f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.290728] >ffff888102b47000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.291051]                    ^
[   12.291403]  ffff888102b47080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   12.291881]  ffff888102b47100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.292352] ==================================================================

[   22.330527] ==================================================================
[   22.331649] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468
[   22.332348] Read of size 1 at addr ffff00000e9c4000 by task kunit_try_catch/267
[   22.333037] 
[   22.333209] CPU: 2 UID: 0 PID: 267 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   22.333268] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.333287] Hardware name: Radxa ROCK Pi 4B (DT)
[   22.333307] Call trace:
[   22.333321]  show_stack+0x20/0x38 (C)
[   22.333362]  dump_stack_lvl+0x8c/0xd0
[   22.333400]  print_report+0x118/0x608
[   22.333437]  kasan_report+0xdc/0x128
[   22.333473]  __asan_report_load1_noabort+0x20/0x30
[   22.333514]  kmem_cache_rcu_uaf+0x388/0x468
[   22.333557]  kunit_try_run_case+0x170/0x3f0
[   22.333601]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.333649]  kthread+0x328/0x630
[   22.333691]  ret_from_fork+0x10/0x20
[   22.333732] 
[   22.339354] Allocated by task 267:
[   22.339690]  kasan_save_stack+0x3c/0x68
[   22.340073]  kasan_save_track+0x20/0x40
[   22.340455]  kasan_save_alloc_info+0x40/0x58
[   22.340879]  __kasan_slab_alloc+0xa8/0xb0
[   22.341276]  kmem_cache_alloc_noprof+0x10c/0x3a0
[   22.341729]  kmem_cache_rcu_uaf+0x12c/0x468
[   22.342148]  kunit_try_run_case+0x170/0x3f0
[   22.342569]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.343105]  kthread+0x328/0x630
[   22.343438]  ret_from_fork+0x10/0x20
[   22.343799] 
[   22.343958] Freed by task 0:
[   22.344245]  kasan_save_stack+0x3c/0x68
[   22.344627]  kasan_save_track+0x20/0x40
[   22.345009]  kasan_save_free_info+0x4c/0x78
[   22.345422]  __kasan_slab_free+0x6c/0x98
[   22.345811]  slab_free_after_rcu_debug+0xd4/0x2f8
[   22.346269]  rcu_core+0x9f4/0x1e20
[   22.346614]  rcu_core_si+0x18/0x30
[   22.346957]  handle_softirqs+0x374/0xb28
[   22.347348]  __do_softirq+0x1c/0x28
[   22.347697] 
[   22.347856] Last potentially related work creation:
[   22.348315]  kasan_save_stack+0x3c/0x68
[   22.348698]  kasan_record_aux_stack+0xb4/0xc8
[   22.349129]  kmem_cache_free+0x120/0x470
[   22.349517]  kmem_cache_rcu_uaf+0x16c/0x468
[   22.349937]  kunit_try_run_case+0x170/0x3f0
[   22.350354]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.350891]  kthread+0x328/0x630
[   22.351225]  ret_from_fork+0x10/0x20
[   22.351585] 
[   22.351744] The buggy address belongs to the object at ffff00000e9c4000
[   22.351744]  which belongs to the cache test_cache of size 200
[   22.352882] The buggy address is located 0 bytes inside of
[   22.352882]  freed 200-byte region [ffff00000e9c4000, ffff00000e9c40c8)
[   22.353992] 
[   22.354154] The buggy address belongs to the physical page:
[   22.354678] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0xe9c4
[   22.355413] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   22.356130] flags: 0x3fffe0000000040(head|node=0|zone=0|lastcpupid=0x1ffff)
[   22.356794] page_type: f5(slab)
[   22.357116] raw: 03fffe0000000040 ffff00000e9c2000 dead000000000122 0000000000000000
[   22.357843] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   22.358571] head: 03fffe0000000040 ffff00000e9c2000 dead000000000122 0000000000000000
[   22.359304] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   22.360038] head: 03fffe0000000001 fffffdffc03a7101 00000000ffffffff 00000000ffffffff
[   22.360773] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   22.361496] page dumped because: kasan: bad access detected
[   22.362017] 
[   22.362176] Memory state around the buggy address:
[   22.362632]  ffff00000e9c3f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.363308]  ffff00000e9c3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.363983] >ffff00000e9c4000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   22.364654]                    ^
[   22.364973]  ffff00000e9c4080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   22.365649]  ffff00000e9c4100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.366320] ==================================================================