Hay
Date
June 2, 2025, 2:11 p.m.

Environment
e850-96
qemu-arm64
qemu-x86_64

[   27.007228] ==================================================================
[   27.017346] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338
[   27.023851] Read of size 1 at addr ffff0008037171c8 by task kunit_try_catch/231
[   27.031143] 
[   27.032630] CPU: 4 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G    B            N  6.15.1-rc1 #1 PREEMPT 
[   27.032684] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.032699] Hardware name: WinLink E850-96 board (DT)
[   27.032726] Call trace:
[   27.032737]  show_stack+0x20/0x38 (C)
[   27.032771]  dump_stack_lvl+0x8c/0xd0
[   27.032803]  print_report+0x118/0x608
[   27.032833]  kasan_report+0xdc/0x128
[   27.032862]  __asan_report_load1_noabort+0x20/0x30
[   27.032896]  kmalloc_uaf+0x300/0x338
[   27.032927]  kunit_try_run_case+0x170/0x3f0
[   27.032965]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.033006]  kthread+0x328/0x630
[   27.033038]  ret_from_fork+0x10/0x20
[   27.033072] 
[   27.094858] Allocated by task 231:
[   27.098245]  kasan_save_stack+0x3c/0x68
[   27.102062]  kasan_save_track+0x20/0x40
[   27.105881]  kasan_save_alloc_info+0x40/0x58
[   27.110135]  __kasan_kmalloc+0xd4/0xd8
[   27.113867]  __kmalloc_cache_noprof+0x16c/0x3c0
[   27.118381]  kmalloc_uaf+0xb8/0x338
[   27.121854]  kunit_try_run_case+0x170/0x3f0
[   27.126020]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.131488]  kthread+0x328/0x630
[   27.134699]  ret_from_fork+0x10/0x20
[   27.138259] 
[   27.139736] Freed by task 231:
[   27.142774]  kasan_save_stack+0x3c/0x68
[   27.146591]  kasan_save_track+0x20/0x40
[   27.150412]  kasan_save_free_info+0x4c/0x78
[   27.154578]  __kasan_slab_free+0x6c/0x98
[   27.158484]  kfree+0x214/0x3c8
[   27.161523]  kmalloc_uaf+0x11c/0x338
[   27.165081]  kunit_try_run_case+0x170/0x3f0
[   27.169248]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.174717]  kthread+0x328/0x630
[   27.177929]  ret_from_fork+0x10/0x20
[   27.181488] 
[   27.182965] The buggy address belongs to the object at ffff0008037171c0
[   27.182965]  which belongs to the cache kmalloc-16 of size 16
[   27.195291] The buggy address is located 8 bytes inside of
[   27.195291]  freed 16-byte region [ffff0008037171c0, ffff0008037171d0)
[   27.207268] 
[   27.208748] The buggy address belongs to the physical page:
[   27.214304] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x883717
[   27.222289] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.228798] page_type: f5(slab)
[   27.231936] raw: 0bfffe0000000000 ffff000800002640 dead000000000122 0000000000000000
[   27.239653] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   27.247372] page dumped because: kasan: bad access detected
[   27.252927] 
[   27.254403] Memory state around the buggy address:
[   27.259182]  ffff000803717080: 00 05 fc fc 00 05 fc fc 00 00 fc fc 00 05 fc fc
[   27.266386]  ffff000803717100: 00 05 fc fc 00 05 fc fc 00 05 fc fc 00 04 fc fc
[   27.273590] >ffff000803717180: 00 04 fc fc 00 04 fc fc fa fb fc fc fc fc fc fc
[   27.280792]                                               ^
[   27.286352]  ffff000803717200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.293555]  ffff000803717280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.300758] ==================================================================

