Hay
Date
July 19, 2025, 11:12 p.m.

Environment
qemu-arm64
qemu-x86_64

[   49.821981] ==================================================================
[   49.822083] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   49.822083] 
[   49.822180] Use-after-free read at 0x00000000ca67a30f (in kfence-#152):
[   49.822235]  test_krealloc+0x51c/0x830
[   49.822282]  kunit_try_run_case+0x170/0x3f0
[   49.822328]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   49.822374]  kthread+0x328/0x630
[   49.822416]  ret_from_fork+0x10/0x20
[   49.822457] 
[   49.822481] kfence-#152: 0x00000000ca67a30f-0x000000001d64a8f4, size=32, cache=kmalloc-32
[   49.822481] 
[   49.822537] allocated by task 337 on cpu 1 at 49.821278s (0.001254s ago):
[   49.822608]  test_alloc+0x29c/0x628
[   49.822647]  test_krealloc+0xc0/0x830
[   49.822702]  kunit_try_run_case+0x170/0x3f0
[   49.822743]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   49.822786]  kthread+0x328/0x630
[   49.822823]  ret_from_fork+0x10/0x20
[   49.822864] 
[   49.822889] freed by task 337 on cpu 1 at 49.821544s (0.001341s ago):
[   49.822953]  krealloc_noprof+0x148/0x360
[   49.822992]  test_krealloc+0x1dc/0x830
[   49.823031]  kunit_try_run_case+0x170/0x3f0
[   49.823071]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   49.823114]  kthread+0x328/0x630
[   49.823150]  ret_from_fork+0x10/0x20
[   49.823189] 
[   49.823237] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   49.823317] Tainted: [B]=BAD_PAGE, [N]=TEST
[   49.823349] Hardware name: linux,dummy-virt (DT)
[   49.823384] ==================================================================

[   50.557251] ==================================================================
[   50.557758] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   50.557758] 
[   50.558126] Use-after-free read at 0x(____ptrval____) (in kfence-#146):
[   50.558446]  test_krealloc+0x6fc/0xbe0
[   50.558599]  kunit_try_run_case+0x1a5/0x480
[   50.558790]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.559032]  kthread+0x337/0x6f0
[   50.559178]  ret_from_fork+0x116/0x1d0
[   50.559321]  ret_from_fork_asm+0x1a/0x30
[   50.559523] 
[   50.559623] kfence-#146: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   50.559623] 
[   50.560036] allocated by task 355 on cpu 0 at 50.556635s (0.003398s ago):
[   50.560361]  test_alloc+0x364/0x10f0
[   50.560518]  test_krealloc+0xad/0xbe0
[   50.560649]  kunit_try_run_case+0x1a5/0x480
[   50.561387]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.561675]  kthread+0x337/0x6f0
[   50.561855]  ret_from_fork+0x116/0x1d0
[   50.562034]  ret_from_fork_asm+0x1a/0x30
[   50.562245] 
[   50.562344] freed by task 355 on cpu 0 at 50.556848s (0.005493s ago):
[   50.563000]  krealloc_noprof+0x108/0x340
[   50.563284]  test_krealloc+0x226/0xbe0
[   50.563523]  kunit_try_run_case+0x1a5/0x480
[   50.563716]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.563949]  kthread+0x337/0x6f0
[   50.564114]  ret_from_fork+0x116/0x1d0
[   50.564281]  ret_from_fork_asm+0x1a/0x30
[   50.564761] 
[   50.564887] CPU: 0 UID: 0 PID: 355 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   50.565456] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.565724] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   50.566150] ==================================================================