Hay
Date
June 18, 2025, 6:43 a.m.

Environment
qemu-arm64
qemu-x86_64

[   54.627419] ==================================================================
[   54.627537] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   54.627537] 
[   54.627647] Use-after-free read at 0x00000000bf2479c0 (in kfence-#185):
[   54.627705]  test_krealloc+0x51c/0x830
[   54.627756]  kunit_try_run_case+0x170/0x3f0
[   54.627803]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.627849]  kthread+0x328/0x630
[   54.627888]  ret_from_fork+0x10/0x20
[   54.627932] 
[   54.627958] kfence-#185: 0x00000000bf2479c0-0x000000006d64db30, size=32, cache=kmalloc-32
[   54.627958] 
[   54.628031] allocated by task 347 on cpu 0 at 54.626679s (0.001335s ago):
[   54.628116]  test_alloc+0x29c/0x628
[   54.628162]  test_krealloc+0xc0/0x830
[   54.628204]  kunit_try_run_case+0x170/0x3f0
[   54.628248]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.628298]  kthread+0x328/0x630
[   54.628348]  ret_from_fork+0x10/0x20
[   54.628395] 
[   54.628423] freed by task 347 on cpu 0 at 54.626957s (0.001462s ago):
[   54.628493]  krealloc_noprof+0x148/0x360
[   54.628547]  test_krealloc+0x1dc/0x830
[   54.628593]  kunit_try_run_case+0x170/0x3f0
[   54.628639]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.628688]  kthread+0x328/0x630
[   54.628727]  ret_from_fork+0x10/0x20
[   54.628769] 
[   54.628819] CPU: 0 UID: 0 PID: 347 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc2-next-20250618 #1 PREEMPT 
[   54.628915] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   54.628950] Hardware name: linux,dummy-virt (DT)
[   54.628990] ==================================================================

[   46.602661] ==================================================================
[   46.603114] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   46.603114] 
[   46.603598] Use-after-free read at 0x(____ptrval____) (in kfence-#126):
[   46.603861]  test_krealloc+0x6fc/0xbe0
[   46.604044]  kunit_try_run_case+0x1a5/0x480
[   46.604244]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   46.604921]  kthread+0x337/0x6f0
[   46.605289]  ret_from_fork+0x116/0x1d0
[   46.605466]  ret_from_fork_asm+0x1a/0x30
[   46.605639] 
[   46.605708] kfence-#126: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   46.605708] 
[   46.606111] allocated by task 363 on cpu 0 at 46.601931s (0.004177s ago):
[   46.606750]  test_alloc+0x364/0x10f0
[   46.606907]  test_krealloc+0xad/0xbe0
[   46.607161]  kunit_try_run_case+0x1a5/0x480
[   46.607484]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   46.607783]  kthread+0x337/0x6f0
[   46.607948]  ret_from_fork+0x116/0x1d0
[   46.608273]  ret_from_fork_asm+0x1a/0x30
[   46.608531] 
[   46.608615] freed by task 363 on cpu 0 at 46.602154s (0.006458s ago):
[   46.608982]  krealloc_noprof+0x108/0x340
[   46.609146]  test_krealloc+0x226/0xbe0
[   46.609490]  kunit_try_run_case+0x1a5/0x480
[   46.609684]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   46.609901]  kthread+0x337/0x6f0
[   46.610040]  ret_from_fork+0x116/0x1d0
[   46.610393]  ret_from_fork_asm+0x1a/0x30
[   46.610568] 
[   46.610810] CPU: 0 UID: 0 PID: 363 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc2-next-20250618 #1 PREEMPT(voluntary) 
[   46.611480] Tainted: [B]=BAD_PAGE, [N]=TEST
[   46.611740] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   46.612256] ==================================================================