Hay
Date
July 1, 2025, 12:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   51.483975] ==================================================================
[   51.484035] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   51.484035] 
[   51.484112] Use-after-free read at 0x00000000c0597d49 (in kfence-#164):
[   51.484164]  test_krealloc+0x51c/0x830
[   51.484209]  kunit_try_run_case+0x170/0x3f0
[   51.484251]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.484296]  kthread+0x328/0x630
[   51.484334]  ret_from_fork+0x10/0x20
[   51.484374] 
[   51.484397] kfence-#164: 0x00000000c0597d49-0x00000000a1a639ed, size=32, cache=kmalloc-32
[   51.484397] 
[   51.484465] allocated by task 337 on cpu 1 at 51.483342s (0.001119s ago):
[   51.484533]  test_alloc+0x29c/0x628
[   51.484576]  test_krealloc+0xc0/0x830
[   51.484614]  kunit_try_run_case+0x170/0x3f0
[   51.484654]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.484699]  kthread+0x328/0x630
[   51.484735]  ret_from_fork+0x10/0x20
[   51.484773] 
[   51.484796] freed by task 337 on cpu 1 at 51.483566s (0.001227s ago):
[   51.484856]  krealloc_noprof+0x148/0x360
[   51.484897]  test_krealloc+0x1dc/0x830
[   51.484937]  kunit_try_run_case+0x170/0x3f0
[   51.484978]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.485023]  kthread+0x328/0x630
[   51.485061]  ret_from_fork+0x10/0x20
[   51.485101] 
[   51.485143] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   51.485220] Tainted: [B]=BAD_PAGE, [N]=TEST
[   51.485249] Hardware name: linux,dummy-virt (DT)
[   51.485284] ==================================================================

[   48.546002] ==================================================================
[   48.546400] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   48.546400] 
[   48.546809] Use-after-free read at 0x(____ptrval____) (in kfence-#136):
[   48.547063]  test_krealloc+0x6fc/0xbe0
[   48.547236]  kunit_try_run_case+0x1a5/0x480
[   48.547477]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.547661]  kthread+0x337/0x6f0
[   48.547851]  ret_from_fork+0x116/0x1d0
[   48.548036]  ret_from_fork_asm+0x1a/0x30
[   48.548182] 
[   48.548272] kfence-#136: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   48.548272] 
[   48.548824] allocated by task 354 on cpu 1 at 48.545368s (0.003454s ago):
[   48.549051]  test_alloc+0x364/0x10f0
[   48.549237]  test_krealloc+0xad/0xbe0
[   48.549428]  kunit_try_run_case+0x1a5/0x480
[   48.549611]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.549836]  kthread+0x337/0x6f0
[   48.549959]  ret_from_fork+0x116/0x1d0
[   48.550147]  ret_from_fork_asm+0x1a/0x30
[   48.550362] 
[   48.550455] freed by task 354 on cpu 1 at 48.545636s (0.004817s ago):
[   48.550735]  krealloc_noprof+0x108/0x340
[   48.550916]  test_krealloc+0x226/0xbe0
[   48.551092]  kunit_try_run_case+0x1a5/0x480
[   48.551276]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   48.551528]  kthread+0x337/0x6f0
[   48.551702]  ret_from_fork+0x116/0x1d0
[   48.551887]  ret_from_fork_asm+0x1a/0x30
[   48.552067] 
[   48.552188] CPU: 1 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   48.552626] Tainted: [B]=BAD_PAGE, [N]=TEST
[   48.552814] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   48.553172] ==================================================================