Hay
Date
April 20, 2025, 11:09 p.m.

Environment
x86

[  112.467706] ==================================================================
[  112.474949] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[  112.474949] 
[  112.483225] Use-after-free read at 0x000000005a09af96 (in kfence-#30):
[  112.489757]  test_krealloc+0x6fc/0xbe0
[  112.493510]  kunit_try_run_case+0x1a2/0x480
[  112.497706]  kunit_generic_run_threadfn_adapter+0x82/0xf0
[  112.503104]  kthread+0x334/0x6f0
[  112.506337]  ret_from_fork+0x3e/0x80
[  112.509924]  ret_from_fork_asm+0x1a/0x30
[  112.513850] 
[  112.515349] kfence-#30: 0x000000005a09af96-0x0000000030ba6615, size=32, cache=kmalloc-32
[  112.515349] 
[  112.524908] allocated by task 380 on cpu 2 at 112.467694s (0.057214s ago):
[  112.531792]  test_alloc+0x364/0x10f0
[  112.535377]  test_krealloc+0xad/0xbe0
[  112.539043]  kunit_try_run_case+0x1a2/0x480
[  112.543228]  kunit_generic_run_threadfn_adapter+0x82/0xf0
[  112.548629]  kthread+0x334/0x6f0
[  112.551861]  ret_from_fork+0x3e/0x80
[  112.555450]  ret_from_fork_asm+0x1a/0x30
[  112.559374] 
[  112.560875] freed by task 380 on cpu 2 at 112.467698s (0.093176s ago):
[  112.567410]  krealloc_noprof+0x108/0x340
[  112.571342]  test_krealloc+0x226/0xbe0
[  112.575093]  kunit_try_run_case+0x1a2/0x480
[  112.579282]  kunit_generic_run_threadfn_adapter+0x82/0xf0
[  112.584679]  kthread+0x334/0x6f0
[  112.587912]  ret_from_fork+0x3e/0x80
[  112.591491]  ret_from_fork_asm+0x1a/0x30
[  112.595416] 
[  112.596919] CPU: 2 UID: 0 PID: 380 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[  112.607795] Tainted: [B]=BAD_PAGE, [N]=TEST
[  112.611988] Hardware name: Supermicro SYS-5019S-ML/X11SSH-F, BIOS 2.7 12/07/2021
[  112.619388] ==================================================================