Hay
Date
Dec. 3, 2024, 11:38 p.m.

Environment
qemu-arm64
qemu-x86_64

[   33.427807] ==================================================================
[   33.429104] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_right+0x2e4/0x348
[   33.430088] Read of size 1 at addr ffff800080a97bea by task kunit_try_catch/242
[   33.431474] 
[   33.431955] CPU: 1 UID: 0 PID: 242 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241203 #1
[   33.433415] Tainted: [B]=BAD_PAGE, [N]=TEST
[   33.434400] Hardware name: linux,dummy-virt (DT)
[   33.435723] Call trace:
[   33.436104]  show_stack+0x20/0x38 (C)
[   33.436670]  dump_stack_lvl+0x8c/0xd0
[   33.437345]  print_report+0x2fc/0x5e0
[   33.437957]  kasan_report+0xc8/0x118
[   33.438588]  __asan_report_load1_noabort+0x20/0x30
[   33.439280]  kasan_alloca_oob_right+0x2e4/0x348
[   33.440310]  kunit_try_run_case+0x14c/0x3d0
[   33.440942]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   33.442027]  kthread+0x24c/0x2d0
[   33.442716]  ret_from_fork+0x10/0x20
[   33.443453] 
[   33.443849] The buggy address belongs to stack of task kunit_try_catch/242
[   33.445129] 
[   33.445512] The buggy address belongs to the virtual mapping at
[   33.445512]  [ffff800080a90000, ffff800080a99000) created by:
[   33.445512]  kernel_clone+0x140/0x788
[   33.447389] 
[   33.447751] The buggy address belongs to the physical page:
[   33.448450] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10591a
[   33.449455] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   33.450617] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   33.452059] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   33.453224] page dumped because: kasan: bad access detected
[   33.454027] 
[   33.454389] Memory state around the buggy address:
[   33.455973]  ffff800080a97a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.456787]  ffff800080a97b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   33.457613] >ffff800080a97b80: 00 00 00 00 00 00 00 00 ca ca ca ca 00 02 cb cb
[   33.458596]                                                           ^
[   33.459823]  ffff800080a97c00: cb cb cb cb 00 00 00 00 00 00 f1 f1 f1 f1 01 f2
[   33.461006]  ffff800080a97c80: 04 f2 00 f2 f2 f2 00 00 f3 f3 00 00 00 00 00 00
[   33.461874] ==================================================================

[   28.731267] ==================================================================
[   28.732224] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_right+0x328/0x390
[   28.733127] Read of size 1 at addr ffff888102b7fcaa by task kunit_try_catch/262
[   28.733818] 
[   28.734037] CPU: 1 UID: 0 PID: 262 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241203 #1
[   28.734797] Tainted: [B]=BAD_PAGE, [N]=TEST
[   28.736003] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   28.737273] Call Trace:
[   28.737817]  <TASK>
[   28.738354]  dump_stack_lvl+0x73/0xb0
[   28.738817]  print_report+0xd1/0x640
[   28.739139]  ? __virt_addr_valid+0x1db/0x2d0
[   28.739596]  ? kasan_addr_to_slab+0x11/0xa0
[   28.739927]  kasan_report+0x102/0x140
[   28.740389]  ? kasan_alloca_oob_right+0x328/0x390
[   28.741371]  ? kasan_alloca_oob_right+0x328/0x390
[   28.742086]  __asan_report_load1_noabort+0x18/0x20
[   28.742498]  kasan_alloca_oob_right+0x328/0x390
[   28.743139]  ? uclamp_rq_dec_id+0x340/0x460
[   28.743550]  ? __schedule+0xc3e/0x2790
[   28.744022]  ? trace_hardirqs_on+0x37/0xe0
[   28.744555]  ? __pfx_kasan_alloca_oob_right+0x10/0x10
[   28.744934]  ? __schedule+0xc3e/0x2790
[   28.745480]  ? __pfx_read_tsc+0x10/0x10
[   28.745763]  ? ktime_get_ts64+0x86/0x230
[   28.746228]  kunit_try_run_case+0x1b3/0x490
[   28.746696]  ? __pfx_kunit_try_run_case+0x10/0x10
[   28.747117]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   28.747589]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   28.747984]  ? __kthread_parkme+0x82/0x160
[   28.748414]  ? preempt_count_sub+0x50/0x80
[   28.748913]  ? __pfx_kunit_try_run_case+0x10/0x10
[   28.749378]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   28.749866]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   28.750491]  kthread+0x257/0x310
[   28.750781]  ? __pfx_kthread+0x10/0x10
[   28.751145]  ret_from_fork+0x41/0x80
[   28.751609]  ? __pfx_kthread+0x10/0x10
[   28.752005]  ret_from_fork_asm+0x1a/0x30
[   28.752425]  </TASK>
[   28.752727] 
[   28.752920] The buggy address belongs to stack of task kunit_try_catch/262
[   28.753526] 
[   28.753741] The buggy address belongs to the physical page:
[   28.754258] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102b7f
[   28.754987] flags: 0x200000000000000(node=0|zone=2)
[   28.755368] raw: 0200000000000000 ffffea00040adfc8 ffffea00040adfc8 0000000000000000
[   28.756029] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   28.756668] page dumped because: kasan: bad access detected
[   28.757156] 
[   28.757361] Memory state around the buggy address:
[   28.757818]  ffff888102b7fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   28.758266]  ffff888102b7fc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   28.758927] >ffff888102b7fc80: ca ca ca ca 00 02 cb cb cb cb cb cb 00 00 00 00
[   28.759501]                                   ^
[   28.759921]  ffff888102b7fd00: 00 f1 f1 f1 f1 01 f2 04 f2 00 f2 f2 f2 00 00 f3
[   28.760292]  ffff888102b7fd80: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   28.760714] ==================================================================