Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3109340imu; Mon, 19 Nov 2018 10:45:00 -0800 (PST) X-Google-Smtp-Source: AJdET5f6GVB9b8X/tDaUflTM9ecEp+YJalPht+Jo1Lk4o71Y8a7i0JqOZ/KxfVsTy70UIlGk2Q9m X-Received: by 2002:a62:1912:: with SMTP id 18-v6mr24987889pfz.194.1542653100728; Mon, 19 Nov 2018 10:45:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542653100; cv=none; d=google.com; s=arc-20160816; b=wWve1v5VDkTjP9f9/HRz1hpFzREU+TRY8MudgVrGHSk7ahiv8V+kROnaAqNMebojxR jX2w5O8fGd7AfTs74TTpV7dhdVy4Rv9WBJR1AQ/sqPryQUs+gQ0orfsCSh5LxYYXOIzw nIR8Zs54Zcf0Bo8pHyPO9MMudedHWZz05ILuZEZmxcVpxpN4njwYLhqYnVUu2LFBfOYN e4HUJGtK60bcdS1Szi/O9Hnizno0Au1Vx8v/AdjDNhN4rAbipEJb1dWmwz24uIPy5VuK DZQXlEyucoaKcrl0Gcpt8c/06kjapKbC9nUebyrDR+xZkHECov4aYXPPShpoY1Cc4cEg xCqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NQBITLyhLLGPnlVHzmxJnAdRQ0pQ7ABQB4lQ42bGslM=; b=zC+S47nzMN1fWujgmNKXvn0aPnBJ2CoK4MEE7W0RA3wk0WSvGH57e9Ov7IAQ6sxd7r GdtZs1jrG3T4rhktjLr9lfGwcAHp7duxrwTlOq0mAYoACTQr0giE5nwo1ohnX00OOeIU I1F3zcquvCKPwek1qVbiQ9J8IF+Yki5lQjYz1EfaxKdrQrqTdx/fnKPdRiHsN+PJldeO D5vHbqfqD+7nSLL3cOK4qgZ11MnNLB+7ysjfd0wLBy4lCu5eBqL/vWQcTTMxA9JpDUP6 7NF2wNaiTfuQiKwd3bokMuPNmkabl8M1s+J0IJYOMqeH1bQyK3HufQPk3uipHW8f3MBs vgaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kUG1hV21; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v9si33311553pgt.464.2018.11.19.10.44.46; Mon, 19 Nov 2018 10:45:00 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kUG1hV21; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732299AbeKTDB5 (ORCPT + 99 others); Mon, 19 Nov 2018 22:01:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:34052 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730719AbeKTDB4 (ORCPT ); Mon, 19 Nov 2018 22:01:56 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D96A921104; Mon, 19 Nov 2018 16:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645467; bh=u2dnqUcwtfYkOvzTQCW/nIOci65/Dc21DTmrS0xr2fo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kUG1hV21HkUEWlDeDC1WwG4CaVyreZIQGOsZhLLEwcCALMVJayJGK5WLsRYqJkXjc K4JtHe2kzLEXzqVv/U2uG3bFt9SmQqB7WcV/+QAol2H792xSBxpDm6FQ5lqjexXBgE qqjAXllea/vB+oQXK2ezVUvdFjdEsiZW9kcgZLXo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Averin , Theodore Tso , stable@kernel.org Subject: [PATCH 4.19 146/205] ext4: fix buffer leak in __ext4_read_dirblock() on error path Date: Mon, 19 Nov 2018 17:27:33 +0100 Message-Id: <20181119162638.275105354@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181119162616.586062722@linuxfoundation.org> References: <20181119162616.586062722@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Vasily Averin commit de59fae0043f07de5d25e02ca360f7d57bfa5866 upstream. Fixes: dc6982ff4db1 ("ext4: refactor code to read directory blocks ...") Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 3.9 Signed-off-by: Greg Kroah-Hartman --- fs/ext4/namei.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -126,6 +126,7 @@ static struct buffer_head *__ext4_read_d if (!is_dx_block && type == INDEX) { ext4_error_inode(inode, func, line, block, "directory leaf block found instead of index block"); + brelse(bh); return ERR_PTR(-EFSCORRUPTED); } if (!ext4_has_metadata_csum(inode->i_sb) ||