Hay
Date
July 3, 2025, 10:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   67.085413] ==================================================================
[   67.085485] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   67.085485] 
[   67.085576] Use-after-free read at 0x00000000b8f16c48 (in kfence-#215):
[   67.085629]  test_krealloc+0x51c/0x830
[   67.085674]  kunit_try_run_case+0x170/0x3f0
[   67.085723]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   67.085772]  kthread+0x328/0x630
[   67.085813]  ret_from_fork+0x10/0x20
[   67.085869] 
[   67.085896] kfence-#215: 0x00000000b8f16c48-0x000000005f870872, size=32, cache=kmalloc-32
[   67.085896] 
[   67.085955] allocated by task 369 on cpu 0 at 67.084719s (0.001232s ago):
[   67.086026]  test_alloc+0x29c/0x628
[   67.086066]  test_krealloc+0xc0/0x830
[   67.086106]  kunit_try_run_case+0x170/0x3f0
[   67.086149]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   67.086194]  kthread+0x328/0x630
[   67.086229]  ret_from_fork+0x10/0x20
[   67.086271] 
[   67.086294] freed by task 369 on cpu 0 at 67.085021s (0.001269s ago):
[   67.086357]  krealloc_noprof+0x148/0x360
[   67.086398]  test_krealloc+0x1dc/0x830
[   67.086438]  kunit_try_run_case+0x170/0x3f0
[   67.086481]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   67.086527]  kthread+0x328/0x630
[   67.086562]  ret_from_fork+0x10/0x20
[   67.086602] 
[   67.086650] CPU: 0 UID: 0 PID: 369 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT 
[   67.086730] Tainted: [B]=BAD_PAGE, [N]=TEST
[   67.086759] Hardware name: linux,dummy-virt (DT)
[   67.086795] ==================================================================

[   59.522084] ==================================================================
[   59.522471] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   59.522471] 
[   59.523114] Use-after-free read at 0x(____ptrval____) (in kfence-#156):
[   59.523325]  test_krealloc+0x6fc/0xbe0
[   59.523683]  kunit_try_run_case+0x1a5/0x480
[   59.524133]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   59.524391]  kthread+0x337/0x6f0
[   59.524556]  ret_from_fork+0x116/0x1d0
[   59.524720]  ret_from_fork_asm+0x1a/0x30
[   59.524900] 
[   59.524973] kfence-#156: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   59.524973] 
[   59.525793] allocated by task 386 on cpu 1 at 59.521410s (0.004380s ago):
[   59.526102]  test_alloc+0x364/0x10f0
[   59.526346]  test_krealloc+0xad/0xbe0
[   59.526521]  kunit_try_run_case+0x1a5/0x480
[   59.526721]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   59.526907]  kthread+0x337/0x6f0
[   59.527070]  ret_from_fork+0x116/0x1d0
[   59.527216]  ret_from_fork_asm+0x1a/0x30
[   59.527467] 
[   59.527558] freed by task 386 on cpu 1 at 59.521708s (0.005848s ago):
[   59.527803]  krealloc_noprof+0x108/0x340
[   59.527949]  test_krealloc+0x226/0xbe0
[   59.528131]  kunit_try_run_case+0x1a5/0x480
[   59.528347]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   59.528543]  kthread+0x337/0x6f0
[   59.528710]  ret_from_fork+0x116/0x1d0
[   59.528894]  ret_from_fork_asm+0x1a/0x30
[   59.529062] 
[   59.529168] CPU: 1 UID: 0 PID: 386 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4-next-20250703 #1 PREEMPT(voluntary) 
[   59.529546] Tainted: [B]=BAD_PAGE, [N]=TEST
[   59.529743] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   59.530139] ==================================================================