Hay
Date
Dec. 5, 2024, 2:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   63.716839] ==================================================================
[   63.717638] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   63.717638] 
[   63.718597] Use-after-free read at 0x000000005f542089 (in kfence-#198):
[   63.719591]  test_krealloc+0x51c/0x830
[   63.720366]  test_krealloc+0x458/0x830
[   63.721156]  kunit_try_run_case+0x14c/0x3d0
[   63.722015]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.722772]  kthread+0x24c/0x2d0
[   63.723419]  ret_from_fork+0x10/0x20
[   63.724041] 
[   63.724394] kfence-#198: 0x000000005f542089-0x000000004f695cd4, size=32, cache=kmalloc-32
[   63.724394] 
[   63.725578] allocated by task 326 on cpu 1 at 63.715803s (0.009766s ago):
[   63.726691]  test_alloc+0x298/0x620
[   63.727390]  test_krealloc+0xc0/0x830
[   63.727956]  kunit_try_run_case+0x14c/0x3d0
[   63.728714]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.729472]  kthread+0x24c/0x2d0
[   63.730171]  ret_from_fork+0x10/0x20
[   63.730747] 
[   63.731170] freed by task 326 on cpu 1 at 63.716210s (0.014949s ago):
[   63.732061]  krealloc_noprof+0x148/0x360
[   63.732735]  test_krealloc+0x1dc/0x830
[   63.733362]  kunit_try_run_case+0x14c/0x3d0
[   63.734063]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   63.734889]  kthread+0x24c/0x2d0
[   63.735474]  ret_from_fork+0x10/0x20
[   63.736069] 
[   63.736526] CPU: 1 UID: 0 PID: 326 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241205 #1
[   63.737802] Tainted: [B]=BAD_PAGE, [N]=TEST
[   63.738431] Hardware name: linux,dummy-virt (DT)
[   63.739189] ==================================================================

[   67.110504] ==================================================================
[   67.111144] BUG: KFENCE: use-after-free read in test_krealloc+0x6fd/0xbe0
[   67.111144] 
[   67.112134] Use-after-free read at 0x(____ptrval____) (in kfence-#172):
[   67.112796]  test_krealloc+0x6fd/0xbe0
[   67.113250]  kunit_try_run_case+0x1b3/0x490
[   67.113853]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   67.114333]  kthread+0x257/0x310
[   67.114603]  ret_from_fork+0x41/0x80
[   67.115338]  ret_from_fork_asm+0x1a/0x30
[   67.116190] 
[   67.116616] kfence-#172: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   67.116616] 
[   67.117630] allocated by task 344 on cpu 0 at 67.109516s (0.008110s ago):
[   67.118556]  test_alloc+0x35f/0x10d0
[   67.118964]  test_krealloc+0xae/0xbe0
[   67.119437]  kunit_try_run_case+0x1b3/0x490
[   67.119955]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   67.120822]  kthread+0x257/0x310
[   67.121242]  ret_from_fork+0x41/0x80
[   67.121708]  ret_from_fork_asm+0x1a/0x30
[   67.122165] 
[   67.122357] freed by task 344 on cpu 0 at 67.109856s (0.012497s ago):
[   67.123125]  krealloc_noprof+0x108/0x340
[   67.123490]  test_krealloc+0x227/0xbe0
[   67.123923]  kunit_try_run_case+0x1b3/0x490
[   67.124389]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   67.125378]  kthread+0x257/0x310
[   67.125722]  ret_from_fork+0x41/0x80
[   67.126236]  ret_from_fork_asm+0x1a/0x30
[   67.126574] 
[   67.126915] CPU: 0 UID: 0 PID: 344 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241205 #1
[   67.127609] Tainted: [B]=BAD_PAGE, [N]=TEST
[   67.128174] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   67.128810] ==================================================================