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

Environment
qemu-arm64
qemu-x86_64

[   37.005413] ==================================================================
[   37.007686] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_right+0x2e4/0x348
[   37.008704] Read of size 1 at addr ffff800080b97bea by task kunit_try_catch/242
[   37.009475] 
[   37.009922] CPU: 0 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241122 #1
[   37.011422] Tainted: [B]=BAD_PAGE, [N]=TEST
[   37.011979] Hardware name: linux,dummy-virt (DT)
[   37.012698] Call trace:
[   37.013065]  show_stack+0x20/0x38 (C)
[   37.013731]  dump_stack_lvl+0x8c/0xd0
[   37.014383]  print_report+0x2fc/0x5e0
[   37.015009]  kasan_report+0xc8/0x118
[   37.015583]  __asan_report_load1_noabort+0x20/0x30
[   37.016283]  kasan_alloca_oob_right+0x2e4/0x348
[   37.017029]  kunit_try_run_case+0x14c/0x3d0
[   37.017593]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   37.018374]  kthread+0x24c/0x2d0
[   37.019054]  ret_from_fork+0x10/0x20
[   37.019645] 
[   37.020007] The buggy address belongs to stack of task kunit_try_catch/242
[   37.020887] 
[   37.021212] The buggy address belongs to the virtual mapping at
[   37.021212]  [ffff800080b90000, ffff800080b99000) created by:
[   37.021212]  kernel_clone+0x140/0x790
[   37.022906] 
[   37.023280] The buggy address belongs to the physical page:
[   37.024167] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10612d
[   37.025135] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   37.025974] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   37.027086] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   37.027879] page dumped because: kasan: bad access detected
[   37.028586] 
[   37.028983] Memory state around the buggy address:
[   37.029597]  ffff800080b97a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   37.030516]  ffff800080b97b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   37.031424] >ffff800080b97b80: 00 00 00 00 00 00 00 00 ca ca ca ca 00 02 cb cb
[   37.032246]                                                           ^
[   37.033134]  ffff800080b97c00: cb cb cb cb 00 00 00 00 00 00 f1 f1 f1 f1 01 f2
[   37.034061]  ffff800080b97c80: 04 f2 00 f2 f2 f2 00 00 f3 f3 00 00 00 00 00 00
[   37.034991] ==================================================================

[   27.948310] ==================================================================
[   27.949135] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_right+0x328/0x390
[   27.950289] Read of size 1 at addr ffff888102d67caa by task kunit_try_catch/261
[   27.951137] 
[   27.951356] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241122 #1
[   27.952073] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.953351] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.953849] Call Trace:
[   27.954054]  <TASK>
[   27.954327]  dump_stack_lvl+0x73/0xb0
[   27.954784]  print_report+0xd1/0x640
[   27.955234]  ? __virt_addr_valid+0x1db/0x2d0
[   27.955714]  ? kasan_addr_to_slab+0x11/0xa0
[   27.956550]  kasan_report+0x102/0x140
[   27.957606]  ? kasan_alloca_oob_right+0x328/0x390
[   27.958078]  ? kasan_alloca_oob_right+0x328/0x390
[   27.959069]  __asan_report_load1_noabort+0x18/0x20
[   27.959714]  kasan_alloca_oob_right+0x328/0x390
[   27.960760]  ? __schedule+0xc3e/0x2790
[   27.961356]  ? finish_task_switch.isra.0+0x153/0x700
[   27.961713]  ? finish_task_switch.isra.0+0x156/0x700
[   27.962560]  ? __pfx_kasan_alloca_oob_right+0x10/0x10
[   27.963516]  ? __schedule+0xc3e/0x2790
[   27.963924]  ? __pfx_read_tsc+0x10/0x10
[   27.964742]  ? ktime_get_ts64+0x84/0x230
[   27.965641]  kunit_try_run_case+0x1b3/0x490
[   27.966464]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.967322]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   27.968249]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.968654]  ? __kthread_parkme+0x82/0x160
[   27.969602]  ? preempt_count_sub+0x50/0x80
[   27.970149]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.970959]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.971817]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.972359]  kthread+0x257/0x310
[   27.972750]  ? __pfx_kthread+0x10/0x10
[   27.973733]  ret_from_fork+0x41/0x80
[   27.974325]  ? __pfx_kthread+0x10/0x10
[   27.974607]  ret_from_fork_asm+0x1a/0x30
[   27.975343]  </TASK>
[   27.975653] 
[   27.975906] The buggy address belongs to stack of task kunit_try_catch/261
[   27.976461] 
[   27.976765] The buggy address belongs to the physical page:
[   27.977310] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d67
[   27.978108] flags: 0x200000000000000(node=0|zone=2)
[   27.979233] raw: 0200000000000000 ffffea00040b59c8 ffffea00040b59c8 0000000000000000
[   27.980113] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   27.981156] page dumped because: kasan: bad access detected
[   27.981598] 
[   27.981752] Memory state around the buggy address:
[   27.982468]  ffff888102d67b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.982800]  ffff888102d67c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.983149] >ffff888102d67c80: ca ca ca ca 00 02 cb cb cb cb cb cb 00 00 00 00
[   27.983462]                                   ^
[   27.983704]  ffff888102d67d00: 00 f1 f1 f1 f1 01 f2 04 f2 00 f2 f2 f2 00 00 f3
[   27.985141]  ffff888102d67d80: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   27.985843] ==================================================================