Hay
Date
July 15, 2025, 11:35 a.m.

Environment
e850-96
qemu-arm64
qemu-x86_64

[   51.436853] ==================================================================
[   51.437046] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468
[   51.437175] Read of size 1 at addr ffff000801b9e000 by task kunit_try_catch/294
[   51.440560] 
[   51.442047] CPU: 6 UID: 0 PID: 294 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250715 #1 PREEMPT 
[   51.442112] Tainted: [B]=BAD_PAGE, [N]=TEST
[   51.442128] Hardware name: WinLink E850-96 board (DT)
[   51.442149] Call trace:
[   51.442163]  show_stack+0x20/0x38 (C)
[   51.442197]  dump_stack_lvl+0x8c/0xd0
[   51.442237]  print_report+0x118/0x5d0
[   51.442266]  kasan_report+0xdc/0x128
[   51.442295]  __asan_report_load1_noabort+0x20/0x30
[   51.442329]  kmem_cache_rcu_uaf+0x388/0x468
[   51.442360]  kunit_try_run_case+0x170/0x3f0
[   51.442393]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.442429]  kthread+0x328/0x630
[   51.442458]  ret_from_fork+0x10/0x20
[   51.442493] 
[   51.506099] Allocated by task 294:
[   51.509488]  kasan_save_stack+0x3c/0x68
[   51.513302]  kasan_save_track+0x20/0x40
[   51.517123]  kasan_save_alloc_info+0x40/0x58
[   51.521375]  __kasan_slab_alloc+0xa8/0xb0
[   51.525368]  kmem_cache_alloc_noprof+0x10c/0x398
[   51.529968]  kmem_cache_rcu_uaf+0x12c/0x468
[   51.534135]  kunit_try_run_case+0x170/0x3f0
[   51.538302]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.543772]  kthread+0x328/0x630
[   51.546982]  ret_from_fork+0x10/0x20
[   51.550541] 
[   51.552018] Freed by task 0:
[   51.554885]  kasan_save_stack+0x3c/0x68
[   51.558700]  kasan_save_track+0x20/0x40
[   51.562520]  kasan_save_free_info+0x4c/0x78
[   51.566687]  __kasan_slab_free+0x6c/0x98
[   51.570593]  slab_free_after_rcu_debug+0xd4/0x2f8
[   51.575280]  rcu_core+0x9f4/0x1e20
[   51.578666]  rcu_core_si+0x18/0x30
[   51.582051]  handle_softirqs+0x374/0xb28
[   51.585957]  __do_softirq+0x1c/0x28
[   51.589429] 
[   51.590906] Last potentially related work creation:
[   51.595768]  kasan_save_stack+0x3c/0x68
[   51.599585]  kasan_record_aux_stack+0xb4/0xc8
[   51.603927]  kmem_cache_free+0x120/0x468
[   51.607833]  kmem_cache_rcu_uaf+0x16c/0x468
[   51.611999]  kunit_try_run_case+0x170/0x3f0
[   51.616165]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.621634]  kthread+0x328/0x630
[   51.624846]  ret_from_fork+0x10/0x20
[   51.628404] 
[   51.629881] The buggy address belongs to the object at ffff000801b9e000
[   51.629881]  which belongs to the cache test_cache of size 200
[   51.642297] The buggy address is located 0 bytes inside of
[   51.642297]  freed 200-byte region [ffff000801b9e000, ffff000801b9e0c8)
[   51.654359] 
[   51.655839] The buggy address belongs to the physical page:
[   51.661395] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x881b9e
[   51.669378] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   51.677018] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   51.683961] page_type: f5(slab)
[   51.687097] raw: 0bfffe0000000040 ffff000801b9c000 dead000000000122 0000000000000000
[   51.694818] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   51.702546] head: 0bfffe0000000040 ffff000801b9c000 dead000000000122 0000000000000000
[   51.710354] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   51.718167] head: 0bfffe0000000001 fffffdffe006e781 00000000ffffffff 00000000ffffffff
[   51.725979] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   51.733786] page dumped because: kasan: bad access detected
[   51.739342] 
[   51.740816] Memory state around the buggy address:
[   51.745596]  ffff000801b9df00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   51.752800]  ffff000801b9df80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   51.760005] >ffff000801b9e000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   51.767205]                    ^
[   51.770420]  ffff000801b9e080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   51.777625]  ffff000801b9e100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   51.784827] ==================================================================

