Hay
Date
July 17, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   50.121793] ==================================================================
[   50.121865] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   50.121865] 
[   50.121951] Use-after-free read at 0x00000000bfc1735b (in kfence-#161):
[   50.122018]  test_krealloc+0x51c/0x830
[   50.122064]  kunit_try_run_case+0x170/0x3f0
[   50.122108]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.122153]  kthread+0x328/0x630
[   50.122191]  ret_from_fork+0x10/0x20
[   50.122231] 
[   50.122257] kfence-#161: 0x00000000bfc1735b-0x0000000088d2ca2e, size=32, cache=kmalloc-32
[   50.122257] 
[   50.122312] allocated by task 338 on cpu 1 at 50.121169s (0.001139s ago):
[   50.122380]  test_alloc+0x29c/0x628
[   50.122419]  test_krealloc+0xc0/0x830
[   50.122459]  kunit_try_run_case+0x170/0x3f0
[   50.122497]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.122542]  kthread+0x328/0x630
[   50.122576]  ret_from_fork+0x10/0x20
[   50.122614] 
[   50.122638] freed by task 338 on cpu 1 at 50.121391s (0.001242s ago):
[   50.122698]  krealloc_noprof+0x148/0x360
[   50.122739]  test_krealloc+0x1dc/0x830
[   50.122779]  kunit_try_run_case+0x170/0x3f0
[   50.122818]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.122862]  kthread+0x328/0x630
[   50.122898]  ret_from_fork+0x10/0x20
[   50.122936] 
[   50.122989] CPU: 1 UID: 0 PID: 338 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   50.123067] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.123097] Hardware name: linux,dummy-virt (DT)
[   50.123133] ==================================================================

[   48.563177] ==================================================================
[   48.563562] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   48.563562] 
[   48.564010] Use-after-free read at 0x(____ptrval____) (in kfence-#118):
[   48.564254]  test_krealloc+0x6fc/0xbe0
[   48.564409]  kunit_try_run_case+0x1a5/0x480
[   48.564629]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.564927]  kthread+0x337/0x6f0
[   48.565403]  ret_from_fork+0x116/0x1d0
[   48.565572]  ret_from_fork_asm+0x1a/0x30
[   48.565862] 
[   48.566292] kfence-#118: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   48.566292] 
[   48.566719] allocated by task 354 on cpu 0 at 48.562540s (0.004177s ago):
[   48.567046]  test_alloc+0x364/0x10f0
[   48.567248]  test_krealloc+0xad/0xbe0
[   48.567425]  kunit_try_run_case+0x1a5/0x480
[   48.567676]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.568012]  kthread+0x337/0x6f0
[   48.568225]  ret_from_fork+0x116/0x1d0
[   48.568383]  ret_from_fork_asm+0x1a/0x30
[   48.568579] 
[   48.568727] freed by task 354 on cpu 0 at 48.562779s (0.005945s ago):
[   48.569044]  krealloc_noprof+0x108/0x340
[   48.569238]  test_krealloc+0x226/0xbe0
[   48.569409]  kunit_try_run_case+0x1a5/0x480
[   48.569591]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.569951]  kthread+0x337/0x6f0
[   48.570150]  ret_from_fork+0x116/0x1d0
[   48.570358]  ret_from_fork_asm+0x1a/0x30
[   48.570556] 
[   48.570654] CPU: 0 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   48.571209] Tainted: [B]=BAD_PAGE, [N]=TEST
[   48.571381] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   48.571743] ==================================================================