Hay
Date
May 29, 2025, 7:10 a.m.

Environment
qemu-arm64
qemu-x86_64

[   24.511432] ==================================================================
[   24.511935] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x238/0x270
[   24.512113] Read of size 1 at addr ffff800080a67c2a by task kunit_try_catch/249
[   24.512242] 
[   24.512327] CPU: 0 UID: 0 PID: 249 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT 
[   24.512557] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.512689] Hardware name: linux,dummy-virt (DT)
[   24.512976] Call trace:
[   24.513046]  show_stack+0x20/0x38 (C)
[   24.513177]  dump_stack_lvl+0x8c/0xd0
[   24.513447]  print_report+0x310/0x608
[   24.513579]  kasan_report+0xdc/0x128
[   24.513695]  __asan_report_load1_noabort+0x20/0x30
[   24.513823]  kasan_stack_oob+0x238/0x270
[   24.514414]  kunit_try_run_case+0x170/0x3f0
[   24.514564]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.514704]  kthread+0x328/0x630
[   24.514865]  ret_from_fork+0x10/0x20
[   24.515016] 
[   24.515160] The buggy address belongs to stack of task kunit_try_catch/249
[   24.515370]  and is located at offset 138 in frame:
[   24.515496]  kasan_stack_oob+0x0/0x270
[   24.515757] 
[   24.515820] This frame has 4 objects:
[   24.516307]  [48, 49) '__assertion'
[   24.516441]  [64, 72) 'array'
[   24.516525]  [96, 112) '__assertion'
[   24.516779]  [128, 138) 'stack_array'
[   24.516885] 
[   24.517001] The buggy address belongs to the virtual mapping at
[   24.517001]  [ffff800080a60000, ffff800080a69000) created by:
[   24.517001]  kernel_clone+0x150/0x7a8
[   24.517541] 
[   24.517639] The buggy address belongs to the physical page:
[   24.517766] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107256
[   24.517910] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.518107] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   24.518293] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   24.518454] page dumped because: kasan: bad access detected
[   24.518540] 
[   24.518586] Memory state around the buggy address:
[   24.518919]  ffff800080a67b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.519046]  ffff800080a67b80: 00 00 00 00 f1 f1 f1 f1 f1 f1 01 f2 00 f2 f2 f2
[   24.519146] >ffff800080a67c00: 00 00 f2 f2 00 02 f3 f3 00 00 00 00 00 00 00 00
[   24.519230]                                   ^
[   24.519309]  ffff800080a67c80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f2 f2
[   24.519454]  ffff800080a67d00: 00 00 f2 f2 00 00 f3 f3 00 00 00 00 00 00 00 00
[   24.519560] ==================================================================


[   12.667198] ==================================================================
[   12.668652] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x2b5/0x300
[   12.669323] Read of size 1 at addr ffff888103a3fd02 by task kunit_try_catch/266
[   12.670009] 
[   12.670294] CPU: 1 UID: 0 PID: 266 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-next-20250529 #1 PREEMPT(voluntary) 
[   12.670343] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.670355] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.670377] Call Trace:
[   12.670389]  <TASK>
[   12.670404]  dump_stack_lvl+0x73/0xb0
[   12.670430]  print_report+0xd1/0x650
[   12.670453]  ? __virt_addr_valid+0x1db/0x2d0
[   12.670476]  ? kasan_stack_oob+0x2b5/0x300
[   12.670496]  ? kasan_addr_to_slab+0x11/0xa0
[   12.670517]  ? kasan_stack_oob+0x2b5/0x300
[   12.670544]  kasan_report+0x141/0x180
[   12.670567]  ? kasan_stack_oob+0x2b5/0x300
[   12.670594]  __asan_report_load1_noabort+0x18/0x20
[   12.670626]  kasan_stack_oob+0x2b5/0x300
[   12.670647]  ? __pfx_kasan_stack_oob+0x10/0x10
[   12.670667]  ? finish_task_switch.isra.0+0x153/0x700
[   12.670690]  ? __switch_to+0x47/0xf50
[   12.670717]  ? __schedule+0x10cc/0x2b60
[   12.670741]  ? __pfx_read_tsc+0x10/0x10
[   12.670906]  ? ktime_get_ts64+0x86/0x230
[   12.670932]  kunit_try_run_case+0x1a5/0x480
[   12.670956]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.670977]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.671002]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.671027]  ? __kthread_parkme+0x82/0x180
[   12.671049]  ? preempt_count_sub+0x50/0x80
[   12.671072]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.671093]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.671118]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.671144]  kthread+0x337/0x6f0
[   12.671165]  ? trace_preempt_on+0x20/0xc0
[   12.671189]  ? __pfx_kthread+0x10/0x10
[   12.671210]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.671233]  ? calculate_sigpending+0x7b/0xa0
[   12.671257]  ? __pfx_kthread+0x10/0x10
[   12.671279]  ret_from_fork+0x116/0x1d0
[   12.671297]  ? __pfx_kthread+0x10/0x10
[   12.671318]  ret_from_fork_asm+0x1a/0x30
[   12.671350]  </TASK>
[   12.671360] 
[   12.684698] The buggy address belongs to stack of task kunit_try_catch/266
[   12.685711]  and is located at offset 138 in frame:
[   12.686267]  kasan_stack_oob+0x0/0x300
[   12.686816] 
[   12.687211] This frame has 4 objects:
[   12.687678]  [48, 49) '__assertion'
[   12.687703]  [64, 72) 'array'
[   12.688105]  [96, 112) '__assertion'
[   12.688538]  [128, 138) 'stack_array'
[   12.688825] 
[   12.689333] The buggy address belongs to the physical page:
[   12.689520] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103a3f
[   12.689881] flags: 0x200000000000000(node=0|zone=2)
[   12.690434] raw: 0200000000000000 ffffea00040e8fc8 ffffea00040e8fc8 0000000000000000
[   12.691343] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   12.692124] page dumped because: kasan: bad access detected
[   12.692635] 
[   12.692797] Memory state around the buggy address:
[   12.693188]  ffff888103a3fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1
[   12.693418]  ffff888103a3fc80: f1 f1 f1 f1 f1 01 f2 00 f2 f2 f2 00 00 f2 f2 00
[   12.693653] >ffff888103a3fd00: 02 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 f1
[   12.694070]                    ^
[   12.694232]  ffff888103a3fd80: f1 f1 f1 00 00 f2 f2 00 00 f2 f2 00 00 f3 f3 00
[   12.694553]  ffff888103a3fe00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.695094] ==================================================================