Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   52.920702] ==================================================================
[   52.920795] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   52.920795] 
[   52.920896] Use-after-free read at 0x000000004947fa2f (in kfence-#164):
[   52.920953]  test_krealloc+0x51c/0x830
[   52.920999]  kunit_try_run_case+0x170/0x3f0
[   52.921047]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   52.921094]  kthread+0x328/0x630
[   52.921148]  ret_from_fork+0x10/0x20
[   52.921189] 
[   52.921215] kfence-#164: 0x000000004947fa2f-0x0000000080ec4d09, size=32, cache=kmalloc-32
[   52.921215] 
[   52.921273] allocated by task 338 on cpu 1 at 52.920011s (0.001258s ago):
[   52.921361]  test_alloc+0x29c/0x628
[   52.921403]  test_krealloc+0xc0/0x830
[   52.921442]  kunit_try_run_case+0x170/0x3f0
[   52.921483]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   52.921528]  kthread+0x328/0x630
[   52.921565]  ret_from_fork+0x10/0x20
[   52.921606] 
[   52.921629] freed by task 338 on cpu 1 at 52.920290s (0.001336s ago):
[   52.921693]  krealloc_noprof+0x148/0x360
[   52.921734]  test_krealloc+0x1dc/0x830
[   52.921774]  kunit_try_run_case+0x170/0x3f0
[   52.921815]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   52.921860]  kthread+0x328/0x630
[   52.921897]  ret_from_fork+0x10/0x20
[   52.921937] 
[   52.921987] CPU: 1 UID: 0 PID: 338 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   52.922071] Tainted: [B]=BAD_PAGE, [N]=TEST
[   52.922101] Hardware name: linux,dummy-virt (DT)
[   52.922151] ==================================================================

[   48.961921] ==================================================================
[   48.962343] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   48.962343] 
[   48.962765] Use-after-free read at 0x(____ptrval____) (in kfence-#141):
[   48.963019]  test_krealloc+0x6fc/0xbe0
[   48.963227]  kunit_try_run_case+0x1a5/0x480
[   48.963441]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.963678]  kthread+0x337/0x6f0
[   48.963808]  ret_from_fork+0x116/0x1d0
[   48.963945]  ret_from_fork_asm+0x1a/0x30
[   48.964147] 
[   48.964250] kfence-#141: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   48.964250] 
[   48.964701] allocated by task 354 on cpu 1 at 48.961294s (0.003405s ago):
[   48.965056]  test_alloc+0x364/0x10f0
[   48.965224]  test_krealloc+0xad/0xbe0
[   48.965393]  kunit_try_run_case+0x1a5/0x480
[   48.965555]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.965794]  kthread+0x337/0x6f0
[   48.965966]  ret_from_fork+0x116/0x1d0
[   48.966153]  ret_from_fork_asm+0x1a/0x30
[   48.966328] 
[   48.966442] freed by task 354 on cpu 1 at 48.961550s (0.004889s ago):
[   48.966746]  krealloc_noprof+0x108/0x340
[   48.966896]  test_krealloc+0x226/0xbe0
[   48.967029]  kunit_try_run_case+0x1a5/0x480
[   48.967183]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.967448]  kthread+0x337/0x6f0
[   48.967614]  ret_from_fork+0x116/0x1d0
[   48.967895]  ret_from_fork_asm+0x1a/0x30
[   48.968090] 
[   48.968193] CPU: 1 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   48.968567] Tainted: [B]=BAD_PAGE, [N]=TEST
[   48.968954] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   48.969351] ==================================================================