Hay
Date
July 1, 2025, 11:08 a.m.

Environment
qemu-arm64
qemu-x86_64

[   20.942222] ==================================================================
[   20.942350] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x238/0x270
[   20.943551] Read of size 1 at addr ffff800080a97c2a by task kunit_try_catch/250
[   20.943679] 
[   20.943772] CPU: 0 UID: 0 PID: 250 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.943972] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.944061] Hardware name: linux,dummy-virt (DT)
[   20.944101] Call trace:
[   20.944140]  show_stack+0x20/0x38 (C)
[   20.944205]  dump_stack_lvl+0x8c/0xd0
[   20.944260]  print_report+0x310/0x608
[   20.944311]  kasan_report+0xdc/0x128
[   20.944360]  __asan_report_load1_noabort+0x20/0x30
[   20.945092]  kasan_stack_oob+0x238/0x270
[   20.945281]  kunit_try_run_case+0x170/0x3f0
[   20.945833]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.945913]  kthread+0x328/0x630
[   20.946032]  ret_from_fork+0x10/0x20
[   20.946120] 
[   20.946237] The buggy address belongs to stack of task kunit_try_catch/250
[   20.946408]  and is located at offset 138 in frame:
[   20.946456]  kasan_stack_oob+0x0/0x270
[   20.946664] 
[   20.946713] This frame has 4 objects:
[   20.946871]  [48, 49) '__assertion'
[   20.946913]  [64, 72) 'array'
[   20.946950]  [96, 112) '__assertion'
[   20.947005]  [128, 138) 'stack_array'
[   20.947072] 
[   20.947127] The buggy address belongs to the virtual mapping at
[   20.947127]  [ffff800080a90000, ffff800080a99000) created by:
[   20.947127]  kernel_clone+0x150/0x7a8
[   20.947827] 
[   20.948156] The buggy address belongs to the physical page:
[   20.948237] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1076c6
[   20.948333] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.948801] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   20.949757] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   20.949828] page dumped because: kasan: bad access detected
[   20.949916] 
[   20.949972] Memory state around the buggy address:
[   20.950041]  ffff800080a97b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   20.950517]  ffff800080a97b80: 00 00 00 00 f1 f1 f1 f1 f1 f1 01 f2 00 f2 f2 f2
[   20.950673] >ffff800080a97c00: 00 00 f2 f2 00 02 f3 f3 00 00 00 00 00 00 00 00
[   20.951152]                                   ^
[   20.951324]  ffff800080a97c80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 f2 f2
[   20.951483]  ffff800080a97d00: 00 00 f2 f2 00 00 f3 f3 00 00 00 00 00 00 00 00
[   20.951710] ==================================================================

[   13.331346] ==================================================================
[   13.332245] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x2b5/0x300
[   13.332550] Read of size 1 at addr ffff8881039e7d02 by task kunit_try_catch/266
[   13.332989] 
[   13.333101] CPU: 1 UID: 0 PID: 266 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.333151] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.333164] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.333186] Call Trace:
[   13.333201]  <TASK>
[   13.333220]  dump_stack_lvl+0x73/0xb0
[   13.333252]  print_report+0xd1/0x650
[   13.333277]  ? __virt_addr_valid+0x1db/0x2d0
[   13.333302]  ? kasan_stack_oob+0x2b5/0x300
[   13.333320]  ? kasan_addr_to_slab+0x11/0xa0
[   13.333340]  ? kasan_stack_oob+0x2b5/0x300
[   13.333359]  kasan_report+0x141/0x180
[   13.333392]  ? kasan_stack_oob+0x2b5/0x300
[   13.333416]  __asan_report_load1_noabort+0x18/0x20
[   13.333440]  kasan_stack_oob+0x2b5/0x300
[   13.333458]  ? __pfx_kasan_stack_oob+0x10/0x10
[   13.333477]  ? finish_task_switch.isra.0+0x153/0x700
[   13.333501]  ? __switch_to+0x47/0xf50
[   13.333528]  ? __schedule+0x10cc/0x2b60
[   13.333550]  ? __pfx_read_tsc+0x10/0x10
[   13.333583]  ? ktime_get_ts64+0x86/0x230
[   13.333608]  kunit_try_run_case+0x1a5/0x480
[   13.333634]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.333655]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.333679]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.333700]  ? __kthread_parkme+0x82/0x180
[   13.333722]  ? preempt_count_sub+0x50/0x80
[   13.333744]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.333766]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.333789]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.333811]  kthread+0x337/0x6f0
[   13.333830]  ? trace_preempt_on+0x20/0xc0
[   13.333854]  ? __pfx_kthread+0x10/0x10
[   13.333873]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.333894]  ? calculate_sigpending+0x7b/0xa0
[   13.333918]  ? __pfx_kthread+0x10/0x10
[   13.333949]  ret_from_fork+0x116/0x1d0
[   13.333966]  ? __pfx_kthread+0x10/0x10
[   13.333985]  ret_from_fork_asm+0x1a/0x30
[   13.334018]  </TASK>
[   13.334030] 
[   13.341707] The buggy address belongs to stack of task kunit_try_catch/266
[   13.342002]  and is located at offset 138 in frame:
[   13.342274]  kasan_stack_oob+0x0/0x300
[   13.342609] 
[   13.342737] This frame has 4 objects:
[   13.342987]  [48, 49) '__assertion'
[   13.343010]  [64, 72) 'array'
[   13.343181]  [96, 112) '__assertion'
[   13.343303]  [128, 138) 'stack_array'
[   13.343488] 
[   13.343861] The buggy address belongs to the physical page:
[   13.344080] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1039e7
[   13.344412] flags: 0x200000000000000(node=0|zone=2)
[   13.344639] raw: 0200000000000000 ffffea00040e79c8 ffffea00040e79c8 0000000000000000
[   13.344869] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   13.345093] page dumped because: kasan: bad access detected
[   13.345303] 
[   13.345649] Memory state around the buggy address:
[   13.345884]  ffff8881039e7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1
[   13.346670]  ffff8881039e7c80: f1 f1 f1 f1 f1 01 f2 00 f2 f2 f2 00 00 f2 f2 00
[   13.346894] >ffff8881039e7d00: 02 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 f1
[   13.347249]                    ^
[   13.347426]  ffff8881039e7d80: f1 f1 f1 00 00 f2 f2 00 00 f2 f2 00 00 f3 f3 00
[   13.347730]  ffff8881039e7e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.348088] ==================================================================