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

Environment
qemu-arm64
qemu-x86_64

[   51.460154] ==================================================================
[   51.460214] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   51.460214] 
[   51.460300] Use-after-free read at 0x000000006df0a2f3 (in kfence-#149):
[   51.460356]  test_krealloc+0x51c/0x830
[   51.460401]  kunit_try_run_case+0x170/0x3f0
[   51.460448]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.460493]  kthread+0x328/0x630
[   51.460534]  ret_from_fork+0x10/0x20
[   51.460574] 
[   51.460598] kfence-#149: 0x000000006df0a2f3-0x00000000f0b7c56d, size=32, cache=kmalloc-32
[   51.460598] 
[   51.460651] allocated by task 337 on cpu 0 at 51.459503s (0.001144s ago):
[   51.460722]  test_alloc+0x29c/0x628
[   51.460764]  test_krealloc+0xc0/0x830
[   51.460819]  kunit_try_run_case+0x170/0x3f0
[   51.460860]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.460903]  kthread+0x328/0x630
[   51.460942]  ret_from_fork+0x10/0x20
[   51.460982] 
[   51.461005] freed by task 337 on cpu 0 at 51.459753s (0.001248s ago):
[   51.461069]  krealloc_noprof+0x148/0x360
[   51.461111]  test_krealloc+0x1dc/0x830
[   51.461149]  kunit_try_run_case+0x170/0x3f0
[   51.461188]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.461233]  kthread+0x328/0x630
[   51.461268]  ret_from_fork+0x10/0x20
[   51.461308] 
[   51.461352] CPU: 0 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   51.461440] Tainted: [B]=BAD_PAGE, [N]=TEST
[   51.461471] Hardware name: linux,dummy-virt (DT)
[   51.461508] ==================================================================

[   48.683237] ==================================================================
[   48.683663] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   48.683663] 
[   48.684009] Use-after-free read at 0x(____ptrval____) (in kfence-#141):
[   48.684298]  test_krealloc+0x6fc/0xbe0
[   48.684471]  kunit_try_run_case+0x1a5/0x480
[   48.684738]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.685019]  kthread+0x337/0x6f0
[   48.685152]  ret_from_fork+0x116/0x1d0
[   48.686293]  ret_from_fork_asm+0x1a/0x30
[   48.686475] 
[   48.686555] kfence-#141: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   48.686555] 
[   48.687986] allocated by task 354 on cpu 0 at 48.682599s (0.005383s ago):
[   48.688990]  test_alloc+0x364/0x10f0
[   48.689135]  test_krealloc+0xad/0xbe0
[   48.689288]  kunit_try_run_case+0x1a5/0x480
[   48.689437]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.689608]  kthread+0x337/0x6f0
[   48.689730]  ret_from_fork+0x116/0x1d0
[   48.689861]  ret_from_fork_asm+0x1a/0x30
[   48.690000] 
[   48.690074] freed by task 354 on cpu 0 at 48.682835s (0.007235s ago):
[   48.691565]  krealloc_noprof+0x108/0x340
[   48.692387]  test_krealloc+0x226/0xbe0
[   48.693042]  kunit_try_run_case+0x1a5/0x480
[   48.693770]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.694672]  kthread+0x337/0x6f0
[   48.695227]  ret_from_fork+0x116/0x1d0
[   48.695661]  ret_from_fork_asm+0x1a/0x30
[   48.695853] 
[   48.695989] CPU: 0 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   48.696527] Tainted: [B]=BAD_PAGE, [N]=TEST
[   48.696741] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   48.697127] ==================================================================