[   19.134850] ==================================================================
[   19.134942] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338
[   19.135019] Read of size 1 at addr fff00000c5915968 by task kunit_try_catch/187
[   19.135070] 
[   19.135283] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G    B   W        N  6.15.1-rc1 #1 PREEMPT 
[   19.135409] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   19.135450] Hardware name: linux,dummy-virt (DT)
[   19.135488] Call trace:
[   19.135512]  show_stack+0x20/0x38 (C)
[   19.135566]  dump_stack_lvl+0x8c/0xd0
[   19.135613]  print_report+0x118/0x608
[   19.135659]  kasan_report+0xdc/0x128
[   19.135706]  __asan_report_load1_noabort+0x20/0x30
[   19.135758]  kmalloc_uaf+0x300/0x338
[   19.135802]  kunit_try_run_case+0x170/0x3f0
[   19.135852]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.135915]  kthread+0x328/0x630
[   19.135962]  ret_from_fork+0x10/0x20
[   19.136010] 
[   19.136029] Allocated by task 187:
[   19.136056]  kasan_save_stack+0x3c/0x68
[   19.136097]  kasan_save_track+0x20/0x40
[   19.136134]  kasan_save_alloc_info+0x40/0x58
[   19.136173]  __kasan_kmalloc+0xd4/0xd8
[   19.136210]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.136252]  kmalloc_uaf+0xb8/0x338
[   19.136289]  kunit_try_run_case+0x170/0x3f0
[   19.136329]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.136769]  kthread+0x328/0x630
[   19.136825]  ret_from_fork+0x10/0x20
[   19.136883] 
[   19.136948] Freed by task 187:
[   19.136996]  kasan_save_stack+0x3c/0x68
[   19.137037]  kasan_save_track+0x20/0x40
[   19.137097]  kasan_save_free_info+0x4c/0x78
[   19.137266]  __kasan_slab_free+0x6c/0x98
[   19.137398]  kfree+0x214/0x3c8
[   19.137447]  kmalloc_uaf+0x11c/0x338
[   19.137574]  kunit_try_run_case+0x170/0x3f0
[   19.137629]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.137674]  kthread+0x328/0x630
[   19.137735]  ret_from_fork+0x10/0x20
[   19.137990] 
[   19.138048] The buggy address belongs to the object at fff00000c5915960
[   19.138048]  which belongs to the cache kmalloc-16 of size 16
[   19.138163] The buggy address is located 8 bytes inside of
[   19.138163]  freed 16-byte region [fff00000c5915960, fff00000c5915970)
[   19.138251] 
[   19.138499] The buggy address belongs to the physical page:
[   19.138562] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105915
[   19.138641] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.138751] page_type: f5(slab)
[   19.138814] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000
[   19.138930] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   19.138975] page dumped because: kasan: bad access detected
[   19.139013] 
[   19.139064] Memory state around the buggy address:
[   19.139310]  fff00000c5915800: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   19.139426]  fff00000c5915880: fa fb fc fc 00 04 fc fc fa fb fc fc fa fb fc fc
[   19.139505] >fff00000c5915900: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   19.139779]                                                           ^
[   19.139885]  fff00000c5915980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.139951]  fff00000c5915a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.140065] ==================================================================

