Hay
Date
July 16, 2025, 3:10 p.m.

Environment
qemu-arm64
qemu-x86_64

[   50.624793] ==================================================================
[   50.624883] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   50.624883] 
[   50.624987] Use-after-free read at 0x00000000b2254015 (in kfence-#155):
[   50.625043]  test_krealloc+0x51c/0x830
[   50.625089]  kunit_try_run_case+0x170/0x3f0
[   50.625134]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.625179]  kthread+0x328/0x630
[   50.625220]  ret_from_fork+0x10/0x20
[   50.625260] 
[   50.625283] kfence-#155: 0x00000000b2254015-0x00000000e6133d11, size=32, cache=kmalloc-32
[   50.625283] 
[   50.625338] allocated by task 337 on cpu 0 at 50.624100s (0.001234s ago):
[   50.625409]  test_alloc+0x29c/0x628
[   50.625448]  test_krealloc+0xc0/0x830
[   50.625487]  kunit_try_run_case+0x170/0x3f0
[   50.625528]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.625571]  kthread+0x328/0x630
[   50.625607]  ret_from_fork+0x10/0x20
[   50.625646] 
[   50.625671] freed by task 337 on cpu 0 at 50.624346s (0.001320s ago):
[   50.625742]  krealloc_noprof+0x148/0x360
[   50.625783]  test_krealloc+0x1dc/0x830
[   50.625822]  kunit_try_run_case+0x170/0x3f0
[   50.625861]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.625905]  kthread+0x328/0x630
[   50.625941]  ret_from_fork+0x10/0x20
[   50.625979] 
[   50.626029] CPU: 0 UID: 0 PID: 337 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   50.626111] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.626142] Hardware name: linux,dummy-virt (DT)
[   50.626177] ==================================================================

[   49.828989] ==================================================================
[   49.829402] BUG: KFENCE: use-after-free read in test_krealloc+0x6fc/0xbe0
[   49.829402] 
[   49.829892] Use-after-free read at 0x(____ptrval____) (in kfence-#143):
[   49.830140]  test_krealloc+0x6fc/0xbe0
[   49.830328]  kunit_try_run_case+0x1a5/0x480
[   49.830567]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.830811]  kthread+0x337/0x6f0
[   49.830948]  ret_from_fork+0x116/0x1d0
[   49.831143]  ret_from_fork_asm+0x1a/0x30
[   49.831324] 
[   49.831399] kfence-#143: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   49.831399] 
[   49.831907] allocated by task 354 on cpu 1 at 49.828296s (0.003609s ago):
[   49.832215]  test_alloc+0x364/0x10f0
[   49.832382]  test_krealloc+0xad/0xbe0
[   49.832610]  kunit_try_run_case+0x1a5/0x480
[   49.832906]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.833093]  kthread+0x337/0x6f0
[   49.833247]  ret_from_fork+0x116/0x1d0
[   49.833440]  ret_from_fork_asm+0x1a/0x30
[   49.833729] 
[   49.833819] freed by task 354 on cpu 1 at 49.828578s (0.005239s ago):
[   49.834096]  krealloc_noprof+0x108/0x340
[   49.834260]  test_krealloc+0x226/0xbe0
[   49.834451]  kunit_try_run_case+0x1a5/0x480
[   49.834648]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   49.834893]  kthread+0x337/0x6f0
[   49.835062]  ret_from_fork+0x116/0x1d0
[   49.835222]  ret_from_fork_asm+0x1a/0x30
[   49.835429] 
[   49.835529] CPU: 1 UID: 0 PID: 354 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   49.835955] Tainted: [B]=BAD_PAGE, [N]=TEST
[   49.836159] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   49.836538] ==================================================================