Hay
Date
July 23, 2025, 3:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   63.977784] ==================================================================
[   63.977882] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   63.977882] 
[   63.977999] Use-after-free read at 0x00000000748a9655 (in kfence-#188):
[   63.978055]  test_krealloc+0x51c/0x830
[   63.978100]  kunit_try_run_case+0x170/0x3f0
[   63.978144]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.978189]  kthread+0x328/0x630
[   63.978231]  ret_from_fork+0x10/0x20
[   63.978273] 
[   63.978298] kfence-#188: 0x00000000748a9655-0x000000006ce6798a, size=32, cache=kmalloc-32
[   63.978298] 
[   63.978359] allocated by task 370 on cpu 0 at 63.976911s (0.001444s ago):
[   63.978428]  test_alloc+0x29c/0x628
[   63.978467]  test_krealloc+0xc0/0x830
[   63.978505]  kunit_try_run_case+0x170/0x3f0
[   63.978544]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.978587]  kthread+0x328/0x630
[   63.978624]  ret_from_fork+0x10/0x20
[   63.978663] 
[   63.978689] freed by task 370 on cpu 0 at 63.977195s (0.001490s ago):
[   63.978747]  krealloc_noprof+0x148/0x360
[   63.978784]  test_krealloc+0x1dc/0x830
[   63.978821]  kunit_try_run_case+0x170/0x3f0
[   63.978858]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.978908]  kthread+0x328/0x630
[   63.978945]  ret_from_fork+0x10/0x20
[   63.978984] 
[   63.979032] CPU: 0 UID: 0 PID: 370 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250723 #1 PREEMPT 
[   63.979116] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   63.979148] Hardware name: linux,dummy-virt (DT)
[   63.979185] ==================================================================

[   61.765676] ==================================================================
[   61.766232] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   61.766232] 
[   61.766773] Use-after-free read at 0x(____ptrval____) (in kfence-#158):
[   61.767111]  test_krealloc+0x6fc/0xbe0
[   61.767329]  kunit_try_run_case+0x1a5/0x480
[   61.767524]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   61.767743]  kthread+0x337/0x6f0
[   61.767918]  ret_from_fork+0x116/0x1d0
[   61.768111]  ret_from_fork_asm+0x1a/0x30
[   61.768451] 
[   61.768525] kfence-#158: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   61.768525] 
[   61.768838] allocated by task 386 on cpu 1 at 61.764807s (0.004028s ago):
[   61.769298]  test_alloc+0x364/0x10f0
[   61.769523]  test_krealloc+0xad/0xbe0
[   61.769699]  kunit_try_run_case+0x1a5/0x480
[   61.769841]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   61.770021]  kthread+0x337/0x6f0
[   61.770197]  ret_from_fork+0x116/0x1d0
[   61.770380]  ret_from_fork_asm+0x1a/0x30
[   61.770610] 
[   61.770703] freed by task 386 on cpu 1 at 61.765113s (0.005587s ago):
[   61.771022]  krealloc_noprof+0x108/0x340
[   61.771254]  test_krealloc+0x226/0xbe0
[   61.771466]  kunit_try_run_case+0x1a5/0x480
[   61.771766]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   61.772011]  kthread+0x337/0x6f0
[   61.772194]  ret_from_fork+0x116/0x1d0
[   61.772408]  ret_from_fork_asm+0x1a/0x30
[   61.772545] 
[   61.772650] CPU: 1 UID: 0 PID: 386 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) 
[   61.773616] Tainted: [B]=BAD_PAGE, [N]=TEST
[   61.773815] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   61.774629] ==================================================================