Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   50.029980] ==================================================================
[   50.030055] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   50.030055] 
[   50.030138] Use-after-free read at 0x00000000dcd8e5a3 (in kfence-#152):
[   50.030209]  test_krealloc+0x51c/0x830
[   50.030254]  kunit_try_run_case+0x170/0x3f0
[   50.030297]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.030341]  kthread+0x328/0x630
[   50.030380]  ret_from_fork+0x10/0x20
[   50.030418] 
[   50.030442] kfence-#152: 0x00000000dcd8e5a3-0x00000000cd656a55, size=32, cache=kmalloc-32
[   50.030442] 
[   50.030498] allocated by task 338 on cpu 0 at 50.029357s (0.001137s ago):
[   50.030566]  test_alloc+0x29c/0x628
[   50.030607]  test_krealloc+0xc0/0x830
[   50.030647]  kunit_try_run_case+0x170/0x3f0
[   50.030686]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.030728]  kthread+0x328/0x630
[   50.030764]  ret_from_fork+0x10/0x20
[   50.030802] 
[   50.030824] freed by task 338 on cpu 0 at 50.029588s (0.001233s ago):
[   50.030885]  krealloc_noprof+0x148/0x360
[   50.030924]  test_krealloc+0x1dc/0x830
[   50.030962]  kunit_try_run_case+0x170/0x3f0
[   50.031000]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.031043]  kthread+0x328/0x630
[   50.031078]  ret_from_fork+0x10/0x20
[   50.031115] 
[   50.031158] CPU: 0 UID: 0 PID: 338 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   50.031244] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.031272] Hardware name: linux,dummy-virt (DT)
[   50.031306] ==================================================================

[   50.572226] ==================================================================
[   50.572619] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   50.572619] 
[   50.572983] Use-after-free read at 0x(____ptrval____) (in kfence-#144):
[   50.573254]  test_krealloc+0x6fc/0xbe0
[   50.573424]  kunit_try_run_case+0x1a5/0x480
[   50.573797]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.573996]  kthread+0x337/0x6f0
[   50.574161]  ret_from_fork+0x116/0x1d0
[   50.574344]  ret_from_fork_asm+0x1a/0x30
[   50.574578] 
[   50.574671] kfence-#144: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   50.574671] 
[   50.574979] allocated by task 354 on cpu 0 at 50.571623s (0.003354s ago):
[   50.575309]  test_alloc+0x364/0x10f0
[   50.575488]  test_krealloc+0xad/0xbe0
[   50.575707]  kunit_try_run_case+0x1a5/0x480
[   50.575930]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.576172]  kthread+0x337/0x6f0
[   50.576318]  ret_from_fork+0x116/0x1d0
[   50.576532]  ret_from_fork_asm+0x1a/0x30
[   50.576710] 
[   50.576813] freed by task 354 on cpu 0 at 50.571854s (0.004957s ago):
[   50.577057]  krealloc_noprof+0x108/0x340
[   50.577258]  test_krealloc+0x226/0xbe0
[   50.577424]  kunit_try_run_case+0x1a5/0x480
[   50.577639]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.578049]  kthread+0x337/0x6f0
[   50.578234]  ret_from_fork+0x116/0x1d0
[   50.578431]  ret_from_fork_asm+0x1a/0x30
[   50.579359] 
[   50.579546] CPU: 0 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   50.580061] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.580327] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   50.580709] ==================================================================