Hay
Date
Nov. 20, 2024, 6:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   39.539131] ==================================================================
[   39.540552] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_right+0x2e4/0x348
[   39.541645] Read of size 1 at addr ffff8000809c7bea by task kunit_try_catch/242
[   39.543438] 
[   39.543905] CPU: 1 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241120 #1
[   39.545097] Tainted: [B]=BAD_PAGE, [N]=TEST
[   39.545677] Hardware name: linux,dummy-virt (DT)
[   39.546242] Call trace:
[   39.546691]  show_stack+0x20/0x38 (C)
[   39.547268]  dump_stack_lvl+0x8c/0xd0
[   39.548278]  print_report+0x2fc/0x5e0
[   39.548884]  kasan_report+0xc8/0x118
[   39.549563]  __asan_report_load1_noabort+0x20/0x30
[   39.550428]  kasan_alloca_oob_right+0x2e4/0x348
[   39.551635]  kunit_try_run_case+0x14c/0x3d0
[   39.552376]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   39.553150]  kthread+0x24c/0x2d0
[   39.553743]  ret_from_fork+0x10/0x20
[   39.554397] 
[   39.554767] The buggy address belongs to stack of task kunit_try_catch/242
[   39.555582] 
[   39.555894] The buggy address belongs to the virtual mapping at
[   39.555894]  [ffff8000809c0000, ffff8000809c9000) created by:
[   39.555894]  kernel_clone+0x140/0x790
[   39.557908] 
[   39.558256] The buggy address belongs to the physical page:
[   39.558923] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106589
[   39.560491] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   39.561283] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   39.562499] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   39.563435] page dumped because: kasan: bad access detected
[   39.564096] 
[   39.564487] Memory state around the buggy address:
[   39.565077]  ffff8000809c7a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   39.566183]  ffff8000809c7b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   39.567318] >ffff8000809c7b80: 00 00 00 00 00 00 00 00 ca ca ca ca 00 02 cb cb
[   39.567992]                                                           ^
[   39.568738]  ffff8000809c7c00: cb cb cb cb 00 00 00 00 00 00 f1 f1 f1 f1 01 f2
[   39.569641]  ffff8000809c7c80: 04 f2 00 f2 f2 f2 00 00 f3 f3 00 00 00 00 00 00
[   39.570420] ==================================================================

[   31.137830] ==================================================================
[   31.138785] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_right+0x328/0x390
[   31.140607] Read of size 1 at addr ffff888102c97caa by task kunit_try_catch/260
[   31.141187] 
[   31.141411] CPU: 0 UID: 0 PID: 260 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241120 #1
[   31.142308] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.143665] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   31.145956] Call Trace:
[   31.146160]  <TASK>
[   31.146333]  dump_stack_lvl+0x73/0xb0
[   31.146608]  print_report+0xd1/0x640
[   31.147926]  ? __virt_addr_valid+0x1db/0x2d0
[   31.149204]  ? kasan_addr_to_slab+0x11/0xa0
[   31.150075]  kasan_report+0x102/0x140
[   31.150801]  ? kasan_alloca_oob_right+0x328/0x390
[   31.151241]  ? kasan_alloca_oob_right+0x328/0x390
[   31.151902]  __asan_report_load1_noabort+0x18/0x20
[   31.154164]  kasan_alloca_oob_right+0x328/0x390
[   31.154456]  ? __pfx_trace_event_raw_event_ipi_raise+0x10/0x10
[   31.154832]  ? __schedule+0xc3e/0x2790
[   31.155084]  ? trace_hardirqs_on+0x37/0xe0
[   31.155348]  ? __pfx_kasan_alloca_oob_right+0x10/0x10
[   31.155652]  ? __schedule+0xc3e/0x2790
[   31.156220]  ? __pfx_read_tsc+0x10/0x10
[   31.156539]  ? ktime_get_ts64+0x84/0x230
[   31.157457]  kunit_try_run_case+0x1b3/0x490
[   31.158005]  ? __pfx_kunit_try_run_case+0x10/0x10
[   31.158560]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   31.159037]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   31.159332]  ? __kthread_parkme+0x82/0x160
[   31.159589]  ? preempt_count_sub+0x50/0x80
[   31.161103]  ? __pfx_kunit_try_run_case+0x10/0x10
[   31.161717]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   31.162078]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   31.162394]  kthread+0x257/0x310
[   31.162624]  ? __pfx_kthread+0x10/0x10
[   31.163235]  ret_from_fork+0x41/0x80
[   31.163616]  ? __pfx_kthread+0x10/0x10
[   31.163893]  ret_from_fork_asm+0x1a/0x30
[   31.164439]  </TASK>
[   31.164838] 
[   31.165274] The buggy address belongs to stack of task kunit_try_catch/260
[   31.166911] 
[   31.167714] The buggy address belongs to the physical page:
[   31.169370] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102c97
[   31.170158] flags: 0x200000000000000(node=0|zone=2)
[   31.171049] raw: 0200000000000000 ffffea00040b25c8 ffffea00040b25c8 0000000000000000
[   31.172578] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   31.173144] page dumped because: kasan: bad access detected
[   31.173753] 
[   31.174477] Memory state around the buggy address:
[   31.174834]  ffff888102c97b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   31.176332]  ffff888102c97c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   31.177377] >ffff888102c97c80: ca ca ca ca 00 02 cb cb cb cb cb cb 00 00 00 00
[   31.177709]                                   ^
[   31.178153]  ffff888102c97d00: 00 f1 f1 f1 f1 01 f2 04 f2 00 f2 f2 f2 00 00 f3
[   31.179418]  ffff888102c97d80: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   31.180217] ==================================================================