Hay
Date
July 6, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   50.698597] ==================================================================
[   50.698666] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   50.698666] 
[   50.698748] Use-after-free read at 0x0000000012362a2f (in kfence-#146):
[   50.698799]  test_krealloc+0x51c/0x830
[   50.698843]  kunit_try_run_case+0x170/0x3f0
[   50.698888]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.698934]  kthread+0x328/0x630
[   50.698973]  ret_from_fork+0x10/0x20
[   50.699014] 
[   50.699036] kfence-#146: 0x0000000012362a2f-0x0000000058de5283, size=32, cache=kmalloc-32
[   50.699036] 
[   50.699089] allocated by task 337 on cpu 1 at 50.697858s (0.001227s ago):
[   50.699155]  test_alloc+0x29c/0x628
[   50.699210]  test_krealloc+0xc0/0x830
[   50.699253]  kunit_try_run_case+0x170/0x3f0
[   50.699295]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.699339]  kthread+0x328/0x630
[   50.699373]  ret_from_fork+0x10/0x20
[   50.699411] 
[   50.699435] freed by task 337 on cpu 1 at 50.698182s (0.001249s ago):
[   50.699494]  krealloc_noprof+0x148/0x360
[   50.699534]  test_krealloc+0x1dc/0x830
[   50.699573]  kunit_try_run_case+0x170/0x3f0
[   50.699613]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.699656]  kthread+0x328/0x630
[   50.699692]  ret_from_fork+0x10/0x20
[   50.699730] 
[   50.699772] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   50.699847] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.699876] Hardware name: linux,dummy-virt (DT)
[   50.699911] ==================================================================

[   49.689403] ==================================================================
[   49.689800] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   49.689800] 
[   49.690248] Use-after-free read at 0x(____ptrval____) (in kfence-#146):
[   49.690496]  test_krealloc+0x6fc/0xbe0
[   49.690797]  kunit_try_run_case+0x1a5/0x480
[   49.691011]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.691198]  kthread+0x337/0x6f0
[   49.691377]  ret_from_fork+0x116/0x1d0
[   49.691573]  ret_from_fork_asm+0x1a/0x30
[   49.691778] 
[   49.691881] kfence-#146: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   49.691881] 
[   49.692343] allocated by task 354 on cpu 1 at 49.688797s (0.003544s ago):
[   49.692598]  test_alloc+0x364/0x10f0
[   49.692732]  test_krealloc+0xad/0xbe0
[   49.692862]  kunit_try_run_case+0x1a5/0x480
[   49.693083]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.693586]  kthread+0x337/0x6f0
[   49.693785]  ret_from_fork+0x116/0x1d0
[   49.693993]  ret_from_fork_asm+0x1a/0x30
[   49.694339] 
[   49.694573] freed by task 354 on cpu 1 at 49.689031s (0.005539s ago):
[   49.694979]  krealloc_noprof+0x108/0x340
[   49.695622]  test_krealloc+0x226/0xbe0
[   49.695810]  kunit_try_run_case+0x1a5/0x480
[   49.696016]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.696271]  kthread+0x337/0x6f0
[   49.696436]  ret_from_fork+0x116/0x1d0
[   49.696621]  ret_from_fork_asm+0x1a/0x30
[   49.696829] 
[   49.696963] CPU: 1 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   49.697445] Tainted: [B]=BAD_PAGE, [N]=TEST
[   49.697644] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   49.698061] ==================================================================