Hay
Date
June 19, 2025, 12:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   62.770983] ==================================================================
[   62.771103] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   62.771103] 
[   62.771220] Use-after-free read at 0x000000004809c4a0 (in kfence-#175):
[   62.771282]  test_krealloc+0x51c/0x830
[   62.771337]  kunit_try_run_case+0x170/0x3f0
[   62.771387]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   62.771438]  kthread+0x328/0x630
[   62.771481]  ret_from_fork+0x10/0x20
[   62.771525] 
[   62.771553] kfence-#175: 0x000000004809c4a0-0x00000000edeffef3, size=32, cache=kmalloc-32
[   62.771553] 
[   62.771616] allocated by task 348 on cpu 0 at 62.770095s (0.001516s ago):
[   62.771696]  test_alloc+0x29c/0x628
[   62.771742]  test_krealloc+0xc0/0x830
[   62.771788]  kunit_try_run_case+0x170/0x3f0
[   62.771832]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   62.771893]  kthread+0x328/0x630
[   62.771937]  ret_from_fork+0x10/0x20
[   62.771980] 
[   62.772009] freed by task 348 on cpu 0 at 62.770451s (0.001554s ago):
[   62.772078]  krealloc_noprof+0x148/0x360
[   62.772122]  test_krealloc+0x1dc/0x830
[   62.772166]  kunit_try_run_case+0x170/0x3f0
[   62.772209]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   62.772256]  kthread+0x328/0x630
[   62.772294]  ret_from_fork+0x10/0x20
[   62.772338] 
[   62.772390] CPU: 0 UID: 0 PID: 348 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT 
[   62.772480] Tainted: [B]=BAD_PAGE, [N]=TEST
[   62.772515] Hardware name: linux,dummy-virt (DT)
[   62.772557] ==================================================================

[   63.413837] ==================================================================
[   63.414364] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   63.414364] 
[   63.414807] Use-after-free read at 0x(____ptrval____) (in kfence-#179):
[   63.415089]  test_krealloc+0x6fc/0xbe0
[   63.415275]  kunit_try_run_case+0x1a5/0x480
[   63.415671]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.416114]  kthread+0x337/0x6f0
[   63.416439]  ret_from_fork+0x116/0x1d0
[   63.416674]  ret_from_fork_asm+0x1a/0x30
[   63.417013] 
[   63.417162] kfence-#179: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   63.417162] 
[   63.417529] allocated by task 366 on cpu 1 at 63.412766s (0.004758s ago):
[   63.418149]  test_alloc+0x364/0x10f0
[   63.418482]  test_krealloc+0xad/0xbe0
[   63.418761]  kunit_try_run_case+0x1a5/0x480
[   63.419152]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.419403]  kthread+0x337/0x6f0
[   63.419581]  ret_from_fork+0x116/0x1d0
[   63.419878]  ret_from_fork_asm+0x1a/0x30
[   63.420221] 
[   63.420393] freed by task 366 on cpu 1 at 63.413254s (0.007135s ago):
[   63.420814]  krealloc_noprof+0x108/0x340
[   63.421047]  test_krealloc+0x226/0xbe0
[   63.421374]  kunit_try_run_case+0x1a5/0x480
[   63.421590]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.422055]  kthread+0x337/0x6f0
[   63.422242]  ret_from_fork+0x116/0x1d0
[   63.422527]  ret_from_fork_asm+0x1a/0x30
[   63.422727] 
[   63.422905] CPU: 1 UID: 0 PID: 366 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250619 #1 PREEMPT(voluntary) 
[   63.423872] Tainted: [B]=BAD_PAGE, [N]=TEST
[   63.424198] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   63.424612] ==================================================================