[   31.858749] ==================================================================
[   31.858847] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468
[   31.858932] Read of size 1 at addr fff00000c6525000 by task kunit_try_catch/245
[   31.858982] 
[   31.859027] CPU: 0 UID: 0 PID: 245 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250715 #1 PREEMPT 
[   31.859121] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.859149] Hardware name: linux,dummy-virt (DT)
[   31.859181] Call trace:
[   31.859207]  show_stack+0x20/0x38 (C)
[   31.859262]  dump_stack_lvl+0x8c/0xd0
[   31.859315]  print_report+0x118/0x5d0
[   31.859359]  kasan_report+0xdc/0x128
[   31.859403]  __asan_report_load1_noabort+0x20/0x30
[   31.859470]  kmem_cache_rcu_uaf+0x388/0x468
[   31.859522]  kunit_try_run_case+0x170/0x3f0
[   31.859574]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.859661]  kthread+0x328/0x630
[   31.859712]  ret_from_fork+0x10/0x20
[   31.859978] 
[   31.859999] Allocated by task 245:
[   31.860030]  kasan_save_stack+0x3c/0x68
[   31.860077]  kasan_save_track+0x20/0x40
[   31.860116]  kasan_save_alloc_info+0x40/0x58
[   31.860155]  __kasan_slab_alloc+0xa8/0xb0
[   31.860191]  kmem_cache_alloc_noprof+0x10c/0x398
[   31.860261]  kmem_cache_rcu_uaf+0x12c/0x468
[   31.860302]  kunit_try_run_case+0x170/0x3f0
[   31.860340]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.860390]  kthread+0x328/0x630
[   31.860432]  ret_from_fork+0x10/0x20
[   31.860489] 
[   31.860508] Freed by task 0:
[   31.860534]  kasan_save_stack+0x3c/0x68
[   31.860581]  kasan_save_track+0x20/0x40
[   31.860618]  kasan_save_free_info+0x4c/0x78
[   31.860656]  __kasan_slab_free+0x6c/0x98
[   31.860694]  slab_free_after_rcu_debug+0xd4/0x2f8
[   31.860744]  rcu_core+0x9f4/0x1e20
[   31.860782]  rcu_core_si+0x18/0x30
[   31.860815]  handle_softirqs+0x374/0xb28
[   31.860853]  __do_softirq+0x1c/0x28
[   31.860886] 
[   31.860905] Last potentially related work creation:
[   31.860962]  kasan_save_stack+0x3c/0x68
[   31.861012]  kasan_record_aux_stack+0xb4/0xc8
[   31.861170]  kmem_cache_free+0x120/0x468
[   31.861207]  kmem_cache_rcu_uaf+0x16c/0x468
[   31.861253]  kunit_try_run_case+0x170/0x3f0
[   31.861430]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   31.861690]  kthread+0x328/0x630
[   31.861739]  ret_from_fork+0x10/0x20
[   31.861776] 
[   31.861796] The buggy address belongs to the object at fff00000c6525000
[   31.861796]  which belongs to the cache test_cache of size 200
[   31.861855] The buggy address is located 0 bytes inside of
[   31.861855]  freed 200-byte region [fff00000c6525000, fff00000c65250c8)
[   31.861917] 
[   31.861938] The buggy address belongs to the physical page:
[   31.861971] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106525
[   31.862029] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   31.862081] page_type: f5(slab)
[   31.862124] raw: 0bfffe0000000000 fff00000c5c5cb40 dead000000000122 0000000000000000
[   31.862173] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   31.862214] page dumped because: kasan: bad access detected
[   31.862244] 
[   31.862262] Memory state around the buggy address:
[   31.862295]  fff00000c6524f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.862339]  fff00000c6524f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   31.862382] >fff00000c6525000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   31.862417]                    ^
[   31.862457]  fff00000c6525080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   31.862601]  fff00000c6525100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   31.862708] ==================================================================

