Hay
Date
July 5, 2025, 11:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   51.873024] ==================================================================
[   51.873119] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   51.873119] 
[   51.873231] Use-after-free read at 0x0000000026d4fdb3 (in kfence-#150):
[   51.873285]  test_krealloc+0x51c/0x830
[   51.873329]  kunit_try_run_case+0x170/0x3f0
[   51.873375]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.873419]  kthread+0x328/0x630
[   51.873457]  ret_from_fork+0x10/0x20
[   51.873496] 
[   51.873521] kfence-#150: 0x0000000026d4fdb3-0x000000000f86fc8d, size=32, cache=kmalloc-32
[   51.873521] 
[   51.873574] allocated by task 337 on cpu 0 at 51.872332s (0.001238s ago):
[   51.873641]  test_alloc+0x29c/0x628
[   51.873681]  test_krealloc+0xc0/0x830
[   51.873719]  kunit_try_run_case+0x170/0x3f0
[   51.873759]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.873803]  kthread+0x328/0x630
[   51.873839]  ret_from_fork+0x10/0x20
[   51.873878] 
[   51.873900] freed by task 337 on cpu 0 at 51.872614s (0.001282s ago):
[   51.873960]  krealloc_noprof+0x148/0x360
[   51.874000]  test_krealloc+0x1dc/0x830
[   51.874039]  kunit_try_run_case+0x170/0x3f0
[   51.874078]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.874121]  kthread+0x328/0x630
[   51.874166]  ret_from_fork+0x10/0x20
[   51.874205] 
[   51.874253] CPU: 0 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   51.874331] Tainted: [B]=BAD_PAGE, [N]=TEST
[   51.874360] Hardware name: linux,dummy-virt (DT)
[   51.874398] ==================================================================

[   51.384340] ==================================================================
[   51.384805] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   51.384805] 
[   51.385307] Use-after-free read at 0x(____ptrval____) (in kfence-#153):
[   51.385897]  test_krealloc+0x6fc/0xbe0
[   51.386202]  kunit_try_run_case+0x1a5/0x480
[   51.386466]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   51.386837]  kthread+0x337/0x6f0
[   51.387183]  ret_from_fork+0x116/0x1d0
[   51.387668]  ret_from_fork_asm+0x1a/0x30
[   51.388140] 
[   51.388262] kfence-#153: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   51.388262] 
[   51.388729] allocated by task 355 on cpu 1 at 51.383524s (0.005203s ago):
[   51.389054]  test_alloc+0x364/0x10f0
[   51.389310]  test_krealloc+0xad/0xbe0
[   51.389510]  kunit_try_run_case+0x1a5/0x480
[   51.389748]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   51.390075]  kthread+0x337/0x6f0
[   51.390264]  ret_from_fork+0x116/0x1d0
[   51.390707]  ret_from_fork_asm+0x1a/0x30
[   51.390949] 
[   51.391061] freed by task 355 on cpu 1 at 51.383850s (0.007208s ago):
[   51.391744]  krealloc_noprof+0x108/0x340
[   51.391964]  test_krealloc+0x226/0xbe0
[   51.392201]  kunit_try_run_case+0x1a5/0x480
[   51.392466]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   51.392743]  kthread+0x337/0x6f0
[   51.392955]  ret_from_fork+0x116/0x1d0
[   51.393146]  ret_from_fork_asm+0x1a/0x30
[   51.393419] 
[   51.393567] CPU: 1 UID: 0 PID: 355 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   51.394075] Tainted: [B]=BAD_PAGE, [N]=TEST
[   51.394280] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   51.394680] ==================================================================