Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2959209imu; Mon, 19 Nov 2018 08:38:19 -0800 (PST) X-Google-Smtp-Source: AJdET5fPMnUWt1C3tfrTHy+DZ2QBhEzW9oHAyXEa2ldtNV2CPB/AHlU9Bt26x54zrOmbKfLyuEda X-Received: by 2002:a17:902:8a8e:: with SMTP id p14-v6mr22946565plo.133.1542645499492; Mon, 19 Nov 2018 08:38:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542645499; cv=none; d=google.com; s=arc-20160816; b=JAUjEVToKBQ5/iGdTmBsmKgaM/xSJCyztMYS8FhI+pG5DL/oGdK9Te0HXTCjJwlALx fzo9h+n9jGiyH+Tz3PbFXtgYcBYR/EVlUKQPXh2k27pA58AAkjHptVWxmNYkq6IsJzRx M6WoUiG7kepH5nbIXtge242o2t6EO/wWOD7HDkHgYwWyHgBXxKtkhgU/3kWsAkhmGcez Zp1gaRwWvGArYebqmeRgXzhhfIOO1t/EuzSyx6NR8ZYrk7JpJq3EeOT2CVBW01jTJiVu G/GANAj1oSAhe/OcM2RttRFGahZAH6guPi753LaFNmWFdrENNcYcDYOeTTJvlqHfVEy9 cf4g== 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=3aBjN07fwRlhQShADwlplkEwoAZRzjL3TBM3yMq9l4Y=; b=CnBxT4sLTXG3f283TIXjg83SYR7xA+8n/qHcsm+d+iQvaN+4ZziHqW+zAE5IsrjLx/ UvNYLk4CIAjXeKRFdhZcT+VRrobv3j/0+xwioYNimLomD9Cpk1iO2QRAtcUpttWd9E4J TMPlgPLQZ7IF5qGH1Jb4lLNAhfZiPcG9StK2oi5JfVoqoS5fN51ohUTJvEBZCTzKn0qx iTJSExq/QM1eGzYNfSjSyfOVpvpFEzVRyH9o0yYvbjS/dp+nvHv4Lr3314LfXWFe/pch bkJXU1XZC2gtj90XdOls7ogUqZAPQ+Wc8a5l8QjxABMrRvWEESJ9svCPOxDf2FVwhbpw ompQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="EKHFg/a7"; 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 a185si37343578pge.404.2018.11.19.08.38.04; Mon, 19 Nov 2018 08:38:19 -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="EKHFg/a7"; 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 S1732030AbeKTDA7 (ORCPT + 99 others); Mon, 19 Nov 2018 22:00:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:60946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730931AbeKTDA6 (ORCPT ); Mon, 19 Nov 2018 22:00:58 -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 0D1112086A; Mon, 19 Nov 2018 16:36:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1542645409; bh=rQYhXDshpTwHhOdmLV1dbiPjjhu0oqVoa3zvfu39pSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EKHFg/a7hgfG5dwmdP9srtP+W3adOa7XlzUm+7oAX0FaDMXP4X31wMcHXVWtN9rN0 viv10IQBXrcY3sL5b3N38fwo7fklyK/hN7JByi9gSM7M9Q3ge5qe+hrg7JOPKPGZdG wiroEjdhq3D57OZ3/ZZqY8q6TikXqPtPy7Lm3Duc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jan Kara , Vasily Averin , Theodore Tso , stable@kernel.org Subject: [PATCH 4.19 144/205] ext4: fix buffer leak in ext4_xattr_move_to_block() on error path Date: Mon, 19 Nov 2018 17:27:31 +0100 Message-Id: <20181119162638.125392668@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 6bdc9977fcdedf47118d2caf7270a19f4b6d8a8f upstream. Fixes: 3f2571c1f91f ("ext4: factor out xattr moving") Fixes: 6dd4ee7cab7e ("ext4: Expand extra_inodes space per ...") Reviewed-by: Jan Kara Signed-off-by: Vasily Averin Signed-off-by: Theodore Ts'o Cc: stable@kernel.org # 2.6.23 Signed-off-by: Greg Kroah-Hartman --- fs/ext4/xattr.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -2627,6 +2627,8 @@ out: kfree(buffer); if (is) brelse(is->iloc.bh); + if (bs) + brelse(bs->bh); kfree(is); kfree(bs);