Hay
Date
Dec. 6, 2024, 3:11 p.m.

Environment
qemu-arm64
qemu-x86_64

[   33.896764] ==================================================================
[   33.898043] BUG: KASAN: global-out-of-bounds in kasan_global_oob_right+0x230/0x270
[   33.899423] Read of size 1 at addr ffffa4990632202d by task kunit_try_catch/234
[   33.900267] 
[   33.900749] CPU: 0 UID: 0 PID: 234 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241206 #1
[   33.901989] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.902656] Hardware name: linux,dummy-virt (DT)
[   33.903799] Call trace:
[   33.904125]  show_stack+0x20/0x38 (C)
[   33.904787]  dump_stack_lvl+0x8c/0xd0
[   33.905400]  print_report+0x2fc/0x5e0
[   33.906096]  kasan_report+0xc8/0x118
[   33.907155]  __asan_report_load1_noabort+0x20/0x30
[   33.907815]  kasan_global_oob_right+0x230/0x270
[   33.908437]  kunit_try_run_case+0x14c/0x3d0
[   33.909078]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.909797]  kthread+0x24c/0x2d0
[   33.910708]  ret_from_fork+0x10/0x20
[   33.911473] 
[   33.911926] The buggy address belongs to the variable:
[   33.912604]  global_array+0xd/0x40
[   33.913220] 
[   33.913795] The buggy address belongs to the virtual mapping at
[   33.913795]  [ffffa49904650000, ffffa499063d1000) created by:
[   33.913795]  paging_init+0x668/0x7c8
[   33.915725] 
[   33.916402] The buggy address belongs to the physical page:
[   33.917161] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x47922
[   33.918193] flags: 0x3fffe0000002000(reserved|node=0|zone=0|lastcpupid=0x1ffff)
[   33.919579] raw: 03fffe0000002000 ffffc1ffc01e4888 ffffc1ffc01e4888 0000000000000000
[   33.920572] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   33.921548] page dumped because: kasan: bad access detected
[   33.922311] 
[   33.923129] Memory state around the buggy address:
[   33.923782]  ffffa49906321f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.924663]  ffffa49906321f80: 00 00 00 00 00 00 00 00 00 00 00 00 02 f9 f9 f9
[   33.925619] >ffffa49906322000: f9 f9 f9 f9 00 02 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
[   33.926800]                                   ^
[   33.927575]  ffffa49906322080: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
[   33.928432]  ffffa49906322100: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
[   33.929325] ==================================================================

[   26.762666] ==================================================================
[   26.764164] BUG: KASAN: global-out-of-bounds in kasan_global_oob_right+0x288/0x2d0
[   26.765587] Read of size 1 at addr ffffffffae00dbed by task kunit_try_catch/253
[   26.767744] 
[   26.768030] CPU: 1 UID: 0 PID: 253 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241206 #1
[   26.770097] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.770610] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   26.772017] Call Trace:
[   26.772551]  <TASK>
[   26.772819]  dump_stack_lvl+0x73/0xb0
[   26.773290]  print_report+0xd1/0x640
[   26.773752]  ? __virt_addr_valid+0x1db/0x2d0
[   26.774294]  ? kasan_addr_to_slab+0x11/0xa0
[   26.774749]  kasan_report+0x102/0x140
[   26.776440]  ? kasan_global_oob_right+0x288/0x2d0
[   26.777474]  ? kasan_global_oob_right+0x288/0x2d0
[   26.778271]  __asan_report_load1_noabort+0x18/0x20
[   26.779071]  kasan_global_oob_right+0x288/0x2d0
[   26.779830]  ? __pfx_kasan_global_oob_right+0x10/0x10
[   26.780237]  ? __schedule+0xc70/0x27e0
[   26.781265]  ? __pfx_read_tsc+0x10/0x10
[   26.782008]  ? ktime_get_ts64+0x86/0x230
[   26.782834]  kunit_try_run_case+0x1b3/0x490
[   26.783572]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.784079]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   26.785358]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   26.786523]  ? __kthread_parkme+0x82/0x160
[   26.787021]  ? preempt_count_sub+0x50/0x80
[   26.787342]  ? __pfx_kunit_try_run_case+0x10/0x10
[   26.789052]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   26.790576]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   26.791140]  kthread+0x257/0x310
[   26.792245]  ? __pfx_kthread+0x10/0x10
[   26.792647]  ret_from_fork+0x41/0x80
[   26.793651]  ? __pfx_kthread+0x10/0x10
[   26.794100]  ret_from_fork_asm+0x1a/0x30
[   26.795187]  </TASK>
[   26.795420] 
[   26.795778] The buggy address belongs to the variable:
[   26.796142]  global_array+0xd/0x40
[   26.797875] 
[   26.798168] The buggy address belongs to the physical page:
[   26.798495] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x71c0d
[   26.800405] flags: 0x100000000002000(reserved|node=0|zone=1)
[   26.801126] raw: 0100000000002000 ffffea0001c70348 ffffea0001c70348 0000000000000000
[   26.802101] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   26.803037] page dumped because: kasan: bad access detected
[   26.804772] 
[   26.805167] Memory state around the buggy address:
[   26.805574]  ffffffffae00da80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.806053]  ffffffffae00db00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.806904] >ffffffffae00db80: 00 00 00 00 00 00 00 00 00 00 00 00 00 02 f9 f9
[   26.808486]                                                           ^
[   26.809703]  ffffffffae00dc00: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
[   26.810881]  ffffffffae00dc80: f9 f9 f9 f9 02 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
[   26.811757] ==================================================================