Hay
Date
Dec. 4, 2024, 3:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   34.979162] ==================================================================
[   34.980706] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x230/0x268
[   34.981683] Read of size 1 at addr ffff800080b97cba by task kunit_try_catch/237
[   34.983353] 
[   34.984304] CPU: 1 UID: 0 PID: 237 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241204 #1
[   34.986520] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.987642] Hardware name: linux,dummy-virt (DT)
[   34.988852] Call trace:
[   34.989257]  show_stack+0x20/0x38 (C)
[   34.989888]  dump_stack_lvl+0x8c/0xd0
[   34.990404]  print_report+0x2fc/0x5e0
[   34.992032]  kasan_report+0xc8/0x118
[   34.992520]  __asan_report_load1_noabort+0x20/0x30
[   34.993191]  kasan_stack_oob+0x230/0x268
[   34.994146]  kunit_try_run_case+0x14c/0x3d0
[   34.994870]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.995963]  kthread+0x24c/0x2d0
[   34.996507]  ret_from_fork+0x10/0x20
[   34.997291] 
[   34.998355] The buggy address belongs to stack of task kunit_try_catch/237
[   34.999265]  and is located at offset 138 in frame:
[   34.999592]  kasan_stack_oob+0x0/0x268
[   35.000464] 
[   35.001021] This frame has 4 objects:
[   35.001827]  [48, 49) '__assertion'
[   35.002364]  [64, 72) 'array'
[   35.002966]  [96, 112) '__assertion'
[   35.003544]  [128, 138) 'stack_array'
[   35.004206] 
[   35.004927] The buggy address belongs to the virtual mapping at
[   35.004927]  [ffff800080b90000, ffff800080b99000) created by:
[   35.004927]  kernel_clone+0x140/0x788
[   35.007230] 
[   35.008086] The buggy address belongs to the physical page:
[   35.008798] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106646
[   35.010445] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   35.011648] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   35.012676] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   35.013788] page dumped because: kasan: bad access detected
[   35.015057] 
[   35.015605] Memory state around the buggy address:
[   35.016396]  ffff800080b97b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   35.017455]  ffff800080b97c00: 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 01 f2 00 f2
[   35.018781] >ffff800080b97c80: f2 f2 00 00 f2 f2 00 02 f3 f3 00 00 00 00 00 00
[   35.020308]                                         ^
[   35.021007]  ffff800080b97d00: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00
[   35.021761]  ffff800080b97d80: f2 f2 00 00 f2 f2 00 00 f3 f3 00 00 00 00 00 00
[   35.023482] ==================================================================

[   25.777649] ==================================================================
[   25.779269] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x2ae/0x300
[   25.781048] Read of size 1 at addr ffff888102cefd72 by task kunit_try_catch/257
[   25.782371] 
[   25.782604] CPU: 1 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241204 #1
[   25.784040] Tainted: [B]=BAD_PAGE, [N]=TEST
[   25.784481] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   25.785494] Call Trace:
[   25.786556]  <TASK>
[   25.786929]  dump_stack_lvl+0x73/0xb0
[   25.787422]  print_report+0xd1/0x640
[   25.788127]  ? __virt_addr_valid+0x1db/0x2d0
[   25.788557]  ? kasan_addr_to_slab+0x11/0xa0
[   25.789256]  kasan_report+0x102/0x140
[   25.789589]  ? kasan_stack_oob+0x2ae/0x300
[   25.790141]  ? kasan_stack_oob+0x2ae/0x300
[   25.790880]  __asan_report_load1_noabort+0x18/0x20
[   25.791234]  kasan_stack_oob+0x2ae/0x300
[   25.791894]  ? __pfx_kasan_stack_oob+0x10/0x10
[   25.793088]  ? finish_task_switch.isra.0+0x153/0x700
[   25.793666]  ? __switch_to+0x5d9/0xf60
[   25.794172]  ? __schedule+0xc3e/0x2790
[   25.794566]  ? __pfx_read_tsc+0x10/0x10
[   25.794961]  ? ktime_get_ts64+0x86/0x230
[   25.795813]  kunit_try_run_case+0x1b3/0x490
[   25.796461]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.796981]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   25.798085]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   25.798426]  ? __kthread_parkme+0x82/0x160
[   25.799325]  ? preempt_count_sub+0x50/0x80
[   25.800319]  ? __pfx_kunit_try_run_case+0x10/0x10
[   25.801467]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   25.802124]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   25.802745]  kthread+0x257/0x310
[   25.803831]  ? __pfx_kthread+0x10/0x10
[   25.804211]  ret_from_fork+0x41/0x80
[   25.804742]  ? __pfx_kthread+0x10/0x10
[   25.805055]  ret_from_fork_asm+0x1a/0x30
[   25.805985]  </TASK>
[   25.806605] 
[   25.806922] The buggy address belongs to stack of task kunit_try_catch/257
[   25.808191]  and is located at offset 138 in frame:
[   25.808644]  kasan_stack_oob+0x0/0x300
[   25.809686] 
[   25.809877] This frame has 4 objects:
[   25.810804]  [48, 49) '__assertion'
[   25.810858]  [64, 72) 'array'
[   25.811184]  [96, 112) '__assertion'
[   25.811831]  [128, 138) 'stack_array'
[   25.812267] 
[   25.812916] The buggy address belongs to the physical page:
[   25.814389] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102cef
[   25.815257] flags: 0x200000000000000(node=0|zone=2)
[   25.815974] raw: 0200000000000000 ffffea00040b3bc8 ffffea00040b3bc8 0000000000000000
[   25.816913] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   25.817801] page dumped because: kasan: bad access detected
[   25.818470] 
[   25.818718] Memory state around the buggy address:
[   25.820234]  ffff888102cefc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   25.821232]  ffff888102cefc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   25.822056] >ffff888102cefd00: f1 f1 f1 01 f2 00 f2 f2 f2 00 00 f2 f2 00 02 f3
[   25.822682]                                                              ^
[   25.823845]  ffff888102cefd80: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   25.824805]  ffff888102cefe00: f1 00 00 f2 f2 00 00 f2 f2 00 00 f3 f3 00 00 00
[   25.825484] ==================================================================