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

Environment
qemu-arm64
qemu-x86_64

[   39.500345] ==================================================================
[   39.501653] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_left+0x2b8/0x310
[   39.502574] Read of size 1 at addr ffff800080ad7bdf by task kunit_try_catch/240
[   39.503202] 
[   39.503609] CPU: 0 UID: 0 PID: 240 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241120 #1
[   39.504766] Tainted: [B]=BAD_PAGE, [N]=TEST
[   39.505365] Hardware name: linux,dummy-virt (DT)
[   39.506396] Call trace:
[   39.506977]  show_stack+0x20/0x38 (C)
[   39.507926]  dump_stack_lvl+0x8c/0xd0
[   39.508638]  print_report+0x2fc/0x5e0
[   39.509656]  kasan_report+0xc8/0x118
[   39.510211]  __asan_report_load1_noabort+0x20/0x30
[   39.510820]  kasan_alloca_oob_left+0x2b8/0x310
[   39.511361]  kunit_try_run_case+0x14c/0x3d0
[   39.512044]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   39.512842]  kthread+0x24c/0x2d0
[   39.513373]  ret_from_fork+0x10/0x20
[   39.514158] 
[   39.514524] The buggy address belongs to stack of task kunit_try_catch/240
[   39.515327] 
[   39.515761] The buggy address belongs to the virtual mapping at
[   39.515761]  [ffff800080ad0000, ffff800080ad9000) created by:
[   39.515761]  kernel_clone+0x140/0x790
[   39.517163] 
[   39.518062] The buggy address belongs to the physical page:
[   39.518766] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10655d
[   39.519587] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   39.520305] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   39.521193] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   39.522249] page dumped because: kasan: bad access detected
[   39.522883] 
[   39.523220] Memory state around the buggy address:
[   39.523742]  ffff800080ad7a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   39.524583]  ffff800080ad7b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   39.525622] >ffff800080ad7b80: 00 00 00 00 00 00 00 00 ca ca ca ca 00 02 cb cb
[   39.526245]                                                     ^
[   39.527017]  ffff800080ad7c00: cb cb cb cb 00 00 00 00 00 00 f1 f1 f1 f1 01 f2
[   39.527806]  ffff800080ad7c80: 04 f2 00 f2 f2 f2 00 00 f3 f3 00 00 00 00 00 00
[   39.528619] ==================================================================

[   31.095393] ==================================================================
[   31.096439] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_left+0x31f/0x380
[   31.097007] Read of size 1 at addr ffff888102d27c9f by task kunit_try_catch/258
[   31.097867] 
[   31.098208] CPU: 1 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241120 #1
[   31.099098] Tainted: [B]=BAD_PAGE, [N]=TEST
[   31.099999] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   31.100643] Call Trace:
[   31.101278]  <TASK>
[   31.101589]  dump_stack_lvl+0x73/0xb0
[   31.102646]  print_report+0xd1/0x640
[   31.103172]  ? __virt_addr_valid+0x1db/0x2d0
[   31.103638]  ? kasan_addr_to_slab+0x11/0xa0
[   31.104566]  kasan_report+0x102/0x140
[   31.105062]  ? kasan_alloca_oob_left+0x31f/0x380
[   31.105846]  ? kasan_alloca_oob_left+0x31f/0x380
[   31.106522]  __asan_report_load1_noabort+0x18/0x20
[   31.107026]  kasan_alloca_oob_left+0x31f/0x380
[   31.107768]  ? __pfx_trace_event_raw_event_ipi_raise+0x10/0x10
[   31.108483]  ? __schedule+0xc3e/0x2790
[   31.109091]  ? trace_hardirqs_on+0x37/0xe0
[   31.109545]  ? __pfx_kasan_alloca_oob_left+0x10/0x10
[   31.110127]  ? __schedule+0xc3e/0x2790
[   31.110859]  ? __pfx_read_tsc+0x10/0x10
[   31.111166]  ? ktime_get_ts64+0x84/0x230
[   31.111915]  kunit_try_run_case+0x1b3/0x490
[   31.112255]  ? __pfx_kunit_try_run_case+0x10/0x10
[   31.112958]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   31.113734]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   31.114409]  ? __kthread_parkme+0x82/0x160
[   31.114993]  ? preempt_count_sub+0x50/0x80
[   31.115583]  ? __pfx_kunit_try_run_case+0x10/0x10
[   31.115957]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   31.116847]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   31.117460]  kthread+0x257/0x310
[   31.117955]  ? __pfx_kthread+0x10/0x10
[   31.118478]  ret_from_fork+0x41/0x80
[   31.119065]  ? __pfx_kthread+0x10/0x10
[   31.119915]  ret_from_fork_asm+0x1a/0x30
[   31.120494]  </TASK>
[   31.120746] 
[   31.121262] The buggy address belongs to stack of task kunit_try_catch/258
[   31.121824] 
[   31.122115] The buggy address belongs to the physical page:
[   31.122665] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d27
[   31.123898] flags: 0x200000000000000(node=0|zone=2)
[   31.124448] raw: 0200000000000000 ffffea00040b49c8 ffffea00040b49c8 0000000000000000
[   31.125041] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   31.125891] page dumped because: kasan: bad access detected
[   31.126385] 
[   31.126879] Memory state around the buggy address:
[   31.127510]  ffff888102d27b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   31.128116]  ffff888102d27c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   31.129032] >ffff888102d27c80: ca ca ca ca 00 02 cb cb cb cb cb cb 00 00 00 00
[   31.129678]                             ^
[   31.129980]  ffff888102d27d00: 00 f1 f1 f1 f1 01 f2 04 f2 00 f2 f2 f2 00 00 f3
[   31.131193]  ffff888102d27d80: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   31.132343] ==================================================================