Hay
Date
July 8, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   53.296529] ==================================================================
[   53.296603] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   53.296603] 
[   53.296681] Use-after-free read at 0x0000000012e1d9f1 (in kfence-#153):
[   53.296732]  test_krealloc+0x51c/0x830
[   53.296776]  kunit_try_run_case+0x170/0x3f0
[   53.296820]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   53.296865]  kthread+0x328/0x630
[   53.296905]  ret_from_fork+0x10/0x20
[   53.296945] 
[   53.296969] kfence-#153: 0x0000000012e1d9f1-0x00000000567a45a8, size=32, cache=kmalloc-32
[   53.296969] 
[   53.297025] allocated by task 337 on cpu 1 at 53.295905s (0.001116s ago):
[   53.297090]  test_alloc+0x29c/0x628
[   53.297131]  test_krealloc+0xc0/0x830
[   53.297186]  kunit_try_run_case+0x170/0x3f0
[   53.297226]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   53.297270]  kthread+0x328/0x630
[   53.297305]  ret_from_fork+0x10/0x20
[   53.297344] 
[   53.297366] freed by task 337 on cpu 1 at 53.296122s (0.001241s ago):
[   53.297428]  krealloc_noprof+0x148/0x360
[   53.297468]  test_krealloc+0x1dc/0x830
[   53.297508]  kunit_try_run_case+0x170/0x3f0
[   53.297548]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   53.297593]  kthread+0x328/0x630
[   53.297628]  ret_from_fork+0x10/0x20
[   53.297667] 
[   53.297708] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT 
[   53.297783] Tainted: [B]=BAD_PAGE, [N]=TEST
[   53.297812] Hardware name: linux,dummy-virt (DT)
[   53.297848] ==================================================================

[   49.202096] ==================================================================
[   49.202565] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   49.202565] 
[   49.202937] Use-after-free read at 0x(____ptrval____) (in kfence-#129):
[   49.203309]  test_krealloc+0x6fc/0xbe0
[   49.203457]  kunit_try_run_case+0x1a5/0x480
[   49.203807]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.204071]  kthread+0x337/0x6f0
[   49.204227]  ret_from_fork+0x116/0x1d0
[   49.204400]  ret_from_fork_asm+0x1a/0x30
[   49.204543] 
[   49.204616] kfence-#129: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   49.204616] 
[   49.205678] allocated by task 355 on cpu 1 at 49.201328s (0.004346s ago):
[   49.206249]  test_alloc+0x364/0x10f0
[   49.206434]  test_krealloc+0xad/0xbe0
[   49.206816]  kunit_try_run_case+0x1a5/0x480
[   49.207228]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.207500]  kthread+0x337/0x6f0
[   49.207775]  ret_from_fork+0x116/0x1d0
[   49.207963]  ret_from_fork_asm+0x1a/0x30
[   49.208153] 
[   49.208238] freed by task 355 on cpu 1 at 49.201572s (0.006664s ago):
[   49.208782]  krealloc_noprof+0x108/0x340
[   49.209073]  test_krealloc+0x226/0xbe0
[   49.209253]  kunit_try_run_case+0x1a5/0x480
[   49.209439]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.209736]  kthread+0x337/0x6f0
[   49.210231]  ret_from_fork+0x116/0x1d0
[   49.210429]  ret_from_fork_asm+0x1a/0x30
[   49.210674] 
[   49.210794] CPU: 1 UID: 0 PID: 355 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc5 #1 PREEMPT(voluntary) 
[   49.211252] Tainted: [B]=BAD_PAGE, [N]=TEST
[   49.211439] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   49.212094] ==================================================================