Hay
Date
May 26, 2025, 9:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   51.800025] ==================================================================
[   51.800143] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   51.800143] 
[   51.800257] Use-after-free read at 0x00000000456a4f77 (in kfence-#172):
[   51.800334]  test_krealloc+0x51c/0x830
[   51.800390]  kunit_try_run_case+0x170/0x3f0
[   51.800449]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.800506]  kthread+0x328/0x630
[   51.800549]  ret_from_fork+0x10/0x20
[   51.800593] 
[   51.800625] kfence-#172: 0x00000000456a4f77-0x00000000d1cf39cf, size=32, cache=kmalloc-32
[   51.800625] 
[   51.800688] allocated by task 337 on cpu 1 at 51.799255s (0.001428s ago):
[   51.800764]  test_alloc+0x29c/0x628
[   51.800804]  test_krealloc+0xc0/0x830
[   51.800844]  kunit_try_run_case+0x170/0x3f0
[   51.800885]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.800929]  kthread+0x328/0x630
[   51.800965]  ret_from_fork+0x10/0x20
[   51.801004] 
[   51.801029] freed by task 337 on cpu 1 at 51.799584s (0.001441s ago):
[   51.801091]  krealloc_noprof+0x148/0x360
[   51.801130]  test_krealloc+0x1dc/0x830
[   51.801168]  kunit_try_run_case+0x170/0x3f0
[   51.801207]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   51.801249]  kthread+0x328/0x630
[   51.801284]  ret_from_fork+0x10/0x20
[   51.801332] 
[   51.801378] CPU: 1 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7-next-20250526 #1 PREEMPT 
[   51.801461] Tainted: [B]=BAD_PAGE, [N]=TEST
[   51.801493] Hardware name: linux,dummy-virt (DT)
[   51.801527] ==================================================================


[   47.499900] ==================================================================
[   47.500288] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   47.500288] 
[   47.500898] Use-after-free read at 0x(____ptrval____) (in kfence-#133):
[   47.501209]  test_krealloc+0x6fc/0xbe0
[   47.501427]  kunit_try_run_case+0x1a5/0x480
[   47.501639]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.502393]  kthread+0x337/0x6f0
[   47.502554]  ret_from_fork+0x116/0x1d0
[   47.502923]  ret_from_fork_asm+0x1a/0x30
[   47.503306] 
[   47.503518] kfence-#133: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   47.503518] 
[   47.504009] allocated by task 355 on cpu 0 at 47.499261s (0.004746s ago):
[   47.504481]  test_alloc+0x364/0x10f0
[   47.504671]  test_krealloc+0xad/0xbe0
[   47.505040]  kunit_try_run_case+0x1a5/0x480
[   47.505384]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.505717]  kthread+0x337/0x6f0
[   47.505914]  ret_from_fork+0x116/0x1d0
[   47.506221]  ret_from_fork_asm+0x1a/0x30
[   47.506446] 
[   47.506542] freed by task 355 on cpu 0 at 47.499537s (0.007003s ago):
[   47.507123]  krealloc_noprof+0x108/0x340
[   47.507304]  test_krealloc+0x226/0xbe0
[   47.507654]  kunit_try_run_case+0x1a5/0x480
[   47.507972]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   47.508221]  kthread+0x337/0x6f0
[   47.508522]  ret_from_fork+0x116/0x1d0
[   47.508803]  ret_from_fork_asm+0x1a/0x30
[   47.509012] 
[   47.509313] CPU: 0 UID: 0 PID: 355 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7-next-20250526 #1 PREEMPT(voluntary) 
[   47.509850] Tainted: [B]=BAD_PAGE, [N]=TEST
[   47.510155] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   47.510561] ==================================================================