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

Environment
qemu-arm64
qemu-x86_64

[   50.616559] ==================================================================
[   50.618332] BUG: KASAN: global-out-of-bounds in kasan_global_oob_right+0x230/0x270
[   50.618983] Read of size 1 at addr ffffa1fda44d906d by task kunit_try_catch/234
[   50.620093] 
[   50.620551] CPU: 1 UID: 0 PID: 234 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241127 #1
[   50.622470] Tainted: [B]=BAD_PAGE, [N]=TEST
[   50.623249] Hardware name: linux,dummy-virt (DT)
[   50.624075] Call trace:
[   50.624421]  show_stack+0x20/0x38 (C)
[   50.625353]  dump_stack_lvl+0x8c/0xd0
[   50.626055]  print_report+0x2fc/0x5e0
[   50.626734]  kasan_report+0xc8/0x118
[   50.627351]  __asan_report_load1_noabort+0x20/0x30
[   50.628138]  kasan_global_oob_right+0x230/0x270
[   50.628847]  kunit_try_run_case+0x14c/0x3d0
[   50.630039]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   50.630820]  kthread+0x24c/0x2d0
[   50.631354]  ret_from_fork+0x10/0x20
[   50.631976] 
[   50.632367] The buggy address belongs to the variable:
[   50.633181]  global_array+0xd/0x40
[   50.633934] 
[   50.634738] The buggy address belongs to the virtual mapping at
[   50.634738]  [ffffa1fda2820000, ffffa1fda4591000) created by:
[   50.634738]  paging_init+0x668/0x7c8
[   50.636065] 
[   50.637480] The buggy address belongs to the physical page:
[   50.638815] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x478d9
[   50.639470] flags: 0x3fffe0000002000(reserved|node=0|zone=0|lastcpupid=0x1ffff)
[   50.640089] raw: 03fffe0000002000 ffffc1ffc01e3648 ffffc1ffc01e3648 0000000000000000
[   50.642329] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   50.644267] page dumped because: kasan: bad access detected
[   50.645840] 
[   50.646767] Memory state around the buggy address:
[   50.648159]  ffffa1fda44d8f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   50.650283]  ffffa1fda44d8f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   50.651440] >ffffa1fda44d9000: 00 00 00 00 02 f9 f9 f9 f9 f9 f9 f9 00 02 f9 f9
[   50.652331]                                                           ^
[   50.653161]  ffffa1fda44d9080: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
[   50.654274]  ffffa1fda44d9100: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
[   50.655219] ==================================================================

[   27.998367] ==================================================================
[   28.000165] BUG: KASAN: global-out-of-bounds in kasan_global_oob_right+0x288/0x2d0
[   28.001133] Read of size 1 at addr ffffffffbbffcc2d by task kunit_try_catch/253
[   28.002377] 
[   28.002591] CPU: 1 UID: 0 PID: 253 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241127 #1
[   28.004032] Tainted: [B]=BAD_PAGE, [N]=TEST
[   28.004798] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   28.006060] Call Trace:
[   28.006599]  <TASK>
[   28.007089]  dump_stack_lvl+0x73/0xb0
[   28.007868]  print_report+0xd1/0x640
[   28.008362]  ? __virt_addr_valid+0x1db/0x2d0
[   28.009215]  ? kasan_addr_to_slab+0x11/0xa0
[   28.009654]  kasan_report+0x102/0x140
[   28.010067]  ? kasan_global_oob_right+0x288/0x2d0
[   28.010560]  ? kasan_global_oob_right+0x288/0x2d0
[   28.011963]  __asan_report_load1_noabort+0x18/0x20
[   28.012796]  kasan_global_oob_right+0x288/0x2d0
[   28.013073]  ? __pfx_kasan_global_oob_right+0x10/0x10
[   28.013802]  ? __pfx_kasan_global_oob_right+0x10/0x10
[   28.014608]  kunit_try_run_case+0x1b3/0x490
[   28.015488]  ? __pfx_kunit_try_run_case+0x10/0x10
[   28.015949]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   28.016421]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   28.016894]  ? __kthread_parkme+0x82/0x160
[   28.017365]  ? preempt_count_sub+0x50/0x80
[   28.017823]  ? __pfx_kunit_try_run_case+0x10/0x10
[   28.018742]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   28.019515]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   28.020327]  kthread+0x257/0x310
[   28.020594]  ? __pfx_kthread+0x10/0x10
[   28.021333]  ret_from_fork+0x41/0x80
[   28.021929]  ? __pfx_kthread+0x10/0x10
[   28.022615]  ret_from_fork_asm+0x1a/0x30
[   28.023249]  </TASK>
[   28.023595] 
[   28.023916] The buggy address belongs to the variable:
[   28.024873]  global_array+0xd/0x40
[   28.025305] 
[   28.025608] The buggy address belongs to the physical page:
[   28.025963] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x15abfc
[   28.026761] flags: 0x200000000002000(reserved|node=0|zone=2)
[   28.027487] raw: 0200000000002000 ffffea00056aff08 ffffea00056aff08 0000000000000000
[   28.028383] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   28.029649] page dumped because: kasan: bad access detected
[   28.030318] 
[   28.030539] Memory state around the buggy address:
[   28.031168]  ffffffffbbffcb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   28.032419]  ffffffffbbffcb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   28.033221] >ffffffffbbffcc00: 00 00 00 00 00 02 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
[   28.034162]                                   ^
[   28.034701]  ffffffffbbffcc80: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
[   28.035545]  ffffffffbbffcd00: f9 f9 f9 f9 02 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
[   28.036431] ==================================================================