Hay
Date
June 25, 2025, 8:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   61.353038] ==================================================================
[   61.353103] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   61.353103] 
[   61.353195] Use-after-free read at 0x00000000fdc339b6 (in kfence-#163):
[   61.353248]  test_krealloc+0x51c/0x830
[   61.353293]  kunit_try_run_case+0x170/0x3f0
[   61.353339]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   61.353385]  kthread+0x328/0x630
[   61.353438]  ret_from_fork+0x10/0x20
[   61.353480] 
[   61.353504] kfence-#163: 0x00000000fdc339b6-0x000000007a76df1a, size=32, cache=kmalloc-32
[   61.353504] 
[   61.353558] allocated by task 349 on cpu 0 at 61.352417s (0.001138s ago):
[   61.353627]  test_alloc+0x29c/0x628
[   61.353668]  test_krealloc+0xc0/0x830
[   61.353707]  kunit_try_run_case+0x170/0x3f0
[   61.353747]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   61.353791]  kthread+0x328/0x630
[   61.353827]  ret_from_fork+0x10/0x20
[   61.353866] 
[   61.353889] freed by task 349 on cpu 0 at 61.352632s (0.001253s ago):
[   61.353951]  krealloc_noprof+0x148/0x360
[   61.353990]  test_krealloc+0x1dc/0x830
[   61.354038]  kunit_try_run_case+0x170/0x3f0
[   61.354077]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   61.354120]  kthread+0x328/0x630
[   61.354155]  ret_from_fork+0x10/0x20
[   61.354192] 
[   61.354237] CPU: 0 UID: 0 PID: 349 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250625 #1 PREEMPT 
[   61.354315] Tainted: [B]=BAD_PAGE, [N]=TEST
[   61.354343] Hardware name: linux,dummy-virt (DT)
[   61.354378] ==================================================================

[   58.036712] ==================================================================
[   58.037104] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   58.037104] 
[   58.037444] Use-after-free read at 0x(____ptrval____) (in kfence-#134):
[   58.038064]  test_krealloc+0x6fc/0xbe0
[   58.038262]  kunit_try_run_case+0x1a5/0x480
[   58.038476]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   58.038700]  kthread+0x337/0x6f0
[   58.038862]  ret_from_fork+0x116/0x1d0
[   58.039043]  ret_from_fork_asm+0x1a/0x30
[   58.039610] 
[   58.039705] kfence-#134: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   58.039705] 
[   58.040257] allocated by task 366 on cpu 1 at 58.036120s (0.004134s ago):
[   58.040724]  test_alloc+0x364/0x10f0
[   58.040976]  test_krealloc+0xad/0xbe0
[   58.041248]  kunit_try_run_case+0x1a5/0x480
[   58.041504]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   58.041824]  kthread+0x337/0x6f0
[   58.041972]  ret_from_fork+0x116/0x1d0
[   58.042186]  ret_from_fork_asm+0x1a/0x30
[   58.042469] 
[   58.042561] freed by task 366 on cpu 1 at 58.036348s (0.006210s ago):
[   58.042837]  krealloc_noprof+0x108/0x340
[   58.043025]  test_krealloc+0x226/0xbe0
[   58.043473]  kunit_try_run_case+0x1a5/0x480
[   58.043659]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   58.043894]  kthread+0x337/0x6f0
[   58.044262]  ret_from_fork+0x116/0x1d0
[   58.044452]  ret_from_fork_asm+0x1a/0x30
[   58.044735] 
[   58.044854] CPU: 1 UID: 0 PID: 366 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250625 #1 PREEMPT(voluntary) 
[   58.045531] Tainted: [B]=BAD_PAGE, [N]=TEST
[   58.045724] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   58.046088] ==================================================================