Hay
Date
June 26, 2025, 11:12 a.m.

Environment
e850-96
qemu-arm64
qemu-x86_64

[   34.385122] ==================================================================
[   34.385308] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468
[   34.385443] Read of size 1 at addr ffff000802d0c000 by task kunit_try_catch/262
[   34.388824] 
[   34.390313] CPU: 0 UID: 0 PID: 262 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc3 #1 PREEMPT 
[   34.390370] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.390386] Hardware name: WinLink E850-96 board (DT)
[   34.390410] Call trace:
[   34.390428]  show_stack+0x20/0x38 (C)
[   34.390464]  dump_stack_lvl+0x8c/0xd0
[   34.390504]  print_report+0x118/0x608
[   34.390538]  kasan_report+0xdc/0x128
[   34.390570]  __asan_report_load1_noabort+0x20/0x30
[   34.390608]  kmem_cache_rcu_uaf+0x388/0x468
[   34.390644]  kunit_try_run_case+0x170/0x3f0
[   34.390682]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.390723]  kthread+0x328/0x630
[   34.390757]  ret_from_fork+0x10/0x20
[   34.390794] 
[   34.453148] Allocated by task 262:
[   34.456535]  kasan_save_stack+0x3c/0x68
[   34.460351]  kasan_save_track+0x20/0x40
[   34.464171]  kasan_save_alloc_info+0x40/0x58
[   34.468424]  __kasan_slab_alloc+0xa8/0xb0
[   34.472417]  kmem_cache_alloc_noprof+0x10c/0x398
[   34.477018]  kmem_cache_rcu_uaf+0x12c/0x468
[   34.481184]  kunit_try_run_case+0x170/0x3f0
[   34.485351]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.490821]  kthread+0x328/0x630
[   34.494031]  ret_from_fork+0x10/0x20
[   34.497590] 
[   34.499067] Freed by task 0:
[   34.501933]  kasan_save_stack+0x3c/0x68
[   34.505750]  kasan_save_track+0x20/0x40
[   34.509569]  kasan_save_free_info+0x4c/0x78
[   34.513736]  __kasan_slab_free+0x6c/0x98
[   34.517642]  slab_free_after_rcu_debug+0xd4/0x2f8
[   34.522329]  rcu_core+0x9f4/0x1e20
[   34.525715]  rcu_core_si+0x18/0x30
[   34.529100]  handle_softirqs+0x374/0xb28
[   34.533006]  __do_softirq+0x1c/0x28
[   34.536479] 
[   34.537954] Last potentially related work creation:
[   34.542817]  kasan_save_stack+0x3c/0x68
[   34.546634]  kasan_record_aux_stack+0xb4/0xc8
[   34.550976]  kmem_cache_free+0x120/0x468
[   34.554881]  kmem_cache_rcu_uaf+0x16c/0x468
[   34.559048]  kunit_try_run_case+0x170/0x3f0
[   34.563214]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.568683]  kthread+0x328/0x630
[   34.571894]  ret_from_fork+0x10/0x20
[   34.575454] 
[   34.576928] The buggy address belongs to the object at ffff000802d0c000
[   34.576928]  which belongs to the cache test_cache of size 200
[   34.589345] The buggy address is located 0 bytes inside of
[   34.589345]  freed 200-byte region [ffff000802d0c000, ffff000802d0c0c8)
[   34.601408] 
[   34.602887] The buggy address belongs to the physical page:
[   34.608444] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x882d0c
[   34.616428] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   34.624066] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   34.631010] page_type: f5(slab)
[   34.634148] raw: 0bfffe0000000040 ffff00080177ba40 dead000000000122 0000000000000000
[   34.641866] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   34.649592] head: 0bfffe0000000040 ffff00080177ba40 dead000000000122 0000000000000000
[   34.657404] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   34.665217] head: 0bfffe0000000001 fffffdffe00b4301 00000000ffffffff 00000000ffffffff
[   34.673028] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   34.680834] page dumped because: kasan: bad access detected
[   34.686391] 
[   34.687865] Memory state around the buggy address:
[   34.692647]  ffff000802d0bf00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.699848]  ffff000802d0bf80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   34.707053] >ffff000802d0c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   34.714254]                    ^
[   34.717469]  ffff000802d0c080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   34.724674]  ffff000802d0c100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.731876] ==================================================================

