Hay
Date
Nov. 27, 2024, 3:37 a.m.

Environment
qemu-arm64
qemu-x86_64

[   81.826753] ==================================================================
[   81.827551] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   81.827551] 
[   81.828524] Use-after-free read at 0x000000000df2877e (in kfence-#222):
[   81.829760]  test_krealloc+0x51c/0x830
[   81.830317]  test_krealloc+0x458/0x830
[   81.830876]  kunit_try_run_case+0x14c/0x3d0
[   81.831517]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   81.832197]  kthread+0x24c/0x2d0
[   81.832711]  ret_from_fork+0x10/0x20
[   81.833326] 
[   81.833695] kfence-#222: 0x000000000df2877e-0x0000000040be0bb2, size=32, cache=kmalloc-32
[   81.833695] 
[   81.834868] allocated by task 326 on cpu 1 at 81.825695s (0.009164s ago):
[   81.835761]  test_alloc+0x298/0x620
[   81.836279]  test_krealloc+0xc0/0x830
[   81.836991]  kunit_try_run_case+0x14c/0x3d0
[   81.837630]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   81.838426]  kthread+0x24c/0x2d0
[   81.838892]  ret_from_fork+0x10/0x20
[   81.839526] 
[   81.839886] freed by task 326 on cpu 1 at 81.826086s (0.013789s ago):
[   81.840697]  krealloc_noprof+0x148/0x360
[   81.841381]  test_krealloc+0x1dc/0x830
[   81.841996]  kunit_try_run_case+0x14c/0x3d0
[   81.842547]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   81.843263]  kthread+0x24c/0x2d0
[   81.843735]  ret_from_fork+0x10/0x20
[   81.844313] 
[   81.844670] CPU: 1 UID: 0 PID: 326 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241127 #1
[   81.845874] Tainted: [B]=BAD_PAGE, [N]=TEST
[   81.846521] Hardware name: linux,dummy-virt (DT)
[   81.847121] ==================================================================

[   63.846352] ==================================================================
[   63.847028] BUG: KFENCE: use-after-free read in test_krealloc+0x6fd/0xbe0
[   63.847028] 
[   63.847605] Use-after-free read at 0x(____ptrval____) (in kfence-#153):
[   63.848476]  test_krealloc+0x6fd/0xbe0
[   63.849135]  kunit_try_run_case+0x1b3/0x490
[   63.849789]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.850742]  kthread+0x257/0x310
[   63.851247]  ret_from_fork+0x41/0x80
[   63.851625]  ret_from_fork_asm+0x1a/0x30
[   63.852103] 
[   63.852340] kfence-#153: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   63.852340] 
[   63.853109] allocated by task 345 on cpu 0 at 63.845277s (0.007827s ago):
[   63.853671]  test_alloc+0x35f/0x10d0
[   63.854185]  test_krealloc+0xae/0xbe0
[   63.854554]  kunit_try_run_case+0x1b3/0x490
[   63.854987]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.855515]  kthread+0x257/0x310
[   63.855847]  ret_from_fork+0x41/0x80
[   63.856302]  ret_from_fork_asm+0x1a/0x30
[   63.856804] 
[   63.857064] freed by task 345 on cpu 0 at 63.845618s (0.011442s ago):
[   63.857580]  krealloc_noprof+0x108/0x340
[   63.858142]  test_krealloc+0x227/0xbe0
[   63.858471]  kunit_try_run_case+0x1b3/0x490
[   63.858947]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.859551]  kthread+0x257/0x310
[   63.859905]  ret_from_fork+0x41/0x80
[   63.860405]  ret_from_fork_asm+0x1a/0x30
[   63.860697] 
[   63.860904] CPU: 0 UID: 0 PID: 345 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241127 #1
[   63.861862] Tainted: [B]=BAD_PAGE, [N]=TEST
[   63.862385] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   63.863149] ==================================================================