Hay
Date
July 12, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   52.146887] ==================================================================
[   52.147004] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   52.147004] 
[   52.147127] Use-after-free read at 0x000000002c20534d (in kfence-#194):
[   52.147192]  test_krealloc+0x51c/0x830
[   52.147250]  kunit_try_run_case+0x170/0x3f0
[   52.147305]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   52.147356]  kthread+0x328/0x630
[   52.147404]  ret_from_fork+0x10/0x20
[   52.147453] 
[   52.147481] kfence-#194: 0x000000002c20534d-0x000000005511dc6f, size=32, cache=kmalloc-32
[   52.147481] 
[   52.147546] allocated by task 338 on cpu 1 at 52.145926s (0.001615s ago):
[   52.147628]  test_alloc+0x29c/0x628
[   52.147677]  test_krealloc+0xc0/0x830
[   52.147723]  kunit_try_run_case+0x170/0x3f0
[   52.147767]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   52.147814]  kthread+0x328/0x630
[   52.147876]  ret_from_fork+0x10/0x20
[   52.147920] 
[   52.147946] freed by task 338 on cpu 1 at 52.146344s (0.001597s ago):
[   52.148014]  krealloc_noprof+0x148/0x360
[   52.148056]  test_krealloc+0x1dc/0x830
[   52.148097]  kunit_try_run_case+0x170/0x3f0
[   52.148140]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   52.148184]  kthread+0x328/0x630
[   52.148223]  ret_from_fork+0x10/0x20
[   52.148266] 
[   52.148320] CPU: 1 UID: 0 PID: 338 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   52.148411] Tainted: [B]=BAD_PAGE, [N]=TEST
[   52.148444] Hardware name: linux,dummy-virt (DT)
[   52.148483] ==================================================================

[   51.185613] ==================================================================
[   51.186040] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   51.186040] 
[   51.186561] Use-after-free read at 0x(____ptrval____) (in kfence-#147):
[   51.187162]  test_krealloc+0x6fc/0xbe0
[   51.187358]  kunit_try_run_case+0x1a5/0x480
[   51.187553]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   51.188084]  kthread+0x337/0x6f0
[   51.188247]  ret_from_fork+0x116/0x1d0
[   51.188587]  ret_from_fork_asm+0x1a/0x30
[   51.188961] 
[   51.189203] kfence-#147: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   51.189203] 
[   51.189606] allocated by task 355 on cpu 1 at 51.185026s (0.004579s ago):
[   51.190166]  test_alloc+0x364/0x10f0
[   51.190451]  test_krealloc+0xad/0xbe0
[   51.190768]  kunit_try_run_case+0x1a5/0x480
[   51.191056]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   51.191298]  kthread+0x337/0x6f0
[   51.191454]  ret_from_fork+0x116/0x1d0
[   51.191626]  ret_from_fork_asm+0x1a/0x30
[   51.192056] 
[   51.192154] freed by task 355 on cpu 1 at 51.185250s (0.006902s ago):
[   51.192535]  krealloc_noprof+0x108/0x340
[   51.192848]  test_krealloc+0x226/0xbe0
[   51.193138]  kunit_try_run_case+0x1a5/0x480
[   51.193429]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   51.193789]  kthread+0x337/0x6f0
[   51.194097]  ret_from_fork+0x116/0x1d0
[   51.194278]  ret_from_fork_asm+0x1a/0x30
[   51.194553] 
[   51.194657] CPU: 1 UID: 0 PID: 355 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   51.195281] Tainted: [B]=BAD_PAGE, [N]=TEST
[   51.195575] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   51.196083] ==================================================================