Hay
Date
Nov. 22, 2024, 6:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   64.610856] ==================================================================
[   64.611871] BUG: KFENCE: use-after-free read in test_krealloc+0x51c/0x830
[   64.611871] 
[   64.613029] Use-after-free read at 0x00000000363d8d1c (in kfence-#214):
[   64.614522]  test_krealloc+0x51c/0x830
[   64.614999]  test_krealloc+0x458/0x830
[   64.615606]  kunit_try_run_case+0x14c/0x3d0
[   64.616649]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   64.617675]  kthread+0x24c/0x2d0
[   64.618233]  ret_from_fork+0x10/0x20
[   64.618892] 
[   64.619276] kfence-#214: 0x00000000363d8d1c-0x00000000d00ab175, size=32, cache=kmalloc-32
[   64.619276] 
[   64.620388] allocated by task 326 on cpu 1 at 64.609784s (0.010594s ago):
[   64.621806]  test_alloc+0x298/0x620
[   64.622660]  test_krealloc+0xc0/0x830
[   64.623216]  kunit_try_run_case+0x14c/0x3d0
[   64.623917]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   64.624796]  kthread+0x24c/0x2d0
[   64.625727]  ret_from_fork+0x10/0x20
[   64.626517] 
[   64.626971] freed by task 326 on cpu 1 at 64.610197s (0.016763s ago):
[   64.627903]  krealloc_noprof+0x148/0x360
[   64.628386]  test_krealloc+0x1dc/0x830
[   64.629102]  kunit_try_run_case+0x14c/0x3d0
[   64.630057]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   64.631055]  kthread+0x24c/0x2d0
[   64.631519]  ret_from_fork+0x10/0x20
[   64.632113] 
[   64.632699] CPU: 1 UID: 0 PID: 326 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241122 #1
[   64.635064] Tainted: [B]=BAD_PAGE, [N]=TEST
[   64.635899] Hardware name: linux,dummy-virt (DT)
[   64.636854] ==================================================================

[   63.300148] ==================================================================
[   63.300765] BUG: KFENCE: use-after-free read in test_krealloc+0x6fd/0xbe0
[   63.300765] 
[   63.301393] Use-after-free read at 0x(____ptrval____) (in kfence-#168):
[   63.301937]  test_krealloc+0x6fd/0xbe0
[   63.302337]  kunit_try_run_case+0x1b3/0x490
[   63.302724]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.304204]  kthread+0x257/0x310
[   63.304528]  ret_from_fork+0x41/0x80
[   63.304891]  ret_from_fork_asm+0x1a/0x30
[   63.305328] 
[   63.305512] kfence-#168: 0x(____ptrval____)-0x(____ptrval____), size=32, cache=kmalloc-32
[   63.305512] 
[   63.306173] allocated by task 345 on cpu 1 at 63.298956s (0.007212s ago):
[   63.306664]  test_alloc+0x35f/0x10d0
[   63.307141]  test_krealloc+0xae/0xbe0
[   63.307675]  kunit_try_run_case+0x1b3/0x490
[   63.308108]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.309114]  kthread+0x257/0x310
[   63.309465]  ret_from_fork+0x41/0x80
[   63.310259]  ret_from_fork_asm+0x1a/0x30
[   63.310660] 
[   63.310841] freed by task 345 on cpu 1 at 63.299469s (0.011367s ago):
[   63.311940]  krealloc_noprof+0x108/0x340
[   63.312290]  test_krealloc+0x227/0xbe0
[   63.312878]  kunit_try_run_case+0x1b3/0x490
[   63.313339]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   63.313869]  kthread+0x257/0x310
[   63.314337]  ret_from_fork+0x41/0x80
[   63.314932]  ret_from_fork_asm+0x1a/0x30
[   63.315463] 
[   63.315759] CPU: 1 UID: 0 PID: 345 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241122 #1
[   63.316574] Tainted: [B]=BAD_PAGE, [N]=TEST
[   63.316942] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   63.317840] ==================================================================