[   19.268438] ==================================================================
[   19.268550] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x388/0x468
[   19.268627] Read of size 1 at addr fff00000c7a50000 by task kunit_try_catch/215
[   19.268680] 
[   19.268720] CPU: 0 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc3 #1 PREEMPT 
[   19.268811] Tainted: [B]=BAD_PAGE, [N]=TEST
[   19.268839] Hardware name: linux,dummy-virt (DT)
[   19.268908] Call trace:
[   19.268935]  show_stack+0x20/0x38 (C)
[   19.268985]  dump_stack_lvl+0x8c/0xd0
[   19.269037]  print_report+0x118/0x608
[   19.269081]  kasan_report+0xdc/0x128
[   19.269126]  __asan_report_load1_noabort+0x20/0x30
[   19.269176]  kmem_cache_rcu_uaf+0x388/0x468
[   19.269224]  kunit_try_run_case+0x170/0x3f0
[   19.269275]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.269330]  kthread+0x328/0x630
[   19.269380]  ret_from_fork+0x10/0x20
[   19.269432] 
[   19.269450] Allocated by task 215:
[   19.269478]  kasan_save_stack+0x3c/0x68
[   19.269520]  kasan_save_track+0x20/0x40
[   19.269557]  kasan_save_alloc_info+0x40/0x58
[   19.269596]  __kasan_slab_alloc+0xa8/0xb0
[   19.269633]  kmem_cache_alloc_noprof+0x10c/0x398
[   19.269674]  kmem_cache_rcu_uaf+0x12c/0x468
[   19.269715]  kunit_try_run_case+0x170/0x3f0
[   19.269755]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.269801]  kthread+0x328/0x630
[   19.269836]  ret_from_fork+0x10/0x20
[   19.269883] 
[   19.269903] Freed by task 0:
[   19.269930]  kasan_save_stack+0x3c/0x68
[   19.269967]  kasan_save_track+0x20/0x40
[   19.270003]  kasan_save_free_info+0x4c/0x78
[   19.270041]  __kasan_slab_free+0x6c/0x98
[   19.270077]  slab_free_after_rcu_debug+0xd4/0x2f8
[   19.270116]  rcu_core+0x9f4/0x1e20
[   19.270151]  rcu_core_si+0x18/0x30
[   19.270185]  handle_softirqs+0x374/0xb28
[   19.270222]  __do_softirq+0x1c/0x28
[   19.270255] 
[   19.270275] Last potentially related work creation:
[   19.270300]  kasan_save_stack+0x3c/0x68
[   19.270336]  kasan_record_aux_stack+0xb4/0xc8
[   19.270374]  kmem_cache_free+0x120/0x468
[   19.270410]  kmem_cache_rcu_uaf+0x16c/0x468
[   19.270451]  kunit_try_run_case+0x170/0x3f0
[   19.270488]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.270533]  kthread+0x328/0x630
[   19.270567]  ret_from_fork+0x10/0x20
[   19.270603] 
[   19.270621] The buggy address belongs to the object at fff00000c7a50000
[   19.270621]  which belongs to the cache test_cache of size 200
[   19.270681] The buggy address is located 0 bytes inside of
[   19.270681]  freed 200-byte region [fff00000c7a50000, fff00000c7a500c8)
[   19.270743] 
[   19.270763] The buggy address belongs to the physical page:
[   19.270797] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107a50
[   19.270864] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.270918] page_type: f5(slab)
[   19.270964] raw: 0bfffe0000000000 fff00000c59d6780 dead000000000122 0000000000000000
[   19.271020] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   19.271065] page dumped because: kasan: bad access detected
[   19.271101] 
[   19.271118] Memory state around the buggy address:
[   19.271158]  fff00000c7a4ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.271204]  fff00000c7a4ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.271251] >fff00000c7a50000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   19.271294]                    ^
[   19.271322]  fff00000c7a50080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   19.271367]  fff00000c7a50100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.271409] ==================================================================

