Hay
Date
Dec. 9, 2024, 6:35 a.m.

Environment
qemu-arm64
qemu-x86_64

[   26.842155] ==================================================================
[   26.843615] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_left+0x2b8/0x310
[   26.844365] Read of size 1 at addr ffff800080b57bdf by task kunit_try_catch/239
[   26.845034] 
[   26.845267] CPU: 1 UID: 0 PID: 239 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc2-next-20241209 #1
[   26.846102] Tainted: [B]=BAD_PAGE, [N]=TEST
[   26.846767] Hardware name: linux,dummy-virt (DT)
[   26.847475] Call trace:
[   26.848589]  show_stack+0x20/0x38 (C)
[   26.849104]  dump_stack_lvl+0x8c/0xd0
[   26.849727]  print_report+0x2fc/0x5e0
[   26.850233]  kasan_report+0xc8/0x118
[   26.851082]  __asan_report_load1_noabort+0x20/0x30
[   26.851801]  kasan_alloca_oob_left+0x2b8/0x310
[   26.852385]  kunit_try_run_case+0x14c/0x3d0
[   26.853037]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   26.853744]  kthread+0x24c/0x2d0
[   26.854268]  ret_from_fork+0x10/0x20
[   26.855005] 
[   26.855401] The buggy address belongs to stack of task kunit_try_catch/239
[   26.856154] 
[   26.856515] The buggy address belongs to the virtual mapping at
[   26.856515]  [ffff800080b50000, ffff800080b59000) created by:
[   26.856515]  kernel_clone+0x140/0x788
[   26.858018] 
[   26.858358] The buggy address belongs to the physical page:
[   26.859159] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1012d1
[   26.860016] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   26.860869] raw: 0bfffe0000000000 0000000000000000 dead000000000122 0000000000000000
[   26.861733] raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
[   26.862553] page dumped because: kasan: bad access detected
[   26.863387] 
[   26.863815] Memory state around the buggy address:
[   26.864403]  ffff800080b57a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.865145]  ffff800080b57b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   26.865980] >ffff800080b57b80: 00 00 00 00 00 00 00 00 ca ca ca ca 00 02 cb cb
[   26.866627]                                                     ^
[   26.868069]  ffff800080b57c00: cb cb cb cb 00 00 00 00 00 00 f1 f1 f1 f1 01 f2
[   26.868682]  ffff800080b57c80: 04 f2 00 f2 f2 f2 00 00 f3 f3 00 00 00 00 00 00
[   26.869392] ==================================================================

[   27.181886] ==================================================================
[   27.183060] BUG: KASAN: alloca-out-of-bounds in kasan_alloca_oob_left+0x31f/0x380
[   27.183752] Read of size 1 at addr ffff888102ba7c9f by task kunit_try_catch/258
[   27.184581] 
[   27.184816] CPU: 0 UID: 0 PID: 258 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc2-next-20241209 #1
[   27.186073] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.186506] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   27.187346] Call Trace:
[   27.187637]  <TASK>
[   27.188564]  dump_stack_lvl+0x73/0xb0
[   27.189235]  print_report+0xd1/0x640
[   27.189704]  ? __virt_addr_valid+0x1db/0x2d0
[   27.190478]  ? kasan_addr_to_slab+0x11/0xa0
[   27.190909]  kasan_report+0x102/0x140
[   27.191266]  ? kasan_alloca_oob_left+0x31f/0x380
[   27.191715]  ? kasan_alloca_oob_left+0x31f/0x380
[   27.192201]  __asan_report_load1_noabort+0x18/0x20
[   27.193258]  kasan_alloca_oob_left+0x31f/0x380
[   27.193854]  ? trace_raw_output_sched_switch+0xa0/0x250
[   27.194534]  ? __schedule+0xc70/0x27e0
[   27.195119]  ? trace_hardirqs_on+0x37/0xe0
[   27.195724]  ? __pfx_kasan_alloca_oob_left+0x10/0x10
[   27.196395]  ? __schedule+0xc70/0x27e0
[   27.197000]  ? __pfx_read_tsc+0x10/0x10
[   27.197575]  ? ktime_get_ts64+0x86/0x230
[   27.198508]  kunit_try_run_case+0x1b3/0x490
[   27.199046]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.199613]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   27.200322]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   27.200809]  ? __kthread_parkme+0x82/0x160
[   27.201637]  ? preempt_count_sub+0x50/0x80
[   27.202347]  ? __pfx_kunit_try_run_case+0x10/0x10
[   27.202997]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   27.203630]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   27.204648]  kthread+0x257/0x310
[   27.205081]  ? __pfx_kthread+0x10/0x10
[   27.205673]  ret_from_fork+0x41/0x80
[   27.206353]  ? __pfx_kthread+0x10/0x10
[   27.206757]  ret_from_fork_asm+0x1a/0x30
[   27.207137]  </TASK>
[   27.207481] 
[   27.207717] The buggy address belongs to stack of task kunit_try_catch/258
[   27.208277] 
[   27.208645] The buggy address belongs to the physical page:
[   27.209704] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ba7
[   27.210627] flags: 0x200000000000000(node=0|zone=2)
[   27.211159] raw: 0200000000000000 ffffea00040ae9c8 ffffea00040ae9c8 0000000000000000
[   27.211872] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[   27.212632] page dumped because: kasan: bad access detected
[   27.213208] 
[   27.213579] Memory state around the buggy address:
[   27.214613]  ffff888102ba7b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.215476]  ffff888102ba7c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   27.216366] >ffff888102ba7c80: ca ca ca ca 00 02 cb cb cb cb cb cb 00 00 00 00
[   27.216999]                             ^
[   27.217426]  ffff888102ba7d00: 00 f1 f1 f1 f1 01 f2 04 f2 00 f2 f2 f2 00 00 f3
[   27.218524]  ffff888102ba7d80: f3 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1
[   27.219243] ==================================================================