Hay
Date
July 4, 2025, 11:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   63.459858] ==================================================================
[   63.459936] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   63.459936] 
[   63.460017] Use-after-free read at 0x0000000038701685 (in kfence-#189):
[   63.460070]  test_krealloc+0x51c/0x830
[   63.460118]  kunit_try_run_case+0x170/0x3f0
[   63.460165]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.460213]  kthread+0x328/0x630
[   63.460255]  ret_from_fork+0x10/0x20
[   63.460295] 
[   63.460321] kfence-#189: 0x0000000038701685-0x000000004d261e7d, size=32, cache=kmalloc-32
[   63.460321] 
[   63.460376] allocated by task 370 on cpu 1 at 63.459217s (0.001155s ago):
[   63.460447]  test_alloc+0x29c/0x628
[   63.460490]  test_krealloc+0xc0/0x830
[   63.460531]  kunit_try_run_case+0x170/0x3f0
[   63.460573]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.460619]  kthread+0x328/0x630
[   63.460654]  ret_from_fork+0x10/0x20
[   63.460692] 
[   63.460715] freed by task 370 on cpu 1 at 63.459471s (0.001241s ago):
[   63.460779]  krealloc_noprof+0x148/0x360
[   63.460824]  test_krealloc+0x1dc/0x830
[   63.460866]  kunit_try_run_case+0x170/0x3f0
[   63.460915]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.460960]  kthread+0x328/0x630
[   63.460996]  ret_from_fork+0x10/0x20
[   63.461035] 
[   63.461078] CPU: 1 UID: 0 PID: 370 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT 
[   63.461157] Tainted: [B]=BAD_PAGE, [N]=TEST
[   63.461188] Hardware name: linux,dummy-virt (DT)
[   63.461222] ==================================================================

[   62.486341] ==================================================================
[   62.487190] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   62.487190] 
[   62.488006] Use-after-free read at 0x(____ptrval____) (in kfence-#163):
[   62.489078]  test_krealloc+0x6fc/0xbe0
[   62.489247]  kunit_try_run_case+0x1a5/0x480
[   62.489420]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   62.489601]  kthread+0x337/0x6f0
[   62.489728]  ret_from_fork+0x116/0x1d0
[   62.489896]  ret_from_fork_asm+0x1a/0x30
[   62.490255] 
[   62.490435] kfence-#163: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   62.490435] 
[   62.491273] allocated by task 386 on cpu 1 at 62.485585s (0.005686s ago):
[   62.491907]  test_alloc+0x364/0x10f0
[   62.492251]  test_krealloc+0xad/0xbe0
[   62.492487]  kunit_try_run_case+0x1a5/0x480
[   62.492642]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   62.492823]  kthread+0x337/0x6f0
[   62.493133]  ret_from_fork+0x116/0x1d0
[   62.493484]  ret_from_fork_asm+0x1a/0x30
[   62.493819] 
[   62.493954] freed by task 386 on cpu 1 at 62.485861s (0.008090s ago):
[   62.494282]  krealloc_noprof+0x108/0x340
[   62.494486]  test_krealloc+0x226/0xbe0
[   62.494829]  kunit_try_run_case+0x1a5/0x480
[   62.495226]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   62.495524]  kthread+0x337/0x6f0
[   62.495649]  ret_from_fork+0x116/0x1d0
[   62.495784]  ret_from_fork_asm+0x1a/0x30
[   62.496059] 
[   62.496255] CPU: 1 UID: 0 PID: 386 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250704 #1 PREEMPT(voluntary) 
[   62.497312] Tainted: [B]=BAD_PAGE, [N]=TEST
[   62.497651] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   62.498088] ==================================================================