Hay
Date
March 19, 2025, 10:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   37.714312] ==================================================================
[   37.714572] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x230/0x268
[   37.714740] Read of size 1 at addr ffff800080947c2a by task kunit_try_catch/251
[   37.714899] 
[   37.715010] CPU: 1 UID: 0 PID: 251 Comm: kunit_try_catch Tainted: G    B            N  6.14.0-rc7-next-20250319 #1 PREEMPT 
[   37.715705] Tainted: [B]=BAD_PAGE, [N]=TEST
[   37.715871] Hardware name: linux,dummy-virt (DT)
[   37.716163] Call trace:
[   37.716265]  show_stack+0x20/0x38 (C)
[   37.716440]  dump_stack_lvl+0x8c/0xd0
[   37.716601]  print_report+0x2fc/0x5f0
[   37.716756]  kasan_report+0xc8/0x118
[   37.716901]  __asan_report_load1_noabort+0x20/0x30
[   37.717222]  kasan_stack_oob+0x230/0x268
[   37.717406]  kunit_try_run_case+0x14c/0x3d0
[   37.717580]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   37.717756]  kthread+0x318/0x618
[   37.718141]  ret_from_fork+0x10/0x20
[   37.718319] 
[   37.718498] The buggy address belongs to stack of task kunit_try_catch/251
[   37.719037]  and is located at offset 138 in frame:
[   37.719184]  kasan_stack_oob+0x0/0x268
[   37.719540] 
[   37.719667] This frame has 4 objects:
[   37.720073]  [48, 49) '__assertion'
[   37.720772]  [64, 72) 'array'
[   37.720929]  [96, 112) '__assertion'
[   37.721102]  [128, 138) 'stack_array'
[   37.721242] 
[   37.721354] The buggy address belongs to the virtual mapping at
[   37.721354]  [ffff800080940000, ffff800080949000) created by:
[   37.721354]  kernel_clone+0x140/0x788
[   37.721972] 
[   37.722085] The buggy address belongs to the physical page:
[   37.722201] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10693d
[   37.722734] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   37.723353] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   37.723632] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   37.724027] page dumped because: kasan: bad access detected
[   37.724247] 
[   37.724326] Memory state around the buggy address:
[   37.724484]  ffff800080947b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   37.725009]  ffff800080947b80: 00 00 00 00 f1 f1 f1 f1 f1 f1 01 f2 00 f2 f2 f2
[   37.725234] >ffff800080947c00: 00 00 f2 f2 00 02 f3 f3 00 00 00 00 00 00 00 00
[   37.725379]                                   ^
[   37.725490]  ffff800080947c80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f2 f2
[   37.725747]  ffff800080947d00: 00 00 f2 f2 00 00 f3 f3 00 00 00 00 00 00 00 00
[   37.726338] ==================================================================

[   24.628608] ==================================================================
[   24.630226] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x2ac/0x300
[   24.631254] Read of size 1 at addr ffff8881039afd02 by task kunit_try_catch/270
[   24.632331] 
[   24.632605] CPU: 0 UID: 0 PID: 270 Comm: kunit_try_catch Tainted: G    B            N  6.14.0-rc7-next-20250319 #1 PREEMPT(voluntary) 
[   24.632767] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.632970] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.633022] Call Trace:
[   24.633056]  <TASK>
[   24.633087]  dump_stack_lvl+0x73/0xb0
[   24.633174]  print_report+0xd1/0x660
[   24.633230]  ? __virt_addr_valid+0x1db/0x2d0
[   24.633307]  ? kasan_addr_to_slab+0x11/0xa0
[   24.633343]  kasan_report+0x104/0x140
[   24.633373]  ? kasan_stack_oob+0x2ac/0x300
[   24.633407]  ? kasan_stack_oob+0x2ac/0x300
[   24.633446]  __asan_report_load1_noabort+0x18/0x20
[   24.633478]  kasan_stack_oob+0x2ac/0x300
[   24.633509]  ? __pfx_kasan_stack_oob+0x10/0x10
[   24.633538]  ? finish_task_switch.isra.0+0x153/0x730
[   24.633572]  ? __switch_to+0x5d9/0xf70
[   24.633611]  ? __schedule+0xd46/0x29c0
[   24.633643]  ? __pfx_read_tsc+0x10/0x10
[   24.633672]  ? ktime_get_ts64+0x86/0x240
[   24.633958]  kunit_try_run_case+0x1b2/0x490
[   24.634055]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.634188]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.634273]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.634310]  ? __kthread_parkme+0x82/0x160
[   24.634344]  ? preempt_count_sub+0x50/0x80
[   24.634379]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.634414]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.634449]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.634482]  kthread+0x323/0x710
[   24.634512]  ? trace_preempt_on+0x20/0xc0
[   24.634547]  ? __pfx_kthread+0x10/0x10
[   24.634579]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.634608]  ? calculate_sigpending+0x7b/0xa0
[   24.634641]  ? __pfx_kthread+0x10/0x10
[   24.634672]  ret_from_fork+0x41/0x80
[   24.634758]  ? __pfx_kthread+0x10/0x10
[   24.634817]  ret_from_fork_asm+0x1a/0x30
[   24.634891]  </TASK>
[   24.634907] 
[   24.654774] The buggy address belongs to stack of task kunit_try_catch/270
[   24.655694]  and is located at offset 138 in frame:
[   24.656521]  kasan_stack_oob+0x0/0x300
[   24.657700] 
[   24.658002] This frame has 4 objects:
[   24.658480]  [48, 49) '__assertion'
[   24.658541]  [64, 72) 'array'
[   24.658934]  [96, 112) '__assertion'
[   24.659336]  [128, 138) 'stack_array'
[   24.659750] 
[   24.661283] The buggy address belongs to the physical page:
[   24.661752] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039af
[   24.662859] flags: 0x200000000000000(node=0|zone=2)
[   24.663696] raw: 0200000000000000 ffffea00040e6bc8 ffffea00040e6bc8 0000000000000000
[   24.665209] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   24.665770] page dumped because: kasan: bad access detected
[   24.666444] 
[   24.666579] Memory state around the buggy address:
[   24.666967]  ffff8881039afc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1
[   24.667875]  ffff8881039afc80: f1 f1 f1 f1 f1 01 f2 00 f2 f2 f2 00 00 f2 f2 00
[   24.669011] >ffff8881039afd00: 02 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 f1
[   24.669539]                    ^
[   24.670305]  ffff8881039afd80: f1 f1 f1 00 00 f2 f2 00 00 f2 f2 00 00 f3 f3 00
[   24.670805]  ffff8881039afe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.671311] ==================================================================