Hay
Date
Dec. 4, 2024, 3:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   67.843518] ==================================================================
[   67.844370] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   67.844370] 
[   67.845184] Use-after-free read at 0x0000000075c59714 (in kfence-#207):
[   67.845942]  test_krealloc+0x51c/0x830
[   67.846510]  test_krealloc+0x458/0x830
[   67.847220]  kunit_try_run_case+0x14c/0x3d0
[   67.847849]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   67.848667]  kthread+0x24c/0x2d0
[   67.849297]  ret_from_fork+0x10/0x20
[   67.849972] 
[   67.850299] kfence-#207: 0x0000000075c59714-0x0000000098de6172, size=32, cache=kmalloc-32
[   67.850299] 
[   67.851431] allocated by task 325 on cpu 0 at 67.842490s (0.008930s ago):
[   67.852432]  test_alloc+0x298/0x620
[   67.852967]  test_krealloc+0xc0/0x830
[   67.853655]  kunit_try_run_case+0x14c/0x3d0
[   67.854428]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   67.855211]  kthread+0x24c/0x2d0
[   67.855816]  ret_from_fork+0x10/0x20
[   67.856459] 
[   67.856785] freed by task 325 on cpu 0 at 67.842890s (0.013884s ago):
[   67.857803]  krealloc_noprof+0x148/0x360
[   67.858376]  test_krealloc+0x1dc/0x830
[   67.859030]  kunit_try_run_case+0x14c/0x3d0
[   67.859668]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   67.860257]  kthread+0x24c/0x2d0
[   67.860871]  ret_from_fork+0x10/0x20
[   67.861397] 
[   67.861806] CPU: 0 UID: 0 PID: 325 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241204 #1
[   67.863073] Tainted: [B]=BAD_PAGE, [N]=TEST
[   67.863532] Hardware name: linux,dummy-virt (DT)
[   67.864258] ==================================================================

[   63.481139] ==================================================================
[   63.481902] BUG: KFENCE: use-after-free read in test_krealloc+0x6fd/0xbe0
[   63.481902] 
[   63.482594] Use-after-free read at 0x(____ptrval____) (in kfence-#184):
[   63.483342]  test_krealloc+0x6fd/0xbe0
[   63.483772]  kunit_try_run_case+0x1b3/0x490
[   63.484355]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.484888]  kthread+0x257/0x310
[   63.485365]  ret_from_fork+0x41/0x80
[   63.485891]  ret_from_fork_asm+0x1a/0x30
[   63.486484] 
[   63.486663] kfence-#184: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   63.486663] 
[   63.487647] allocated by task 345 on cpu 0 at 63.480005s (0.007637s ago):
[   63.488483]  test_alloc+0x35f/0x10d0
[   63.488875]  test_krealloc+0xae/0xbe0
[   63.489299]  kunit_try_run_case+0x1b3/0x490
[   63.489797]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.490378]  kthread+0x257/0x310
[   63.490812]  ret_from_fork+0x41/0x80
[   63.491177]  ret_from_fork_asm+0x1a/0x30
[   63.491466] 
[   63.491767] freed by task 345 on cpu 0 at 63.480536s (0.011227s ago):
[   63.492852]  krealloc_noprof+0x108/0x340
[   63.493521]  test_krealloc+0x227/0xbe0
[   63.493933]  kunit_try_run_case+0x1b3/0x490
[   63.494471]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.495062]  kthread+0x257/0x310
[   63.495394]  ret_from_fork+0x41/0x80
[   63.496029]  ret_from_fork_asm+0x1a/0x30
[   63.496435] 
[   63.496634] CPU: 0 UID: 0 PID: 345 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241204 #1
[   63.497620] Tainted: [B]=BAD_PAGE, [N]=TEST
[   63.498394] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   63.499312] ==================================================================