Hay
Date
Nov. 28, 2024, 2:36 a.m.

Environment
qemu-arm64
qemu-x86_64

[   33.238857] ==================================================================
[   33.239931] BUG: KASAN: global-out-of-bounds in kasan_global_oob_right+0x230/0x270
[   33.240766] Read of size 1 at addr ffffaee4804da06d by task kunit_try_catch/233
[   33.242026] 
[   33.242436] CPU: 1 UID: 0 PID: 233 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241128 #1
[   33.243994] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.244676] Hardware name: linux,dummy-virt (DT)
[   33.245246] Call trace:
[   33.245674]  show_stack+0x20/0x38 (C)
[   33.246204]  dump_stack_lvl+0x8c/0xd0
[   33.246695]  print_report+0x2fc/0x5e0
[   33.247162]  kasan_report+0xc8/0x118
[   33.247742]  __asan_report_load1_noabort+0x20/0x30
[   33.248577]  kasan_global_oob_right+0x230/0x270
[   33.249704]  kunit_try_run_case+0x14c/0x3d0
[   33.250421]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.251066]  kthread+0x24c/0x2d0
[   33.251617]  ret_from_fork+0x10/0x20
[   33.252309] 
[   33.252798] The buggy address belongs to the variable:
[   33.253551]  global_array+0xd/0x40
[   33.254028] 
[   33.254516] The buggy address belongs to the virtual mapping at
[   33.254516]  [ffffaee47e820000, ffffaee480591000) created by:
[   33.254516]  paging_init+0x668/0x7c8
[   33.256198] 
[   33.256874] The buggy address belongs to the physical page:
[   33.257907] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x478da
[   33.258936] flags: 0x3fffe0000002000(reserved|node=0|zone=0|lastcpupid=0x1ffff)
[   33.259911] raw: 03fffe0000002000 ffffc1ffc01e3688 ffffc1ffc01e3688 0000000000000000
[   33.260737] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   33.262304] page dumped because: kasan: bad access detected
[   33.262931] 
[   33.263288] Memory state around the buggy address:
[   33.263937]  ffffaee4804d9f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.264701]  ffffaee4804d9f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.265799] >ffffaee4804da000: 00 00 00 00 02 f9 f9 f9 f9 f9 f9 f9 00 02 f9 f9
[   33.266566]                                                           ^
[   33.267303]  ffffaee4804da080: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 04 f9 f9 f9
[   33.268090]  ffffaee4804da100: f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
[   33.268897] ==================================================================

[   24.169804] ==================================================================
[   24.171088] BUG: KASAN: global-out-of-bounds in kasan_global_oob_right+0x288/0x2d0
[   24.171731] Read of size 1 at addr ffffffff953fcc2d by task kunit_try_catch/253
[   24.172319] 
[   24.172605] CPU: 0 UID: 0 PID: 253 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241128 #1
[   24.173614] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.173944] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.175171] Call Trace:
[   24.175550]  <TASK>
[   24.175830]  dump_stack_lvl+0x73/0xb0
[   24.176463]  print_report+0xd1/0x640
[   24.176843]  ? __virt_addr_valid+0x1db/0x2d0
[   24.177428]  ? kasan_addr_to_slab+0x11/0xa0
[   24.177958]  kasan_report+0x102/0x140
[   24.178503]  ? kasan_global_oob_right+0x288/0x2d0
[   24.178913]  ? kasan_global_oob_right+0x288/0x2d0
[   24.179446]  __asan_report_load1_noabort+0x18/0x20
[   24.179886]  kasan_global_oob_right+0x288/0x2d0
[   24.180369]  ? __pfx_kasan_global_oob_right+0x10/0x10
[   24.180889]  ? __schedule+0xc3e/0x2790
[   24.181320]  ? __pfx_read_tsc+0x10/0x10
[   24.181766]  ? ktime_get_ts64+0x84/0x230
[   24.182329]  kunit_try_run_case+0x1b3/0x490
[   24.182945]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.183478]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   24.184012]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.184630]  ? __kthread_parkme+0x82/0x160
[   24.185047]  ? preempt_count_sub+0x50/0x80
[   24.185682]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.186170]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.186758]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.187391]  kthread+0x257/0x310
[   24.187857]  ? __pfx_kthread+0x10/0x10
[   24.188438]  ret_from_fork+0x41/0x80
[   24.189064]  ? __pfx_kthread+0x10/0x10
[   24.189692]  ret_from_fork_asm+0x1a/0x30
[   24.190467]  </TASK>
[   24.190746] 
[   24.191007] The buggy address belongs to the variable:
[   24.191633]  global_array+0xd/0x40
[   24.191928] 
[   24.192317] The buggy address belongs to the physical page:
[   24.192938] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b5fc
[   24.193668] flags: 0x100000000002000(reserved|node=0|zone=1)
[   24.194406] raw: 0100000000002000 ffffea00006d7f08 ffffea00006d7f08 0000000000000000
[   24.195151] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   24.195716] page dumped because: kasan: bad access detected
[   24.196364] 
[   24.196646] Memory state around the buggy address:
[   24.197134]  ffffffff953fcb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.197798]  ffffffff953fcb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.198509] >ffffffff953fcc00: 00 00 00 00 00 02 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
[   24.199259]                                   ^
[   24.199756]  ffffffff953fcc80: f9 f9 f9 f9 04 f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9
[   24.200496]  ffffffff953fcd00: f9 f9 f9 f9 02 f9 f9 f9 f9 f9 f9 f9 01 f9 f9 f9
[   24.200945] ==================================================================