Hay
Date
July 10, 2025, 9:07 a.m.

Environment
qemu-arm64
qemu-x86_64

[   63.151789] ==================================================================
[   63.151862] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   63.151862] 
[   63.151956] Use-after-free read at 0x00000000c6d2f91f (in kfence-#187):
[   63.152011]  test_krealloc+0x51c/0x830
[   63.152059]  kunit_try_run_case+0x170/0x3f0
[   63.152107]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.152172]  kthread+0x328/0x630
[   63.152212]  ret_from_fork+0x10/0x20
[   63.152253] 
[   63.152278] kfence-#187: 0x00000000c6d2f91f-0x0000000099e89701, size=32, cache=kmalloc-32
[   63.152278] 
[   63.152334] allocated by task 368 on cpu 0 at 63.151092s (0.001239s ago):
[   63.152404]  test_alloc+0x29c/0x628
[   63.152446]  test_krealloc+0xc0/0x830
[   63.152489]  kunit_try_run_case+0x170/0x3f0
[   63.152530]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.152578]  kthread+0x328/0x630
[   63.152615]  ret_from_fork+0x10/0x20
[   63.152653] 
[   63.152678] freed by task 368 on cpu 0 at 63.151379s (0.001296s ago):
[   63.152741]  krealloc_noprof+0x148/0x360
[   63.152783]  test_krealloc+0x1dc/0x830
[   63.152824]  kunit_try_run_case+0x170/0x3f0
[   63.152865]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.152911]  kthread+0x328/0x630
[   63.152947]  ret_from_fork+0x10/0x20
[   63.152989] 
[   63.153036] CPU: 0 UID: 0 PID: 368 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT 
[   63.153116] Tainted: [B]=BAD_PAGE, [N]=TEST
[   63.153156] Hardware name: linux,dummy-virt (DT)
[   63.153191] ==================================================================

[   63.005685] ==================================================================
[   63.006046] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   63.006046] 
[   63.006340] Use-after-free read at 0x(____ptrval____) (in kfence-#173):
[   63.006578]  test_krealloc+0x6fc/0xbe0
[   63.006738]  kunit_try_run_case+0x1a5/0x480
[   63.007027]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.007232]  kthread+0x337/0x6f0
[   63.007435]  ret_from_fork+0x116/0x1d0
[   63.007686]  ret_from_fork_asm+0x1a/0x30
[   63.007907] 
[   63.008003] kfence-#173: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   63.008003] 
[   63.008408] allocated by task 385 on cpu 0 at 63.005058s (0.003336s ago):
[   63.008745]  test_alloc+0x364/0x10f0
[   63.008953]  test_krealloc+0xad/0xbe0
[   63.009129]  kunit_try_run_case+0x1a5/0x480
[   63.009332]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.009619]  kthread+0x337/0x6f0
[   63.009776]  ret_from_fork+0x116/0x1d0
[   63.009956]  ret_from_fork_asm+0x1a/0x30
[   63.010164] 
[   63.010261] freed by task 385 on cpu 0 at 63.005286s (0.004972s ago):
[   63.010526]  krealloc_noprof+0x108/0x340
[   63.010666]  test_krealloc+0x226/0xbe0
[   63.010804]  kunit_try_run_case+0x1a5/0x480
[   63.010991]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.011282]  kthread+0x337/0x6f0
[   63.011440]  ret_from_fork+0x116/0x1d0
[   63.011571]  ret_from_fork_asm+0x1a/0x30
[   63.011887] 
[   63.012047] CPU: 0 UID: 0 PID: 385 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5-next-20250710 #1 PREEMPT(voluntary) 
[   63.012904] Tainted: [B]=BAD_PAGE, [N]=TEST
[   63.013296] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   63.013919] ==================================================================