Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1148121rdb; Sat, 7 Oct 2023 14:30:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGNxBOmCejAYql1tQNNob6wumius7R9Dr6VO7UVrK77AWHE5ChbgMCzqnz8U5eYJ1pqKPK5 X-Received: by 2002:a05:6358:528d:b0:134:c279:c829 with SMTP id g13-20020a056358528d00b00134c279c829mr15579724rwa.18.1696714234237; Sat, 07 Oct 2023 14:30:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696714234; cv=none; d=google.com; s=arc-20160816; b=d4aTdd4Y4FonhcrzH9J8GjLsWp7cs8GoR3jGJ2ebug5CLgO+RGsBZstNfD9wkVvP3p PhZno2ZJjaXXHDUL3ThQJCnYkCcOf/QivWJeebCvroz+jgzzPyhMXvx5sZg8XAdHSUyj yHiWvgukIkebAP4HqAZOlS85hQiMebcqcAG9upP6YUHZjvxi+jpufkoftfY9pDJI934o wxduHsnVAqnFHGT9NpJoor9enJgLJsIYQM4ZDXoi9GKX6mzIupETgr90rWQXvXMGGkzp fvWdrftiHVIVzO794B0IdvVzkTRJ70f9BNN548FJJRayZXmPDT2z0wg625bnTBcnzuxG vU0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vvRbpRmJThFEVJoebTi5N+TLTuFiUS/X8DUdEtaeS0s=; fh=JbAh45zX6uXFXxRpzK8raASYzMMU3rlKAcvQsVhk1f4=; b=w3T3Sxhqz3oKPXy2KkaOUxjlQ4na7DQpGW00YLyDVdMx+tWPFguzJ2SbraiTRK46LY L3hMpy8kSmPl4zfSPHeKweg838UwP5rhSp4cRPohjpRfSups+Vx/KoKbkI2DA/oUkiXE 28JKSyX0xg7xc5x3lAE8aj/hYDVcGbeFY4RIKZac8b56Z4+DpMVpw2OxCASXXqQNZf8g hTOkOVo4E4g2Q5T/XqJ+u25gZSJn4vJuHQlAb6hEwOOLnV3KLg+GuxkJ2Dm0+Pz0kA39 mwdnz2LFl+WaGxkY9cUTHkMLmtACGGU+GT2qrn1niBxmDI2M2s1hHYsjjdWvQurLr75k aEsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bnzvqjhc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id s22-20020a63af56000000b00585a45417b3si6316190pgo.129.2023.10.07.14.30.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Oct 2023 14:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Bnzvqjhc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 21C108097A6A; Sat, 7 Oct 2023 14:30:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344195AbjJGVGA (ORCPT + 99 others); Sat, 7 Oct 2023 17:06:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344165AbjJGVF7 (ORCPT ); Sat, 7 Oct 2023 17:05:59 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1697793; Sat, 7 Oct 2023 14:05:59 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44379C433C8; Sat, 7 Oct 2023 21:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696712758; bh=raul4EaUteAXCpippFc6UcG0VYsz5uREbWR8i2YhMbM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=BnzvqjhcfzscVHEozhwWP0zCP0MwhSH+Kx7gkkj1MnVQanCh6joXZ71pv9IdnE9h8 QhLK44W8X+Dzl0Y8iKKhhS4bfigsUih23JsRRkKrFA6WM8Kup6hm5YKxTwg86V8Xri RDANPxtT5hKt1Dpq+sQhGK6HZnC0Ns1XdAwiwBE+hZvbcrTgB/UOxlCJjboBM88FCo icmLhIh+NZXQA/UOQidH92F0to+WMpb+zt6jqg31q6j9jJQo46MEErUyw7L/YjOdgm quuR2sybQqRwVhs1OFFoQy4WXqOID7yV7YTIn4uWnwAgbgMLwlt20nw+mxbgR3jE6V MVjbYgYlVxVKA== Date: Sat, 7 Oct 2023 14:05:56 -0700 From: Eric Biggers To: Nick Terrell Cc: syzbot , clm@fb.com, dsterba@suse.com, josef@toxicpanda.com, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com, terrelln@fb.com, linux-hardening@vger.kernel.org Subject: Re: [syzbot] [zstd] UBSAN: array-index-out-of-bounds in FSE_decompress_wksp_body_bmi2 Message-ID: <20231007210556.GA174883@sol.localdomain> References: <00000000000049964e06041f2cbf@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00000000000049964e06041f2cbf@google.com> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sat, 07 Oct 2023 14:30:16 -0700 (PDT) X-Spam-Level: ** Hi Nick, On Wed, Aug 30, 2023 at 12:49:53AM -0700, syzbot wrote: > UBSAN: array-index-out-of-bounds in lib/zstd/common/fse_decompress.c:345:30 > index 33 is out of range for type 'FSE_DTable[1]' (aka 'unsigned int[1]') Zstandard needs to be converted to use C99 flex-arrays instead of length-1 arrays. https://github.com/facebook/zstd/pull/3785 would fix this in upstream Zstandard, though it doesn't work well with the fact that upstream Zstandard supports C90. Not sure how you want to handle this. - Eric