Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9178359pxu; Mon, 28 Dec 2020 08:31:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyNBzhY9SsT0+z+we+gM2HWcbP2h/+vLGdPhOjP3D4q4cWSecQFZ4T3srR7UpaIzkEvuswt X-Received: by 2002:a17:906:2d42:: with SMTP id e2mr43380518eji.292.1609173097542; Mon, 28 Dec 2020 08:31:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173097; cv=none; d=google.com; s=arc-20160816; b=TaItTy1Q5wt0N32Lc4rzQnWfmjxchwWWRbPBjT7k2nFn/VVJDJKKXq4OD+twztiFOG fUobzptTRu9Px7A2JGjHpVaN8BCB7K4nkjdqJl/jb/l/HqcwijGTq3hJH+i2sDuJ0rMZ KuNtA3g7rrAM1a01DzNRAdm3ZT2OopuZ8783HW97qwxifuKYUo5jSMoBXj/8idqSWplt BrBIBZTuEcJdYmqkY0eDYsO5F+8jaWuTlk+PvfHL9Uiz9J0MCXgYauDSwuFyrg1DgX4O 3D/2aED2llISPf3RPPnrOK4DCvRTH9kMe1Obzu1wkVzY/WGy6ar7mUHMexE+WP2Yx0MK /19w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=mr0ER88aVCzGUlvXaY/ak1wxPGH+8mMM75EeAnATD0A=; b=Qvp165akcyDOqEG30+YUY9dccXnSGNBFD4hUnsQxVzn6W/29OptX8JuszDgH+frow5 nM+O4O4TFj4RLulvu12AWtK1OVxG/u04v7QsnEi9PcEwYafWh/FV5CmHGx063h7QvpFj P718nxzNxlYlBSyco/rbEMwo0P0+Cex8L4kQmqN9dpY6Whj0nnYsFR5GzDRiylI2pbxE pobgbGWpQ/T9HrORt+lLhzhaJFBvA3tK4W3G37vj/V2pNSQbGxCMkQuFXFU+h4ziXkSl aQj+5eRG/N2FfuIQb303SShh0YlHRoO7iBjXS+Uqbd8wxhyppkEzWbjrYWYMuDsolxPZ YSTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yNsgvUF7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck16si20499977edb.36.2020.12.28.08.31.15; Mon, 28 Dec 2020 08:31:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yNsgvUF7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441807AbgL1Q2t (ORCPT + 99 others); Mon, 28 Dec 2020 11:28:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:34734 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730745AbgL1NHR (ORCPT ); Mon, 28 Dec 2020 08:07:17 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E3A562242A; Mon, 28 Dec 2020 13:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160822; bh=DmmkrcitPC7QTS2tPwHnuEaW7XBeQ9vxE83FylVSuew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yNsgvUF7HB5Y0Z9ir69JfCzBgyMjdxfxJWDeShS8U1L3ZbKcIY6nZpqg3s5K+FVIa jLGAmDUC9cNRQPmgZNg8/XLyNe3lGHydalB0fREkACw5NDCS08h2LU0ptY1yYRe4Bk etL9Xt+JT8bPbzRpE+zr5otPrGyi5SwK6iCrjm7U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Kleikamp , butt3rflyh4ck Subject: [PATCH 4.9 160/175] jfs: Fix array index bounds check in dbAdjTree Date: Mon, 28 Dec 2020 13:50:13 +0100 Message-Id: <20201228124900.995141218@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dave Kleikamp commit c61b3e4839007668360ed8b87d7da96d2e59fc6c upstream. Bounds checking tools can flag a bug in dbAdjTree() for an array index out of bounds in dmt_stree. Since dmt_stree can refer to the stree in both structures dmaptree and dmapctl, use the larger array to eliminate the false positive. Signed-off-by: Dave Kleikamp Reported-by: butt3rflyh4ck Signed-off-by: Greg Kroah-Hartman --- fs/jfs/jfs_dmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/jfs/jfs_dmap.h +++ b/fs/jfs/jfs_dmap.h @@ -196,7 +196,7 @@ typedef union dmtree { #define dmt_leafidx t1.leafidx #define dmt_height t1.height #define dmt_budmin t1.budmin -#define dmt_stree t1.stree +#define dmt_stree t2.stree /* * on-disk aggregate disk allocation map descriptor.