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

Environment
qemu-arm64
qemu-x86_64

[   39.402406] ==================================================================
[   39.403752] BUG: KASAN: global-out-of-bounds in kasan_global_oob_right+0x230/0x270
[   39.404686] Read of size 1 at addr ffffa2dae98da06d by task kunit_try_catch/234
[   39.405551] 
[   39.406633] CPU: 1 UID: 0 PID: 234 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241120 #1
[   39.407802] Tainted: [B]=BAD_PAGE, [N]=TEST
[   39.408376] Hardware name: linux,dummy-virt (DT)
[   39.409273] Call trace:
[   39.409723]  show_stack+0x20/0x38 (C)
[   39.410894]  dump_stack_lvl+0x8c/0xd0
[   39.411566]  print_report+0x2fc/0x5e0
[   39.412148]  kasan_report+0xc8/0x118
[   39.412694]  __asan_report_load1_noabort+0x20/0x30
[   39.413633]  kasan_global_oob_right+0x230/0x270
[   39.414917]  kunit_try_run_case+0x14c/0x3d0
[   39.415605]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   39.416403]  kthread+0x24c/0x2d0
[   39.417052]  ret_from_fork+0x10/0x20
[   39.418132] 
[   39.418579] The buggy address belongs to the variable:
[   39.419230]  global_array+0xd/0x40
[   39.419745] 
[   39.420293] The buggy address belongs to the virtual mapping at
[   39.420293]  [ffffa2dae7c20000, ffffa2dae9991000) created by:
[   39.420293]  paging_init+0x668/0x7c8
[   39.422017] 
[   39.422691] The buggy address belongs to the physical page:
[   39.423372] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x478da
[   39.425055] flags: 0x3fffe0000002000(reserved|node=0|zone=0|lastcpupid=0x1ffff)
[   39.426301] raw: 03fffe0000002000 ffffc1ffc01e3688 ffffc1ffc01e3688 0000000000000000
[   39.427136] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   39.427936] page dumped because: kasan: bad access detected
[   39.428564] 
[   39.428908] Memory state around the buggy address:
[   39.430195]  ffffa2dae98d9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   39.430925]  ffffa2dae98d9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   39.431746] >ffffa2dae98da000: 00 00 00 00 02 f9 f9 f9 f9 f9 f9 f9 00 02 f9 f9
[   39.432649]                                                           ^
[   39.433884]  ffffa2dae98da080: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
[   39.434639]  ffffa2dae98da100: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
[   39.435402] ==================================================================

[   30.994721] ==================================================================
[   30.995724] BUG: KASAN: global-out-of-bounds in kasan_global_oob_right+0x288/0x2d0
[   30.996441] Read of size 1 at addr ffffffff9b5fbc2d by task kunit_try_catch/252
[   30.997404] 
[   30.997717] CPU: 1 UID: 0 PID: 252 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241120 #1
[   30.998637] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.999037] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   31.000126] Call Trace:
[   31.000568]  <TASK>
[   31.000872]  dump_stack_lvl+0x73/0xb0
[   31.001364]  print_report+0xd1/0x640
[   31.002038]  ? __virt_addr_valid+0x1db/0x2d0
[   31.002535]  ? kasan_addr_to_slab+0x11/0xa0
[   31.003127]  kasan_report+0x102/0x140
[   31.003640]  ? kasan_global_oob_right+0x288/0x2d0
[   31.004345]  ? kasan_global_oob_right+0x288/0x2d0
[   31.004943]  __asan_report_load1_noabort+0x18/0x20
[   31.005517]  kasan_global_oob_right+0x288/0x2d0
[   31.006194]  ? __pfx_kasan_global_oob_right+0x10/0x10
[   31.006743]  ? __schedule+0xc3e/0x2790
[   31.007189]  ? __pfx_read_tsc+0x10/0x10
[   31.007592]  ? ktime_get_ts64+0x84/0x230
[   31.008409]  kunit_try_run_case+0x1b3/0x490
[   31.008809]  ? __pfx_kunit_try_run_case+0x10/0x10
[   31.009527]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   31.010117]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   31.010968]  ? __kthread_parkme+0x82/0x160
[   31.011473]  ? preempt_count_sub+0x50/0x80
[   31.012241]  ? __pfx_kunit_try_run_case+0x10/0x10
[   31.012637]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   31.013215]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   31.014132]  kthread+0x257/0x310
[   31.014802]  ? __pfx_kthread+0x10/0x10
[   31.015103]  ret_from_fork+0x41/0x80
[   31.015728]  ? __pfx_kthread+0x10/0x10
[   31.016044]  ret_from_fork_asm+0x1a/0x30
[   31.016733]  </TASK>
[   31.016929] 
[   31.017395] The buggy address belongs to the variable:
[   31.017875]  global_array+0xd/0x40
[   31.018480] 
[   31.018860] The buggy address belongs to the physical page:
[   31.019617] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x52ffb
[   31.020213] flags: 0x100000000002000(reserved|node=0|zone=1)
[   31.020946] raw: 0100000000002000 ffffea00014bfec8 ffffea00014bfec8 0000000000000000
[   31.021755] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   31.022650] page dumped because: kasan: bad access detected
[   31.023363] 
[   31.023553] Memory state around the buggy address:
[   31.024257]  ffffffff9b5fbb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   31.024961]  ffffffff9b5fbb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   31.025939] >ffffffff9b5fbc00: 00 00 00 00 00 02 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
[   31.026554]                                   ^
[   31.027216]  ffffffff9b5fbc80: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
[   31.027677]  ffffffff9b5fbd00: f9 f9 f9 f9 02 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
[   31.028575] ==================================================================