Hay
Date
July 8, 2025, 7:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   54.500458] ==================================================================
[   54.500532] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   54.500532] 
[   54.500613] Use-after-free read at 0x000000005569bad2 (in kfence-#160):
[   54.500663]  test_krealloc+0x51c/0x830
[   54.500707]  kunit_try_run_case+0x170/0x3f0
[   54.500767]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.500811]  kthread+0x328/0x630
[   54.500849]  ret_from_fork+0x10/0x20
[   54.500891] 
[   54.500914] kfence-#160: 0x000000005569bad2-0x000000001b3bcb38, size=32, cache=kmalloc-32
[   54.500914] 
[   54.500968] allocated by task 337 on cpu 1 at 54.499803s (0.001161s ago):
[   54.501033]  test_alloc+0x29c/0x628
[   54.501073]  test_krealloc+0xc0/0x830
[   54.501112]  kunit_try_run_case+0x170/0x3f0
[   54.501153]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.501198]  kthread+0x328/0x630
[   54.501232]  ret_from_fork+0x10/0x20
[   54.501270] 
[   54.501294] freed by task 337 on cpu 1 at 54.500057s (0.001233s ago):
[   54.501354]  krealloc_noprof+0x148/0x360
[   54.501396]  test_krealloc+0x1dc/0x830
[   54.501435]  kunit_try_run_case+0x170/0x3f0
[   54.501474]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.501517]  kthread+0x328/0x630
[   54.501553]  ret_from_fork+0x10/0x20
[   54.501592] 
[   54.501633] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   54.501717] Tainted: [B]=BAD_PAGE, [N]=TEST
[   54.501746] Hardware name: linux,dummy-virt (DT)
[   54.501778] ==================================================================

[   50.057249] ==================================================================
[   50.057736] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   50.057736] 
[   50.058117] Use-after-free read at 0x(____ptrval____) (in kfence-#134):
[   50.058441]  test_krealloc+0x6fc/0xbe0
[   50.058605]  kunit_try_run_case+0x1a5/0x480
[   50.058899]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.059280]  kthread+0x337/0x6f0
[   50.059410]  ret_from_fork+0x116/0x1d0
[   50.059722]  ret_from_fork_asm+0x1a/0x30
[   50.059931] 
[   50.060045] kfence-#134: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   50.060045] 
[   50.060439] allocated by task 354 on cpu 0 at 50.056480s (0.003957s ago):
[   50.060701]  test_alloc+0x364/0x10f0
[   50.060991]  test_krealloc+0xad/0xbe0
[   50.061131]  kunit_try_run_case+0x1a5/0x480
[   50.061280]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.061558]  kthread+0x337/0x6f0
[   50.061838]  ret_from_fork+0x116/0x1d0
[   50.062063]  ret_from_fork_asm+0x1a/0x30
[   50.062266] 
[   50.062340] freed by task 354 on cpu 0 at 50.056768s (0.005570s ago):
[   50.062662]  krealloc_noprof+0x108/0x340
[   50.062882]  test_krealloc+0x226/0xbe0
[   50.063056]  kunit_try_run_case+0x1a5/0x480
[   50.063272]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   50.063513]  kthread+0x337/0x6f0
[   50.063680]  ret_from_fork+0x116/0x1d0
[   50.063835]  ret_from_fork_asm+0x1a/0x30
[   50.063972] 
[   50.064080] CPU: 0 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   50.064561] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.064763] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   50.065173] ==================================================================