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

Environment
qemu-arm64
qemu-x86_64

[   33.373912] ==================================================================
[   33.375026] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_right+0x2e4/0x348
[   33.375912] Read of size 1 at addr ffff800080b67bea by task kunit_try_catch/241
[   33.376580] 
[   33.376989] CPU: 0 UID: 0 PID: 241 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241128 #1
[   33.378256] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.378818] Hardware name: linux,dummy-virt (DT)
[   33.379458] Call trace:
[   33.379877]  show_stack+0x20/0x38 (C)
[   33.380741]  dump_stack_lvl+0x8c/0xd0
[   33.382142]  print_report+0x2fc/0x5e0
[   33.382675]  kasan_report+0xc8/0x118
[   33.383270]  __asan_report_load1_noabort+0x20/0x30
[   33.383940]  kasan_alloca_oob_right+0x2e4/0x348
[   33.384631]  kunit_try_run_case+0x14c/0x3d0
[   33.385226]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.385804]  kthread+0x24c/0x2d0
[   33.386573]  ret_from_fork+0x10/0x20
[   33.387343] 
[   33.387852] The buggy address belongs to stack of task kunit_try_catch/241
[   33.388647] 
[   33.389869] The buggy address belongs to the virtual mapping at
[   33.389869]  [ffff800080b60000, ffff800080b69000) created by:
[   33.389869]  kernel_clone+0x140/0x788
[   33.391172] 
[   33.391521] The buggy address belongs to the physical page:
[   33.392074] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106387
[   33.393409] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.394231] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   33.395073] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   33.395882] page dumped because: kasan: bad access detected
[   33.396505] 
[   33.396845] Memory state around the buggy address:
[   33.398333]  ffff800080b67a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.399130]  ffff800080b67b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.399901] >ffff800080b67b80: 00 00 00 00 00 00 00 00 ca ca ca ca 00 02 cb cb
[   33.400628]                                                           ^
[   33.401778]  ffff800080b67c00: cb cb cb cb 00 00 00 00 00 00 f1 f1 f1 f1 01 f2
[   33.402541]  ffff800080b67c80: 04 f2 00 f2 f2 f2 00 00 f3 f3 00 00 00 00 00 00
[   33.403289] ==================================================================

[   24.304744] ==================================================================
[   24.305968] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_right+0x328/0x390
[   24.307147] Read of size 1 at addr ffff888102d37caa by task kunit_try_catch/261
[   24.307887] 
[   24.308063] CPU: 0 UID: 0 PID: 261 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241128 #1
[   24.309009] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.309612] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.310537] Call Trace:
[   24.310761]  <TASK>
[   24.311068]  dump_stack_lvl+0x73/0xb0
[   24.312366]  print_report+0xd1/0x640
[   24.312809]  ? __virt_addr_valid+0x1db/0x2d0
[   24.313366]  ? kasan_addr_to_slab+0x11/0xa0
[   24.313830]  kasan_report+0x102/0x140
[   24.314238]  ? kasan_alloca_oob_right+0x328/0x390
[   24.314770]  ? kasan_alloca_oob_right+0x328/0x390
[   24.315298]  __asan_report_load1_noabort+0x18/0x20
[   24.315851]  kasan_alloca_oob_right+0x328/0x390
[   24.316771]  ? irqentry_exit+0x2a/0x60
[   24.317248]  ? insn_get_addr_ref+0x170/0x760
[   24.318070]  ? trace_hardirqs_on+0x37/0xe0
[   24.318567]  ? __pfx_kasan_alloca_oob_right+0x10/0x10
[   24.319264]  ? __pfx_kasan_alloca_oob_right+0x10/0x10
[   24.320063]  kunit_try_run_case+0x1b3/0x490
[   24.320746]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.321278]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   24.322173]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.322769]  ? __kthread_parkme+0x82/0x160
[   24.323193]  ? preempt_count_sub+0x50/0x80
[   24.323636]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.324317]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.325024]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.325649]  kthread+0x257/0x310
[   24.326076]  ? __pfx_kthread+0x10/0x10
[   24.327109]  ret_from_fork+0x41/0x80
[   24.327715]  ? __pfx_kthread+0x10/0x10
[   24.328281]  ret_from_fork_asm+0x1a/0x30
[   24.328785]  </TASK>
[   24.329031] 
[   24.329411] The buggy address belongs to stack of task kunit_try_catch/261
[   24.330017] 
[   24.330240] The buggy address belongs to the physical page:
[   24.330679] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102d37
[   24.331402] flags: 0x200000000000000(node=0|zone=2)
[   24.331843] raw: 0200000000000000 ffffea00040b4dc8 ffffea00040b4dc8 0000000000000000
[   24.332742] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   24.334296] page dumped because: kasan: bad access detected
[   24.334806] 
[   24.335043] Memory state around the buggy address:
[   24.335363]  ffff888102d37b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.336024]  ffff888102d37c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.336892] >ffff888102d37c80: ca ca ca ca 00 02 cb cb cb cb cb cb 00 00 00 00
[   24.337513]                                   ^
[   24.338668]  ffff888102d37d00: 00 f1 f1 f1 f1 01 f2 04 f2 00 f2 f2 f2 00 00 f3
[   24.339252]  ffff888102d37d80: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   24.339891] ==================================================================