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

Environment
e850-96
qemu-arm64
qemu-x86_64

[   27.613942] ==================================================================
[   27.623330] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468
[   27.629921] Read of size 1 at addr ffff000800d61628 by task kunit_try_catch/235
[   27.637210] 
[   27.638698] CPU: 7 UID: 0 PID: 235 Comm: kunit_try_catch Tainted: G    B            N  6.15.1-rc1 #1 PREEMPT 
[   27.638753] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.638770] Hardware name: WinLink E850-96 board (DT)
[   27.638792] Call trace:
[   27.638806]  show_stack+0x20/0x38 (C)
[   27.638841]  dump_stack_lvl+0x8c/0xd0
[   27.638876]  print_report+0x118/0x608
[   27.638908]  kasan_report+0xdc/0x128
[   27.638935]  __asan_report_load1_noabort+0x20/0x30
[   27.638971]  kmalloc_uaf2+0x3f4/0x468
[   27.639002]  kunit_try_run_case+0x170/0x3f0
[   27.639039]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.639080]  kthread+0x328/0x630
[   27.639115]  ret_from_fork+0x10/0x20
[   27.639151] 
[   27.701013] Allocated by task 235:
[   27.704398]  kasan_save_stack+0x3c/0x68
[   27.708216]  kasan_save_track+0x20/0x40
[   27.712035]  kasan_save_alloc_info+0x40/0x58
[   27.716289]  __kasan_kmalloc+0xd4/0xd8
[   27.720023]  __kmalloc_cache_noprof+0x16c/0x3c0
[   27.724535]  kmalloc_uaf2+0xc4/0x468
[   27.728096]  kunit_try_run_case+0x170/0x3f0
[   27.732260]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.737729]  kthread+0x328/0x630
[   27.740941]  ret_from_fork+0x10/0x20
[   27.744500] 
[   27.745977] Freed by task 235:
[   27.749015]  kasan_save_stack+0x3c/0x68
[   27.752833]  kasan_save_track+0x20/0x40
[   27.756653]  kasan_save_free_info+0x4c/0x78
[   27.760819]  __kasan_slab_free+0x6c/0x98
[   27.764726]  kfree+0x214/0x3c8
[   27.767764]  kmalloc_uaf2+0x134/0x468
[   27.771409]  kunit_try_run_case+0x170/0x3f0
[   27.775576]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.781045]  kthread+0x328/0x630
[   27.784256]  ret_from_fork+0x10/0x20
[   27.787815] 
[   27.789293] The buggy address belongs to the object at ffff000800d61600
[   27.789293]  which belongs to the cache kmalloc-64 of size 64
[   27.801619] The buggy address is located 40 bytes inside of
[   27.801619]  freed 64-byte region [ffff000800d61600, ffff000800d61640)
[   27.813683] 
[   27.815162] The buggy address belongs to the physical page:
[   27.820719] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x880d61
[   27.828704] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.835212] page_type: f5(slab)
[   27.838350] raw: 0bfffe0000000000 ffff0008000028c0 dead000000000122 0000000000000000
[   27.846068] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   27.853788] page dumped because: kasan: bad access detected
[   27.859342] 
[   27.860818] Memory state around the buggy address:
[   27.865598]  ffff000800d61500: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   27.872801]  ffff000800d61580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   27.880006] >ffff000800d61600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   27.887207]                                   ^
[   27.891723]  ffff000800d61680: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc
[   27.898928]  ffff000800d61700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.906131] ==================================================================

