Hay
Date
June 20, 2025, 12:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   66.004868] ==================================================================
[   66.005334] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   66.005334] 
[   66.005483] Use-after-free read at 0x000000000499f380 (in kfence-#210):
[   66.005554]  test_krealloc+0x51c/0x830
[   66.005635]  kunit_try_run_case+0x170/0x3f0
[   66.005700]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   66.005754]  kthread+0x328/0x630
[   66.005799]  ret_from_fork+0x10/0x20
[   66.005846] 
[   66.005878] kfence-#210: 0x000000000499f380-0x000000005342d898, size=32, cache=kmalloc-32
[   66.005878] 
[   66.005944] allocated by task 348 on cpu 1 at 66.001688s (0.004251s ago):
[   66.006030]  test_alloc+0x29c/0x628
[   66.006079]  test_krealloc+0xc0/0x830
[   66.006123]  kunit_try_run_case+0x170/0x3f0
[   66.006169]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   66.006219]  kthread+0x328/0x630
[   66.006261]  ret_from_fork+0x10/0x20
[   66.006306] 
[   66.006334] freed by task 348 on cpu 1 at 66.002507s (0.003823s ago):
[   66.006403]  krealloc_noprof+0x148/0x360
[   66.006448]  test_krealloc+0x1dc/0x830
[   66.006493]  kunit_try_run_case+0x170/0x3f0
[   66.006536]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   66.006585]  kthread+0x328/0x630
[   66.006640]  ret_from_fork+0x10/0x20
[   66.006687] 
[   66.006743] CPU: 1 UID: 0 PID: 348 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT 
[   66.006838] Tainted: [B]=BAD_PAGE, [N]=TEST
[   66.006873] Hardware name: linux,dummy-virt (DT)
[   66.007106] ==================================================================

[   62.469951] ==================================================================
[   62.470545] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   62.470545] 
[   62.470895] Use-after-free read at 0x(____ptrval____) (in kfence-#164):
[   62.471258]  test_krealloc+0x6fc/0xbe0
[   62.471595]  kunit_try_run_case+0x1a5/0x480
[   62.471863]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   62.472063]  kthread+0x337/0x6f0
[   62.472227]  ret_from_fork+0x116/0x1d0
[   62.472614]  ret_from_fork_asm+0x1a/0x30
[   62.472952] 
[   62.473130] kfence-#164: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   62.473130] 
[   62.473904] allocated by task 366 on cpu 1 at 62.468322s (0.005576s ago):
[   62.474261]  test_alloc+0x364/0x10f0
[   62.474464]  test_krealloc+0xad/0xbe0
[   62.474697]  kunit_try_run_case+0x1a5/0x480
[   62.475035]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   62.475764]  kthread+0x337/0x6f0
[   62.476142]  ret_from_fork+0x116/0x1d0
[   62.476490]  ret_from_fork_asm+0x1a/0x30
[   62.476690] 
[   62.476798] freed by task 366 on cpu 1 at 62.468842s (0.007951s ago):
[   62.477403]  krealloc_noprof+0x108/0x340
[   62.477769]  test_krealloc+0x226/0xbe0
[   62.478098]  kunit_try_run_case+0x1a5/0x480
[   62.478340]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   62.478679]  kthread+0x337/0x6f0
[   62.478916]  ret_from_fork+0x116/0x1d0
[   62.479186]  ret_from_fork_asm+0x1a/0x30
[   62.479378] 
[   62.479558] CPU: 1 UID: 0 PID: 366 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250620 #1 PREEMPT(voluntary) 
[   62.480018] Tainted: [B]=BAD_PAGE, [N]=TEST
[   62.480301] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   62.481031] ==================================================================