Hay
Date
July 20, 2025, 11:12 a.m.

Environment
qemu-arm64
qemu-x86_64

[   48.840101] ==================================================================
[   48.840157] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   48.840157] 
[   48.840247] Use-after-free read at 0x0000000084f60870 (in kfence-#148):
[   48.840297]  test_krealloc+0x51c/0x830
[   48.840344]  kunit_try_run_case+0x170/0x3f0
[   48.840402]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   48.840446]  kthread+0x328/0x630
[   48.840488]  ret_from_fork+0x10/0x20
[   48.840528] 
[   48.840553] kfence-#148: 0x0000000084f60870-0x0000000060432a82, size=32, cache=kmalloc-32
[   48.840553] 
[   48.840606] allocated by task 337 on cpu 1 at 48.839403s (0.001200s ago):
[   48.840688]  test_alloc+0x29c/0x628
[   48.840731]  test_krealloc+0xc0/0x830
[   48.840769]  kunit_try_run_case+0x170/0x3f0
[   48.840807]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   48.840851]  kthread+0x328/0x630
[   48.840887]  ret_from_fork+0x10/0x20
[   48.840927] 
[   48.840952] freed by task 337 on cpu 1 at 48.839689s (0.001259s ago):
[   48.841015]  krealloc_noprof+0x148/0x360
[   48.841055]  test_krealloc+0x1dc/0x830
[   48.841094]  kunit_try_run_case+0x170/0x3f0
[   48.841132]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   48.841176]  kthread+0x328/0x630
[   48.841210]  ret_from_fork+0x10/0x20
[   48.841250] 
[   48.841296] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   48.841374] Tainted: [B]=BAD_PAGE, [N]=TEST
[   48.841405] Hardware name: linux,dummy-virt (DT)
[   48.841441] ==================================================================

[   49.064285] ==================================================================
[   49.064762] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   49.064762] 
[   49.065120] Use-after-free read at 0x(____ptrval____) (in kfence-#132):
[   49.065396]  test_krealloc+0x6fc/0xbe0
[   49.065595]  kunit_try_run_case+0x1a5/0x480
[   49.066177]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.066428]  kthread+0x337/0x6f0
[   49.066587]  ret_from_fork+0x116/0x1d0
[   49.066738]  ret_from_fork_asm+0x1a/0x30
[   49.066957] 
[   49.067064] kfence-#132: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   49.067064] 
[   49.067424] allocated by task 355 on cpu 1 at 49.063665s (0.003756s ago):
[   49.068260]  test_alloc+0x364/0x10f0
[   49.068403]  test_krealloc+0xad/0xbe0
[   49.068798]  kunit_try_run_case+0x1a5/0x480
[   49.069001]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.069357]  kthread+0x337/0x6f0
[   49.069640]  ret_from_fork+0x116/0x1d0
[   49.069833]  ret_from_fork_asm+0x1a/0x30
[   49.070145] 
[   49.070233] freed by task 355 on cpu 1 at 49.063922s (0.006309s ago):
[   49.070520]  krealloc_noprof+0x108/0x340
[   49.070899]  test_krealloc+0x226/0xbe0
[   49.071088]  kunit_try_run_case+0x1a5/0x480
[   49.071419]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.071753]  kthread+0x337/0x6f0
[   49.071922]  ret_from_fork+0x116/0x1d0
[   49.072096]  ret_from_fork_asm+0x1a/0x30
[   49.072273] 
[   49.072391] CPU: 1 UID: 0 PID: 355 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   49.073134] Tainted: [B]=BAD_PAGE, [N]=TEST
[   49.073304] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   49.073866] ==================================================================