[   11.729092] ==================================================================
[   11.729612] BUG: KASAN: slab-use-after-free in kmem_cache_rcu_uaf+0x3e3/0x510
[   11.730376] Read of size 1 at addr ffff888102f74000 by task kunit_try_catch/232
[   11.731155] 
[   11.731436] CPU: 1 UID: 0 PID: 232 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc3 #1 PREEMPT(voluntary) 
[   11.731498] Tainted: [B]=BAD_PAGE, [N]=TEST
[   11.731512] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   11.731536] Call Trace:
[   11.731551]  <TASK>
[   11.731587]  dump_stack_lvl+0x73/0xb0
[   11.731621]  print_report+0xd1/0x650
[   11.731647]  ? __virt_addr_valid+0x1db/0x2d0
[   11.731671]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   11.731691]  ? kasan_complete_mode_report_info+0x64/0x200
[   11.731904]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   11.731952]  kasan_report+0x141/0x180
[   11.731978]  ? kmem_cache_rcu_uaf+0x3e3/0x510
[   11.732003]  __asan_report_load1_noabort+0x18/0x20
[   11.732025]  kmem_cache_rcu_uaf+0x3e3/0x510
[   11.732045]  ? __pfx_kmem_cache_rcu_uaf+0x10/0x10
[   11.732064]  ? finish_task_switch.isra.0+0x153/0x700
[   11.732089]  ? __switch_to+0x5d9/0xf60
[   11.732110]  ? dequeue_task_fair+0x166/0x4e0
[   11.732137]  ? __pfx_read_tsc+0x10/0x10
[   11.732157]  ? ktime_get_ts64+0x86/0x230
[   11.732184]  kunit_try_run_case+0x1a5/0x480
[   11.732210]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.732232]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   11.732263]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   11.732286]  ? __kthread_parkme+0x82/0x180
[   11.732309]  ? preempt_count_sub+0x50/0x80
[   11.732333]  ? __pfx_kunit_try_run_case+0x10/0x10
[   11.732356]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.732379]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   11.732401]  kthread+0x337/0x6f0
[   11.732418]  ? trace_preempt_on+0x20/0xc0
[   11.732442]  ? __pfx_kthread+0x10/0x10
[   11.732460]  ? _raw_spin_unlock_irq+0x47/0x80
[   11.732482]  ? calculate_sigpending+0x7b/0xa0
[   11.732503]  ? __pfx_kthread+0x10/0x10
[   11.732521]  ret_from_fork+0x41/0x80
[   11.732542]  ? __pfx_kthread+0x10/0x10
[   11.732569]  ret_from_fork_asm+0x1a/0x30
[   11.732602]  </TASK>
[   11.732613] 
[   11.743278] Allocated by task 232:
[   11.743995]  kasan_save_stack+0x45/0x70
[   11.744206]  kasan_save_track+0x18/0x40
[   11.744521]  kasan_save_alloc_info+0x3b/0x50
[   11.744914]  __kasan_slab_alloc+0x91/0xa0
[   11.745218]  kmem_cache_alloc_noprof+0x123/0x3f0
[   11.745509]  kmem_cache_rcu_uaf+0x155/0x510
[   11.745688]  kunit_try_run_case+0x1a5/0x480
[   11.745964]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.746208]  kthread+0x337/0x6f0
[   11.746364]  ret_from_fork+0x41/0x80
[   11.746522]  ret_from_fork_asm+0x1a/0x30
[   11.747119] 
[   11.747201] Freed by task 0:
[   11.747498]  kasan_save_stack+0x45/0x70
[   11.748055]  kasan_save_track+0x18/0x40
[   11.748245]  kasan_save_free_info+0x3f/0x60
[   11.748544]  __kasan_slab_free+0x56/0x70
[   11.748722]  slab_free_after_rcu_debug+0xe4/0x310
[   11.749116]  rcu_core+0x66c/0x1c30
[   11.749302]  rcu_core_si+0x12/0x20
[   11.749426]  handle_softirqs+0x209/0x730
[   11.749959]  __irq_exit_rcu+0xc9/0x110
[   11.750150]  irq_exit_rcu+0x12/0x20
[   11.750282]  sysvec_apic_timer_interrupt+0x81/0x90
[   11.750654]  asm_sysvec_apic_timer_interrupt+0x1f/0x30
[   11.751092] 
[   11.751364] Last potentially related work creation:
[   11.751585]  kasan_save_stack+0x45/0x70
[   11.752116]  kasan_record_aux_stack+0xb2/0xc0
[   11.752324]  kmem_cache_free+0x131/0x420
[   11.752511]  kmem_cache_rcu_uaf+0x194/0x510
[   11.752909]  kunit_try_run_case+0x1a5/0x480
[   11.753280]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   11.753694]  kthread+0x337/0x6f0
[   11.754049]  ret_from_fork+0x41/0x80
[   11.754205]  ret_from_fork_asm+0x1a/0x30
[   11.754534] 
[   11.754661] The buggy address belongs to the object at ffff888102f74000
[   11.754661]  which belongs to the cache test_cache of size 200
[   11.755359] The buggy address is located 0 bytes inside of
[   11.755359]  freed 200-byte region [ffff888102f74000, ffff888102f740c8)
[   11.756413] 
[   11.756518] The buggy address belongs to the physical page:
[   11.756700] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102f74
[   11.757131] flags: 0x200000000000000(node=0|zone=2)
[   11.757355] page_type: f5(slab)
[   11.757527] raw: 0200000000000000 ffff88810128f3c0 dead000000000122 0000000000000000
[   11.758319] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   11.758896] page dumped because: kasan: bad access detected
[   11.759251] 
[   11.759359] Memory state around the buggy address:
[   11.759830]  ffff888102f73f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.760458]  ffff888102f73f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.761029] >ffff888102f74000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   11.761353]                    ^
[   11.761511]  ffff888102f74080: fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc
[   11.762099]  ffff888102f74100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   11.762513] ==================================================================