[   19.158560] ==================================================================
[   19.158617] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468
[   19.158673] Read of size 1 at addr fff00000c3fb2d28 by task kunit_try_catch/191
[   19.158724] 
[   19.158756] CPU: 1 UID: 0 PID: 191 Comm: kunit_try_catch Tainted: G    B   W        N  6.15.1-rc1 #1 PREEMPT 
[   19.158841] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   19.159185] Hardware name: linux,dummy-virt (DT)
[   19.159374] Call trace:
[   19.159580]  show_stack+0x20/0x38 (C)
[   19.161659]  dump_stack_lvl+0x8c/0xd0
[   19.161777]  print_report+0x118/0x608
[   19.162017]  kasan_report+0xdc/0x128
[   19.162331]  __asan_report_load1_noabort+0x20/0x30
[   19.162637]  kmalloc_uaf2+0x3f4/0x468
[   19.164224]  kunit_try_run_case+0x170/0x3f0
[   19.164323]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.164519]  kthread+0x328/0x630
[   19.164616]  ret_from_fork+0x10/0x20
[   19.164675] 
[   19.165030] Allocated by task 191:
[   19.165089]  kasan_save_stack+0x3c/0x68
[   19.165148]  kasan_save_track+0x20/0x40
[   19.165233]  kasan_save_alloc_info+0x40/0x58
[   19.165345]  __kasan_kmalloc+0xd4/0xd8
[   19.165434]  __kmalloc_cache_noprof+0x16c/0x3c0
[   19.165605]  kmalloc_uaf2+0xc4/0x468
[   19.165661]  kunit_try_run_case+0x170/0x3f0
[   19.165977]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.166060]  kthread+0x328/0x630
[   19.166186]  ret_from_fork+0x10/0x20
[   19.166253] 
[   19.166310] Freed by task 191:
[   19.166422]  kasan_save_stack+0x3c/0x68
[   19.166501]  kasan_save_track+0x20/0x40
[   19.166634]  kasan_save_free_info+0x4c/0x78
[   19.166724]  __kasan_slab_free+0x6c/0x98
[   19.166788]  kfree+0x214/0x3c8
[   19.167100]  kmalloc_uaf2+0x134/0x468
[   19.167175]  kunit_try_run_case+0x170/0x3f0
[   19.167326]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   19.167403]  kthread+0x328/0x630
[   19.167562]  ret_from_fork+0x10/0x20
[   19.167609] 
[   19.167647] The buggy address belongs to the object at fff00000c3fb2d00
[   19.167647]  which belongs to the cache kmalloc-64 of size 64
[   19.167760] The buggy address is located 40 bytes inside of
[   19.167760]  freed 64-byte region [fff00000c3fb2d00, fff00000c3fb2d40)
[   19.167824] 
[   19.167844] The buggy address belongs to the physical page:
[   19.167887] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103fb2
[   19.167963] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   19.168029] page_type: f5(slab)
[   19.168070] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   19.168135] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   19.168190] page dumped because: kasan: bad access detected
[   19.168221] 
[   19.168238] Memory state around the buggy address:
[   19.168288]  fff00000c3fb2c00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.168331]  fff00000c3fb2c80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.168401] >fff00000c3fb2d00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   19.168449]                                   ^
[   19.168481]  fff00000c3fb2d80: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc
[   19.168525]  fff00000c3fb2e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   19.168575] ==================================================================

