Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9047387pxu; Mon, 28 Dec 2020 05:21:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvq/OvCkix/wAQo/32uLpk+aV1B+woex3ffUzqCFLTBK3Su6OFyeQ13e3vdWMn2zVISXRG X-Received: by 2002:a17:906:ae4e:: with SMTP id lf14mr42953679ejb.310.1609161678867; Mon, 28 Dec 2020 05:21:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609161678; cv=none; d=google.com; s=arc-20160816; b=xJzvpNzM1H8xo8PtDIoiLacIexZY4YrCWoQKqiauNaBXqQ7Yy6tJRcw7VsgjI37pFF o6miL6uX7jUmGhjRSM2O9RxEh3TT7JYOJuFtzv0xVAGbTnqgTkXgr2yXDF66g/wa44iw CJSO7FaBRsfZXK6nZoMV/GlxHGRqXvurLPW7rNVCEyFokUuP/sQckcBI8VaVZMBmsVhd QeFjLVNnvPU4G0EsuWDWp3umJ66sfHubyUX8Y7KkqAwzo53dPgGRKzPPQouIj8iniJCz jAZp0VcaqgoOxHgWTmUmxYZEDNfFhwe17weewqCJyxjn/SC2tmlMBUh06zcwujq28WcZ OGhQ== 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=vu9XqSA3JGZ7bRcCWwJhJmT7DHuF2+HaVOhGpE1t7g6sMHfh+JfcPhI8P6ptQvGRir xclD54HCJoCERpp3k1i9Y9qejdjGxrGpo8H52C/t7/4FT1qivoVrBHLSBnD3eEBfcnpU uJ8JE6C/BpGXK2cQC3rWZrlAzYbAzJWIEFqJNH+299mSc5tv+LR2VKwPjmGxeMUFxN8D YBWRKRw9FcMLIk8j5d3x9lafDfarD00T2kHpuazo93MPum89IavUxDEcCYLfVtgcS84Q xfBWsbtCTRwf/4BXfM6VlhO6Wfd4nRfp8J7Kdan0yXeLqhvXSVG0sYtuulJuRZb0D3St 7QdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ycSSLTX2; 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 g11si12542050edt.456.2020.12.28.05.20.56; Mon, 28 Dec 2020 05:21:18 -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=ycSSLTX2; 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 S1731697AbgL1NSP (ORCPT + 99 others); Mon, 28 Dec 2020 08:18:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:46694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387473AbgL1NSM (ORCPT ); Mon, 28 Dec 2020 08:18:12 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2D62220728; Mon, 28 Dec 2020 13:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161451; bh=DmmkrcitPC7QTS2tPwHnuEaW7XBeQ9vxE83FylVSuew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ycSSLTX25+mWPoCNsUzQulEDQefvlqOCbB45I0jy9p+FXNagOs984E6wxkwn7Ll7y 2NBN4f7WFTTqbbrC5WVyM30v6V98Mf7Z5osc/9kTz2vAzBgnN2szGGamAXiB0TJFTv CWncr1RDjWaHW46NJl7rzvNeRG0zdyDHOzu+vhvE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dave Kleikamp , butt3rflyh4ck Subject: [PATCH 4.14 218/242] jfs: Fix array index bounds check in dbAdjTree Date: Mon, 28 Dec 2020 13:50:23 +0100 Message-Id: <20201228124915.401408063@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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.