Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1358469lqt; Wed, 20 Mar 2024 01:02:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2uTinwfjvcHk1vhKk70K0aNeHh1NX7aCJWgnrHp7niVdLLQcqUQvdF9wjEAfgTwOJRlfwrPBPB2gvwOne3CsRRfb6YlrAssTfrLl2og== X-Google-Smtp-Source: AGHT+IFSwZ+YOeVoMLB2oS18iA4rh1B8t3Ojet4wwo2HCIAvoaGJqxU6ZP5UqmXK88K+BnW4wwN1 X-Received: by 2002:a05:6402:e82:b0:568:aad2:f835 with SMTP id h2-20020a0564020e8200b00568aad2f835mr1580284eda.20.1710921732251; Wed, 20 Mar 2024 01:02:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710921732; cv=pass; d=google.com; s=arc-20160816; b=ZVucCGEbvDt73OMItcqjV7YHyIsGhNSpf4eiCkDUugLQ1B2qZcBrlsiqJMDEAvqIcm tGXwhg08NVw/Qz3lutGRSZPgEdPpNl1cKrGhF0Zx5MVTNfJPEV3Fs152cp5jcMXh2onZ pdAfuKH4n2faMgzOQR2QKi+PlvfMVhP8ItUNAGjwLoGtQl9JWmpoaE2vSDYpPb7rU1zu tgHi9F2lPx9qh+YKBt4xS/k60/7UGpLh809TKgDpdzJ1BIB9c5Tsv0lHcmDXLdIqel2p hHRjYtIzFyxDDdAGzL6p4gTe++AC98WGzhvBIezpx4b5YFHdrkxLHuGezC9D2ql5SkBo 9xYQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:message-id:in-reply-to:date:mime-version :list-unsubscribe:list-subscribe:list-id:precedence; bh=ZryK2M/d5ViFlT3YE/LNIF2qPsWg9M+/iJ+gGJOEUgQ=; fh=l1kRWXhsXTtZ+UCoz+/G1mlO3+mHhl5t6nL7CBzucGM=; b=XtPGQ2OsPGyogAb4C9m5Oce9paMc3u517rXyqdzTtxZd258yMJ7WlwFAcEifqNIGjs uph50Qauwi2H3tKF3iIZUCq6BdLNoW/sX8aXPY32K9l11m7YUL5I7Y52qz7tYDfihsDR 8CaKmL5yB1lOZClYwOW+Z+1o9HixPd7PlpEXPHwuNlg8l6/92QDvZBGXgxLirRE63hry EN3Svt4V2J3+/bSxmhpvDh+yGo59rsIXS6PGVBuOtw5/y2tCtIAynZqh9BaSla/XgRlU dkwtGIGqRGZQfGbfK1QUiMthcWkIijEozI9I6wjEv2u2Z0tGuAsR/F5QjSnPTeoq7UB/ SnMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-108589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108589-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id er20-20020a056402449400b0056b162950a7si2567224edb.358.2024.03.20.01.02.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 01:02:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=m3kw2wvrgufz5godrsrytgd7.apphosting.bounces.google.com); spf=pass (google.com: domain of linux-kernel+bounces-108589-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108589-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id F37191F22E6C for ; Wed, 20 Mar 2024 08:02:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D2932C697; Wed, 20 Mar 2024 08:02:06 +0000 (UTC) Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30FF111181 for ; Wed, 20 Mar 2024 08:02:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.197 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710921725; cv=none; b=sLNXuJ+nfPGpNpmSvJlwZ7SLpByBlrkl9egjy7fzwifU/xGkK5yN676P5GuqhYSsbLaHuNWkKY0BFu35xR7ac8quQx80YvIm6bPFZCM91QQwgIcqsmSs9Dp81rOa1QmlqAcPSjNh0HajjVf6xrHpempJdjssBgRD6CC019sTiOM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710921725; c=relaxed/simple; bh=FxKCY4s/W6RhBh8EB1c3AXT+49U1UdjMORkFQ5eHvW4=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=hJHKBd+7UQDBEMihEokbG2peaDInMgbS+OvMCjMIyqQhYvmmG7TFWNAB0r4Ph+8O4mULbSuifTrbDuDslN1/p7OLYWNsu4qIV+6q2QxjjlPqVhtRszPYCu84YSJ71fvhh4kNw+3E3Dy+918mARDYDI44yj3mNmsnUiAoe+1nu/U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-il1-f197.google.com with SMTP id e9e14a558f8ab-36854f4e9b3so5147685ab.2 for ; Wed, 20 Mar 2024 01:02:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710921723; x=1711526523; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZryK2M/d5ViFlT3YE/LNIF2qPsWg9M+/iJ+gGJOEUgQ=; b=eBMXPJ46tS91Ox6QRTXnns1NnwJ7Purt0H6QC0sXvkiKxq4GkoWILSEF9D8p51Q45a vOuAex0dY4CD9FCxQbCA5kAkAR7pJXt86TGXHdiuiAM7ltKWLkowApLyEJ5zLLVn1XNH UNHmKyvGwn077o2yyYQy1CSl9LYDyKfKsY6Mwxtew8Ab1HTmRuhsd8i+DRbsE/tRiiN4 egF+FcZ6wIil5DNsMi9pU0dwzRei9W4k3lLqwz3hEAtDYHc1XbFaIyZoCGb4SIcp5EST aM0bIEMZYZ3dQt/dqhwJxOOqqZwBA0xJNq+JXin7x7gvccTLzycN7nEwoinEXWiHm2Km GHkg== X-Forwarded-Encrypted: i=1; AJvYcCU6jEfLwVrpFi/IFlQ9WygY7M90sDWHRENPjJSDxAQhMTPZAuT++/0tDBt3yziWxyyrL6UvlVGEDvMjBwrLrink7GY+1OHQwi2RPXS3 X-Gm-Message-State: AOJu0YxnG43c8QgmlyFYUqG9jcTiqO/n9FuyB6iJXFvaWd0TGaRLoZsq dzeAt1FAFAxAKL4ljhCdwMqGTaa267srzgLoRzBiEeSLV8yKlm5VsAiUkNewBE1NDrbZrbmdUXI 9ho+SD1VKIDpPIaQRzVO+RH/S7n5YyMgjq87nNKV921e068ekIsOtJXE= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6e02:1528:b0:366:be6a:10b7 with SMTP id i8-20020a056e02152800b00366be6a10b7mr366927ilu.2.1710921723377; Wed, 20 Mar 2024 01:02:03 -0700 (PDT) Date: Wed, 20 Mar 2024 01:02:03 -0700 In-Reply-To: X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <0000000000008f8e88061413011f@google.com> Subject: Re: [syzbot] [bpf?] UBSAN: array-index-out-of-bounds in check_stack_range_initialized From: syzbot To: eadavis@qq.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot has tested the proposed patch but the reproducer is still triggering an issue: UBSAN: array-index-out-of-bounds in check_stack_range_initialized mio: -8, mao: -8, as: -2147483647, check_stack_range_initialized ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in kernel/bpf/verifier.c:7193:12 index -1 is out of range for type 'u8[8]' (aka 'unsigned char[8]') CPU: 0 PID: 5496 Comm: syz-executor.0 Not tainted 6.8.0-syzkaller-05230-g114b5b3b4bde-dirty #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2e0 lib/dump_stack.c:106 ubsan_epilogue lib/ubsan.c:217 [inline] __ubsan_handle_out_of_bounds+0x121/0x150 lib/ubsan.c:415 check_stack_range_initialized+0x13d8/0x1630 kernel/bpf/verifier.c:7193 check_helper_mem_access+0x2eb/0xfa0 kernel/bpf/verifier.c:7297 check_helper_call+0x263c/0x7220 kernel/bpf/verifier.c:10255 do_check+0x9e29/0x10530 kernel/bpf/verifier.c:17804 do_check_common+0x14bd/0x1dd0 kernel/bpf/verifier.c:20503 do_check_main kernel/bpf/verifier.c:20594 [inline] bpf_check+0x136ab/0x19010 kernel/bpf/verifier.c:21264 bpf_prog_load+0x1667/0x20f0 kernel/bpf/syscall.c:2895 __sys_bpf+0x4ee/0x810 kernel/bpf/syscall.c:5631 __do_sys_bpf kernel/bpf/syscall.c:5738 [inline] __se_sys_bpf kernel/bpf/syscall.c:5736 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5736 do_syscall_64+0xfb/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7fb440a7dda9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fb4417ef0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007fb440babf80 RCX: 00007fb440a7dda9 RDX: 0000000000000090 RSI: 00000000200000c0 RDI: 0000000000000005 RBP: 00007fb440aca47a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fb440babf80 R15: 00007ffc0626c2f8 ---[ end trace ]--- Tested on: commit: 114b5b3b bpf, arm64: fix bug in BPF_LDX_MEMSX git tree: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master console output: https://syzkaller.appspot.com/x/log.txt?x=14084006180000 kernel config: https://syzkaller.appspot.com/x/.config?x=6fb1be60a193d440 dashboard link: https://syzkaller.appspot.com/bug?extid=33f4297b5f927648741a compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 patch: https://syzkaller.appspot.com/x/patch.diff?x=16c4aa31180000