[   16.942965] ==================================================================
[   16.943716] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520
[   16.944122] Read of size 1 at addr ffff888102b2bfa8 by task kunit_try_catch/209
[   16.944720] 
[   16.944967] CPU: 0 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G    B            N  6.15.1-rc1 #1 PREEMPT(voluntary) 
[   16.945081] Tainted: [B]=BAD_PAGE, [N]=TEST
[   16.945110] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   16.945155] Call Trace:
[   16.945186]  <TASK>
[   16.945449]  dump_stack_lvl+0x73/0xb0
[   16.945547]  print_report+0xd1/0x650
[   16.945604]  ? __virt_addr_valid+0x1db/0x2d0
[   16.945661]  ? kmalloc_uaf2+0x4a8/0x520
[   16.945710]  ? kasan_complete_mode_report_info+0x64/0x200
[   16.945776]  ? kmalloc_uaf2+0x4a8/0x520
[   16.945827]  kasan_report+0x141/0x180
[   16.945880]  ? kmalloc_uaf2+0x4a8/0x520
[   16.945933]  __asan_report_load1_noabort+0x18/0x20
[   16.945970]  kmalloc_uaf2+0x4a8/0x520
[   16.946008]  ? __pfx_kmalloc_uaf2+0x10/0x10
[   16.946043]  ? finish_task_switch.isra.0+0x153/0x700
[   16.946089]  ? __switch_to+0x5d9/0xf60
[   16.946166]  ? dequeue_task_fair+0x166/0x4e0
[   16.946452]  ? __schedule+0x10cc/0x2b30
[   16.946503]  ? __pfx_read_tsc+0x10/0x10
[   16.946551]  ? ktime_get_ts64+0x86/0x230
[   16.946609]  kunit_try_run_case+0x1a5/0x480
[   16.946667]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.946707]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   16.946736]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   16.946787]  ? __kthread_parkme+0x82/0x180
[   16.946814]  ? preempt_count_sub+0x50/0x80
[   16.946845]  ? __pfx_kunit_try_run_case+0x10/0x10
[   16.946872]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.946898]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   16.946924]  kthread+0x337/0x6f0
[   16.946943]  ? trace_preempt_on+0x20/0xc0
[   16.946971]  ? __pfx_kthread+0x10/0x10
[   16.946991]  ? _raw_spin_unlock_irq+0x47/0x80
[   16.947014]  ? calculate_sigpending+0x7b/0xa0
[   16.947039]  ? __pfx_kthread+0x10/0x10
[   16.947059]  ret_from_fork+0x41/0x80
[   16.947083]  ? __pfx_kthread+0x10/0x10
[   16.947118]  ret_from_fork_asm+0x1a/0x30
[   16.947169]  </TASK>
[   16.947192] 
[   16.959928] Allocated by task 209:
[   16.960450]  kasan_save_stack+0x45/0x70
[   16.960812]  kasan_save_track+0x18/0x40
[   16.961080]  kasan_save_alloc_info+0x3b/0x50
[   16.961354]  __kasan_kmalloc+0xb7/0xc0
[   16.961559]  __kmalloc_cache_noprof+0x189/0x420
[   16.961930]  kmalloc_uaf2+0xc6/0x520
[   16.962325]  kunit_try_run_case+0x1a5/0x480
[   16.962707]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.963224]  kthread+0x337/0x6f0
[   16.963441]  ret_from_fork+0x41/0x80
[   16.963731]  ret_from_fork_asm+0x1a/0x30
[   16.964135] 
[   16.964394] Freed by task 209:
[   16.964529]  kasan_save_stack+0x45/0x70
[   16.964888]  kasan_save_track+0x18/0x40
[   16.965131]  kasan_save_free_info+0x3f/0x60
[   16.965543]  __kasan_slab_free+0x56/0x70
[   16.965786]  kfree+0x222/0x3f0
[   16.966062]  kmalloc_uaf2+0x14c/0x520
[   16.966521]  kunit_try_run_case+0x1a5/0x480
[   16.966829]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   16.967263]  kthread+0x337/0x6f0
[   16.967448]  ret_from_fork+0x41/0x80
[   16.967663]  ret_from_fork_asm+0x1a/0x30
[   16.967882] 
[   16.968010] The buggy address belongs to the object at ffff888102b2bf80
[   16.968010]  which belongs to the cache kmalloc-64 of size 64
[   16.969137] The buggy address is located 40 bytes inside of
[   16.969137]  freed 64-byte region [ffff888102b2bf80, ffff888102b2bfc0)
[   16.970005] 
[   16.970259] The buggy address belongs to the physical page:
[   16.970534] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b2b
[   16.970866] flags: 0x200000000000000(node=0|zone=2)
[   16.971139] page_type: f5(slab)
[   16.971424] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   16.972029] raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000
[   16.972678] page dumped because: kasan: bad access detected
[   16.973253] 
[   16.973433] Memory state around the buggy address:
[   16.973693]  ffff888102b2be80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   16.974177]  ffff888102b2bf00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   16.974633] >ffff888102b2bf80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   16.974928]                                   ^
[   16.975165]  ffff888102b2c000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   16.975878]  ffff888102b2c080: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc
[   16.976433] ==================================================================