Hay
Date
May 12, 2025, 11:48 a.m.

Environment
qemu-arm64
qemu-x86_64

[   49.847447] ==================================================================
[   49.847515] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   49.847515] 
[   49.847609] Use-after-free read at 0x00000000a2f1349e (in kfence-#171):
[   49.847663]  test_krealloc+0x51c/0x830
[   49.847708]  kunit_try_run_case+0x170/0x3f0
[   49.847752]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   49.847794]  kthread+0x328/0x630
[   49.847835]  ret_from_fork+0x10/0x20
[   49.847875] 
[   49.847899] kfence-#171: 0x00000000a2f1349e-0x000000004ed040c9, size=32, cache=kmalloc-32
[   49.847899] 
[   49.847953] allocated by task 337 on cpu 1 at 49.846600s (0.001349s ago):
[   49.848022]  test_alloc+0x29c/0x628
[   49.848075]  test_krealloc+0xc0/0x830
[   49.848113]  kunit_try_run_case+0x170/0x3f0
[   49.848151]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   49.848193]  kthread+0x328/0x630
[   49.848231]  ret_from_fork+0x10/0x20
[   49.848268] 
[   49.848292] freed by task 337 on cpu 1 at 49.846987s (0.001300s ago):
[   49.848351]  krealloc_noprof+0x148/0x360
[   49.848390]  test_krealloc+0x1dc/0x830
[   49.848427]  kunit_try_run_case+0x170/0x3f0
[   49.848463]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   49.848504]  kthread+0x328/0x630
[   49.848539]  ret_from_fork+0x10/0x20
[   49.848577] 
[   49.848623] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT 
[   49.848704] Tainted: [B]=BAD_PAGE, [N]=TEST
[   49.848735] Hardware name: linux,dummy-virt (DT)
[   49.848770] ==================================================================

[   54.610832] ==================================================================
[   54.611371] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   54.611371] 
[   54.612041] Use-after-free read at 0x(____ptrval____) (in kfence-#167):
[   54.612731]  test_krealloc+0x6fc/0xbe0
[   54.613134]  kunit_try_run_case+0x1a5/0x480
[   54.613554]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   54.614093]  kthread+0x337/0x6f0
[   54.614458]  ret_from_fork+0x116/0x1d0
[   54.614812]  ret_from_fork_asm+0x1a/0x30
[   54.615087] 
[   54.615346] kfence-#167: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   54.615346] 
[   54.616048] allocated by task 354 on cpu 1 at 54.609800s (0.006242s ago):
[   54.616469]  test_alloc+0x364/0x10f0
[   54.616970]  test_krealloc+0xad/0xbe0
[   54.617268]  kunit_try_run_case+0x1a5/0x480
[   54.617609]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   54.618037]  kthread+0x337/0x6f0
[   54.618221]  ret_from_fork+0x116/0x1d0
[   54.618711]  ret_from_fork_asm+0x1a/0x30
[   54.619085] 
[   54.619738] freed by task 354 on cpu 1 at 54.610347s (0.009384s ago):
[   54.620340]  krealloc_noprof+0x108/0x340
[   54.620751]  test_krealloc+0x226/0xbe0
[   54.621019]  kunit_try_run_case+0x1a5/0x480
[   54.621348]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   54.621869]  kthread+0x337/0x6f0
[   54.622160]  ret_from_fork+0x116/0x1d0
[   54.622385]  ret_from_fork_asm+0x1a/0x30
[   54.622705] 
[   54.623032] CPU: 1 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) 
[   54.623744] Tainted: [B]=BAD_PAGE, [N]=TEST
[   54.623994] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   54.624394] ==================================================================