[   24.836913] ==================================================================
[   24.837455] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510
[   24.838037] Read of size 1 at addr ffff8881060a6000 by task kunit_try_catch/261
[   24.838650] 
[   24.838913] CPU: 1 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6-next-20250715 #1 PREEMPT(voluntary) 
[   24.838983] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.838996] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.839129] Call Trace:
[   24.839147]  <TASK>
[   24.839168]  dump_stack_lvl+0x73/0xb0
[   24.839202]  print_report+0xd1/0x610
[   24.839227]  ? __virt_addr_valid+0x1db/0x2d0
[   24.839254]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   24.839277]  ? kasan_complete_mode_report_info+0x64/0x200
[   24.839303]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   24.839326]  kasan_report+0x141/0x180
[   24.839348]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   24.839376]  __asan_report_load1_noabort+0x18/0x20
[   24.839401]  kmem_cache_rcu_uaf+0x3e3/0x510
[   24.839424]  ? __pfx_kmem_cache_rcu_uaf+0x10/0x10
[   24.839446]  ? finish_task_switch.isra.0+0x153/0x700
[   24.839468]  ? __switch_to+0x47/0xf80
[   24.839498]  ? __pfx_read_tsc+0x10/0x10
[   24.839534]  ? ktime_get_ts64+0x86/0x230
[   24.839561]  kunit_try_run_case+0x1a5/0x480
[   24.839749]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.839773]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.839797]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.839819]  ? __kthread_parkme+0x82/0x180
[   24.839841]  ? preempt_count_sub+0x50/0x80
[   24.839865]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.839888]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.839914]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.839940]  kthread+0x337/0x6f0
[   24.839960]  ? trace_preempt_on+0x20/0xc0
[   24.839985]  ? __pfx_kthread+0x10/0x10
[   24.840006]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.840031]  ? calculate_sigpending+0x7b/0xa0
[   24.840055]  ? __pfx_kthread+0x10/0x10
[   24.840076]  ret_from_fork+0x116/0x1d0
[   24.840096]  ? __pfx_kthread+0x10/0x10
[   24.840117]  ret_from_fork_asm+0x1a/0x30
[   24.840149]  </TASK>
[   24.840161] 
[   24.850920] Allocated by task 261:
[   24.851090]  kasan_save_stack+0x45/0x70
[   24.851345]  kasan_save_track+0x18/0x40
[   24.851558]  kasan_save_alloc_info+0x3b/0x50
[   24.851779]  __kasan_slab_alloc+0x91/0xa0
[   24.852315]  kmem_cache_alloc_noprof+0x123/0x3f0
[   24.852619]  kmem_cache_rcu_uaf+0x155/0x510
[   24.853013]  kunit_try_run_case+0x1a5/0x480
[   24.853207]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.853765]  kthread+0x337/0x6f0
[   24.854402]  ret_from_fork+0x116/0x1d0
[   24.854956]  ret_from_fork_asm+0x1a/0x30
[   24.855441] 
[   24.855571] Freed by task 0:
[   24.856038]  kasan_save_stack+0x45/0x70
[   24.856328]  kasan_save_track+0x18/0x40
[   24.856502]  kasan_save_free_info+0x3f/0x60
[   24.856990]  __kasan_slab_free+0x56/0x70
[   24.857283]  slab_free_after_rcu_debug+0xe4/0x310
[   24.857593]  rcu_core+0x66f/0x1c40
[   24.857724]  rcu_core_si+0x12/0x20
[   24.857840]  handle_softirqs+0x209/0x730
[   24.857971]  __irq_exit_rcu+0xc9/0x110
[   24.858451]  irq_exit_rcu+0x12/0x20
[   24.858830]  sysvec_apic_timer_interrupt+0x81/0x90
[   24.859054]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   24.859247] 
[   24.859312] Last potentially related work creation:
[   24.859456]  kasan_save_stack+0x45/0x70
[   24.859598]  kasan_record_aux_stack+0xb2/0xc0
[   24.859739]  kmem_cache_free+0x131/0x420
[   24.859868]  kmem_cache_rcu_uaf+0x194/0x510
[   24.860003]  kunit_try_run_case+0x1a5/0x480
[   24.860137]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.860301]  kthread+0x337/0x6f0
[   24.860410]  ret_from_fork+0x116/0x1d0
[   24.861643]  ret_from_fork_asm+0x1a/0x30
[   24.862404] 
[   24.862491] The buggy address belongs to the object at ffff8881060a6000
[   24.862491]  which belongs to the cache test_cache of size 200
[   24.864083] The buggy address is located 0 bytes inside of
[   24.864083]  freed 200-byte region [ffff8881060a6000, ffff8881060a60c8)
[   24.864439] 
[   24.864507] The buggy address belongs to the physical page:
[   24.865428] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1060a6
[   24.866455] flags: 0x200000000000000(node=0|zone=2)
[   24.867256] page_type: f5(slab)
[   24.867632] raw: 0200000000000000 ffff888101e20280 dead000000000122 0000000000000000
[   24.867867] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   24.868825] page dumped because: kasan: bad access detected
[   24.869221] 
[   24.869288] Memory state around the buggy address:
[   24.869441]  ffff8881060a5f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.869999]  ffff8881060a5f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.870715] >ffff8881060a6000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   24.870925]                    ^
[   24.871037]  ffff8881060a6080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   24.871242]  ffff8881060a6100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.871448] ==================================================================