Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9103164pxu; Mon, 28 Dec 2020 06:43:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxXKavb2YSeK21kDfp6s/jC2teDGdA3CQ/aQtcbXAaf3yjalX9WKkosTkcglfFGCYnM4VpY X-Received: by 2002:a17:906:971a:: with SMTP id k26mr42755455ejx.515.1609166580187; Mon, 28 Dec 2020 06:43:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166580; cv=none; d=google.com; s=arc-20160816; b=h9n6R/hlRpbe/HpUKz7NnsHYmK4M60C6t7+K7ZdWDqJfq96dT2LApVnq2EvY3EtEob B3i9ZVLqFfc/LqByZG9rWyIO/RDOETdKrpDGsWR6wZZPHzIRS4xGURhxKEQXlMl0KvrJ +vMDmOzSULzxYBHf77NFlD4fEVG98PVYtRz60i4o8nApVcqPCUcFY6ToRp2wf1kzlRmF YTuqomVnNOg1ujSFKozzBZUxfQzuUM7Diik1Kpul7eBncH4A/FdtAi7kF8MzwbOvtamg vmeMlii/ofNLDhbKtwFsDEyp+U78r72ZSuWYANh/fnauvE6tu+gj7K+SGdpKPaFE3s2D RGKQ== 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=Jhb+vl3dg3On2jONXTtYGQRHccZzBG1/W2Ny+VRIu/M=; b=xLwCm2yUWeSPcipRWteyG3WGvPC/yIK8P3zaTJ4xbayT+EtssZ6Bp1HrEZ20QrTmW7 uk33SVHiecb6JayvY/L9SKbo1Y8ycngUERHzcVPMFb7fX2f8cNTk5UQCOsqlNdvyoAXY OSDfpTks37bk73VFC4uxRXsx1Ps/QGTsYUgQtJUvipFt3po5PO1yUS0J+B9T7EszHVMA pPVE3RLrFQObIbgN0UfRp5nf/WqHJF8M/L+YfLiCrVG31HuRl1KEhztq1heJrO1xAa6U oXcJ7YvRtix8c4hf6XFzJubQ2s68xPNai5xKIgkiuGFamYLu1lZ8dUXCGVvG0QEw86iq JmzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ei6Tl4/6"; 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 v1si20211174edf.22.2020.12.28.06.42.37; Mon, 28 Dec 2020 06:43:00 -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="ei6Tl4/6"; 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 S2503382AbgL1O3k (ORCPT + 99 others); Mon, 28 Dec 2020 09:29:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:37236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503588AbgL1O3Z (ORCPT ); Mon, 28 Dec 2020 09:29:25 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 924FE22CF7; Mon, 28 Dec 2020 14:28:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165725; bh=5wHv4GcBZGlIOVSG1HNdblnQfI/OavW97mCPO8ECgAw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ei6Tl4/68QyW/TyqpVO68nnh8WbHOHom8EiEzyUdW916b5O9MXcFgGggt/0uUntVQ EfY46TgYjHXJVgkekeYgHEBfacFL0apuDSZjDl6b+pvh5+fdPCiKtVkWtvUniGo5ou xv2deHY94mo/Ef39P4kIPlAJNA2o8ognjdxdZ+NI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Kleikamp , butt3rflyh4ck Subject: [PATCH 5.10 632/717] jfs: Fix array index bounds check in dbAdjTree Date: Mon, 28 Dec 2020 13:50:30 +0100 Message-Id: <20201228125051.196084057@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@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 @@ -183,7 +183,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.