[   16.851584] ==================================================================
[   16.852816] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380
[   16.853475] Read of size 1 at addr ffff888101d9a408 by task kunit_try_catch/205
[   16.853823] 
[   16.854097] CPU: 1 UID: 0 PID: 205 Comm: kunit_try_catch Tainted: G    B            N  6.15.1-rc1 #1 PREEMPT(voluntary) 
[   16.854230] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.854254] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.854292] Call Trace:
[   16.854318]  <TASK>
[   16.854353]  dump_stack_lvl+0x73/0xb0
[   16.854420]  print_report+0xd1/0x650
[   16.854470]  ? __virt_addr_valid+0x1db/0x2d0
[   16.854509]  ? kmalloc_uaf+0x320/0x380
[   16.854541]  ? kasan_complete_mode_report_info+0x64/0x200
[   16.854583]  ? kmalloc_uaf+0x320/0x380
[   16.854625]  kasan_report+0x141/0x180
[   16.854673]  ? kmalloc_uaf+0x320/0x380
[   16.854719]  __asan_report_load1_noabort+0x18/0x20
[   16.854770]  kmalloc_uaf+0x320/0x380
[   16.854806]  ? __pfx_kmalloc_uaf+0x10/0x10
[   16.854843]  ? __schedule+0x10cc/0x2b30
[   16.854881]  ? __pfx_read_tsc+0x10/0x10
[   16.854923]  ? ktime_get_ts64+0x86/0x230
[   16.854976]  kunit_try_run_case+0x1a5/0x480
[   16.855023]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.855068]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.855146]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.855217]  ? __kthread_parkme+0x82/0x180
[   16.855264]  ? preempt_count_sub+0x50/0x80
[   16.855317]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.855364]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.855413]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.855460]  kthread+0x337/0x6f0
[   16.855504]  ? trace_preempt_on+0x20/0xc0
[   16.855554]  ? __pfx_kthread+0x10/0x10
[   16.855612]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.855670]  ? calculate_sigpending+0x7b/0xa0
[   16.855713]  ? __pfx_kthread+0x10/0x10
[   16.855767]  ret_from_fork+0x41/0x80
[   16.855811]  ? __pfx_kthread+0x10/0x10
[   16.855845]  ret_from_fork_asm+0x1a/0x30
[   16.855911]  </TASK>
[   16.855938] 
[   16.870392] Allocated by task 205:
[   16.870848]  kasan_save_stack+0x45/0x70
[   16.871510]  kasan_save_track+0x18/0x40
[   16.872134]  kasan_save_alloc_info+0x3b/0x50
[   16.872389]  __kasan_kmalloc+0xb7/0xc0
[   16.872825]  __kmalloc_cache_noprof+0x189/0x420
[   16.873139]  kmalloc_uaf+0xaa/0x380
[   16.873416]  kunit_try_run_case+0x1a5/0x480
[   16.874039]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.874618]  kthread+0x337/0x6f0
[   16.874928]  ret_from_fork+0x41/0x80
[   16.875079]  ret_from_fork_asm+0x1a/0x30
[   16.876301] 
[   16.876548] Freed by task 205:
[   16.877165]  kasan_save_stack+0x45/0x70
[   16.877601]  kasan_save_track+0x18/0x40
[   16.877797]  kasan_save_free_info+0x3f/0x60
[   16.877952]  __kasan_slab_free+0x56/0x70
[   16.878099]  kfree+0x222/0x3f0
[   16.878992]  kmalloc_uaf+0x12c/0x380
[   16.879649]  kunit_try_run_case+0x1a5/0x480
[   16.880001]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.880570]  kthread+0x337/0x6f0
[   16.880859]  ret_from_fork+0x41/0x80
[   16.881214]  ret_from_fork_asm+0x1a/0x30
[   16.881439] 
[   16.881626] The buggy address belongs to the object at ffff888101d9a400
[   16.881626]  which belongs to the cache kmalloc-16 of size 16
[   16.882450] The buggy address is located 8 bytes inside of
[   16.882450]  freed 16-byte region [ffff888101d9a400, ffff888101d9a410)
[   16.883147] 
[   16.883351] The buggy address belongs to the physical page:
[   16.883718] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101d9a
[   16.884669] flags: 0x200000000000000(node=0|zone=2)
[   16.885429] page_type: f5(slab)
[   16.885657] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000
[   16.886792] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   16.887609] page dumped because: kasan: bad access detected
[   16.887975] 
[   16.888166] Memory state around the buggy address:
[   16.888572]  ffff888101d9a300: 00 01 fc fc 00 01 fc fc fa fb fc fc fa fb fc fc
[   16.889066]  ffff888101d9a380: 00 05 fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   16.889780] >ffff888101d9a400: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.890401]                       ^
[   16.890921]  ffff888101d9a480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.891376]  ffff888101d9a500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.892497] ==================================================================