Hay
Date
July 22, 2025, 2:40 p.m.

Environment
qemu-arm64
qemu-x86_64

[   51.595736] ==================================================================
[   51.595792] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   51.595792] 
[   51.595865] Use-after-free read at 0x00000000c42a51a4 (in kfence-#158):
[   51.595915]  test_krealloc+0x51c/0x830
[   51.595959]  kunit_try_run_case+0x170/0x3f0
[   51.596002]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.596045]  kthread+0x328/0x630
[   51.596086]  ret_from_fork+0x10/0x20
[   51.596125] 
[   51.596149] kfence-#158: 0x00000000c42a51a4-0x00000000e492c7d0, size=32, cache=kmalloc-32
[   51.596149] 
[   51.596201] allocated by task 339 on cpu 1 at 51.595150s (0.001048s ago):
[   51.596268]  test_alloc+0x29c/0x628
[   51.596322]  test_krealloc+0xc0/0x830
[   51.596360]  kunit_try_run_case+0x170/0x3f0
[   51.596401]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.596442]  kthread+0x328/0x630
[   51.596481]  ret_from_fork+0x10/0x20
[   51.596519] 
[   51.596542] freed by task 339 on cpu 1 at 51.595370s (0.001168s ago):
[   51.596601]  krealloc_noprof+0x148/0x360
[   51.596638]  test_krealloc+0x1dc/0x830
[   51.596676]  kunit_try_run_case+0x170/0x3f0
[   51.596717]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.596758]  kthread+0x328/0x630
[   51.596797]  ret_from_fork+0x10/0x20
[   51.596835] 
[   51.596875] CPU: 1 UID: 0 PID: 339 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT 
[   51.596949] Tainted: [B]=BAD_PAGE, [N]=TEST
[   51.596979] Hardware name: linux,dummy-virt (DT)
[   51.597012] ==================================================================

[   47.344635] ==================================================================
[   47.345036] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   47.345036] 
[   47.345386] Use-after-free read at 0x(____ptrval____) (in kfence-#131):
[   47.346097]  test_krealloc+0x6fc/0xbe0
[   47.346372]  kunit_try_run_case+0x1a5/0x480
[   47.346589]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.346839]  kthread+0x337/0x6f0
[   47.347008]  ret_from_fork+0x41/0x80
[   47.347167]  ret_from_fork_asm+0x1a/0x30
[   47.347828] 
[   47.347918] kfence-#131: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   47.347918] 
[   47.348443] allocated by task 357 on cpu 1 at 47.343971s (0.004470s ago):
[   47.348924]  test_alloc+0x364/0x10f0
[   47.349103]  test_krealloc+0xad/0xbe0
[   47.349283]  kunit_try_run_case+0x1a5/0x480
[   47.349472]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.349692]  kthread+0x337/0x6f0
[   47.349835]  ret_from_fork+0x41/0x80
[   47.350007]  ret_from_fork_asm+0x1a/0x30
[   47.350169] 
[   47.350268] freed by task 357 on cpu 1 at 47.344262s (0.006003s ago):
[   47.351012]  krealloc_noprof+0x108/0x340
[   47.351168]  test_krealloc+0x226/0xbe0
[   47.351371]  kunit_try_run_case+0x1a5/0x480
[   47.351791]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.352108]  kthread+0x337/0x6f0
[   47.352340]  ret_from_fork+0x41/0x80
[   47.352495]  ret_from_fork_asm+0x1a/0x30
[   47.352701] 
[   47.352992] CPU: 1 UID: 0 PID: 357 Comm: kunit_try_catch Tainted: G    B            N  6.15.8-rc1 #1 PREEMPT(voluntary) 
[   47.353537] Tainted: [B]=BAD_PAGE, [N]=TEST
[   47.353797] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   47.354253] ==================================================================