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

Environment
qemu-arm64
qemu-x86_64

[   33.286339] ==================================================================
[   33.287649] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x230/0x268
[   33.288506] Read of size 1 at addr ffff800080b47cba by task kunit_try_catch/237
[   33.289078] 
[   33.289436] CPU: 0 UID: 0 PID: 237 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241128 #1
[   33.290628] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.291104] Hardware name: linux,dummy-virt (DT)
[   33.291957] Call trace:
[   33.293180]  show_stack+0x20/0x38 (C)
[   33.294076]  dump_stack_lvl+0x8c/0xd0
[   33.294627]  print_report+0x2fc/0x5e0
[   33.295207]  kasan_report+0xc8/0x118
[   33.295801]  __asan_report_load1_noabort+0x20/0x30
[   33.296458]  kasan_stack_oob+0x230/0x268
[   33.297177]  kunit_try_run_case+0x14c/0x3d0
[   33.298554]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.299328]  kthread+0x24c/0x2d0
[   33.299859]  ret_from_fork+0x10/0x20
[   33.300525] 
[   33.301047] The buggy address belongs to stack of task kunit_try_catch/237
[   33.302301]  and is located at offset 138 in frame:
[   33.302847]  kasan_stack_oob+0x0/0x268
[   33.303662] 
[   33.304049] This frame has 4 objects:
[   33.304626]  [48, 49) '__assertion'
[   33.304836]  [64, 72) 'array'
[   33.305556]  [96, 112) '__assertion'
[   33.306002]  [128, 138) 'stack_array'
[   33.306484] 
[   33.307770] The buggy address belongs to the virtual mapping at
[   33.307770]  [ffff800080b40000, ffff800080b49000) created by:
[   33.307770]  kernel_clone+0x140/0x788
[   33.309596] 
[   33.309971] The buggy address belongs to the physical page:
[   33.310682] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10404d
[   33.311676] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.312650] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   33.313751] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   33.315264] page dumped because: kasan: bad access detected
[   33.315895] 
[   33.316299] Memory state around the buggy address:
[   33.316938]  ffff800080b47b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.317833]  ffff800080b47c00: 00 00 00 00 00 00 f1 f1 f1 f1 f1 f1 01 f2 00 f2
[   33.319076] >ffff800080b47c80: f2 f2 00 00 f2 f2 00 02 f3 f3 00 00 00 00 00 00
[   33.319972]                                         ^
[   33.320687]  ffff800080b47d00: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00
[   33.322304]  ffff800080b47d80: f2 f2 00 00 f2 f2 00 00 f3 f3 00 00 00 00 00 00
[   33.323075] ==================================================================

[   24.212048] ==================================================================
[   24.213714] BUG: KASAN: stack-out-of-bounds in kasan_stack_oob+0x2ae/0x300
[   24.214377] Read of size 1 at addr ffff888102d97d72 by task kunit_try_catch/257
[   24.215148] 
[   24.215731] CPU: 0 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241128 #1
[   24.216295] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.217030] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.218668] Call Trace:
[   24.218956]  <TASK>
[   24.219237]  dump_stack_lvl+0x73/0xb0
[   24.219650]  print_report+0xd1/0x640
[   24.220038]  ? __virt_addr_valid+0x1db/0x2d0
[   24.221043]  ? kasan_addr_to_slab+0x11/0xa0
[   24.221949]  kasan_report+0x102/0x140
[   24.222678]  ? kasan_stack_oob+0x2ae/0x300
[   24.223106]  ? kasan_stack_oob+0x2ae/0x300
[   24.223977]  __asan_report_load1_noabort+0x18/0x20
[   24.224697]  kasan_stack_oob+0x2ae/0x300
[   24.225120]  ? __pfx_kasan_stack_oob+0x10/0x10
[   24.225597]  ? finish_task_switch.isra.0+0x153/0x700
[   24.226092]  ? __switch_to+0x5d9/0xf60
[   24.226975]  ? __schedule+0xc3e/0x2790
[   24.227835]  ? __pfx_read_tsc+0x10/0x10
[   24.228621]  ? ktime_get_ts64+0x84/0x230
[   24.228975]  kunit_try_run_case+0x1b3/0x490
[   24.229975]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.230634]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   24.230996]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.231631]  ? __kthread_parkme+0x82/0x160
[   24.231997]  ? preempt_count_sub+0x50/0x80
[   24.232531]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.233087]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.233644]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.234151]  kthread+0x257/0x310
[   24.234667]  ? __pfx_kthread+0x10/0x10
[   24.235020]  ret_from_fork+0x41/0x80
[   24.235651]  ? __pfx_kthread+0x10/0x10
[   24.235946]  ret_from_fork_asm+0x1a/0x30
[   24.237025]  </TASK>
[   24.237457] 
[   24.237746] The buggy address belongs to stack of task kunit_try_catch/257
[   24.238723]  and is located at offset 138 in frame:
[   24.239221]  kasan_stack_oob+0x0/0x300
[   24.239912] 
[   24.240126] This frame has 4 objects:
[   24.240653]  [48, 49) '__assertion'
[   24.240723]  [64, 72) 'array'
[   24.241059]  [96, 112) '__assertion'
[   24.241606]  [128, 138) 'stack_array'
[   24.242126] 
[   24.242816] The buggy address belongs to the physical page:
[   24.243884] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d97
[   24.244729] flags: 0x200000000000000(node=0|zone=2)
[   24.245299] raw: 0200000000000000 ffffea00040b65c8 ffffea00040b65c8 0000000000000000
[   24.245964] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   24.246721] page dumped because: kasan: bad access detected
[   24.247104] 
[   24.247364] Memory state around the buggy address:
[   24.247771]  ffff888102d97c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.248537]  ffff888102d97c80: 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   24.248969] >ffff888102d97d00: f1 f1 f1 01 f2 00 f2 f2 f2 00 00 f2 f2 00 02 f3
[   24.250438]                                                              ^
[   24.251046]  ffff888102d97d80: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   24.251850]  ffff888102d97e00: f1 00 00 f2 f2 00 00 f2 f2 00 00 f3 f3 00 00 00
[   24.252418] ==================================================================