Hay
Date
July 3, 2025, 11:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   54.143311] ==================================================================
[   54.143392] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   54.143392] 
[   54.143495] Use-after-free read at 0x000000002a30b137 (in kfence-#180):
[   54.143551]  test_krealloc+0x51c/0x830
[   54.143601]  kunit_try_run_case+0x170/0x3f0
[   54.143650]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.143696]  kthread+0x328/0x630
[   54.143735]  ret_from_fork+0x10/0x20
[   54.143777] 
[   54.143803] kfence-#180: 0x000000002a30b137-0x00000000ac83b306, size=32, cache=kmalloc-32
[   54.143803] 
[   54.143860] allocated by task 337 on cpu 1 at 54.142447s (0.001408s ago):
[   54.143934]  test_alloc+0x29c/0x628
[   54.143979]  test_krealloc+0xc0/0x830
[   54.144018]  kunit_try_run_case+0x170/0x3f0
[   54.144077]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.144120]  kthread+0x328/0x630
[   54.144190]  ret_from_fork+0x10/0x20
[   54.144230] 
[   54.144255] freed by task 337 on cpu 1 at 54.142844s (0.001407s ago):
[   54.144320]  krealloc_noprof+0x148/0x360
[   54.144360]  test_krealloc+0x1dc/0x830
[   54.144400]  kunit_try_run_case+0x170/0x3f0
[   54.144439]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   54.144491]  kthread+0x328/0x630
[   54.144538]  ret_from_fork+0x10/0x20
[   54.144584] 
[   54.144640] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   54.144722] Tainted: [B]=BAD_PAGE, [N]=TEST
[   54.144754] Hardware name: linux,dummy-virt (DT)
[   54.144794] ==================================================================

[   47.226255] ==================================================================
[   47.226636] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   47.226636] 
[   47.227004] Use-after-free read at 0x(____ptrval____) (in kfence-#126):
[   47.227277]  test_krealloc+0x6fc/0xbe0
[   47.227833]  kunit_try_run_case+0x1a5/0x480
[   47.228018]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.228541]  kthread+0x337/0x6f0
[   47.228720]  ret_from_fork+0x116/0x1d0
[   47.228889]  ret_from_fork_asm+0x1a/0x30
[   47.229082] 
[   47.229423] kfence-#126: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   47.229423] 
[   47.229913] allocated by task 355 on cpu 1 at 47.225628s (0.004283s ago):
[   47.230395]  test_alloc+0x364/0x10f0
[   47.230650]  test_krealloc+0xad/0xbe0
[   47.230803]  kunit_try_run_case+0x1a5/0x480
[   47.231142]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.231408]  kthread+0x337/0x6f0
[   47.231699]  ret_from_fork+0x116/0x1d0
[   47.231886]  ret_from_fork_asm+0x1a/0x30
[   47.232066] 
[   47.232304] freed by task 355 on cpu 1 at 47.225883s (0.006418s ago):
[   47.232710]  krealloc_noprof+0x108/0x340
[   47.232974]  test_krealloc+0x226/0xbe0
[   47.233148]  kunit_try_run_case+0x1a5/0x480
[   47.233364]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.233719]  kthread+0x337/0x6f0
[   47.233888]  ret_from_fork+0x116/0x1d0
[   47.234057]  ret_from_fork_asm+0x1a/0x30
[   47.234479] 
[   47.234609] CPU: 1 UID: 0 PID: 355 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   47.235128] Tainted: [B]=BAD_PAGE, [N]=TEST
[   47.235332] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   47.235880] ==================================================================