From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:39415 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934199AbcI0PFE (ORCPT ); Tue, 27 Sep 2016 11:05:04 -0400 Subject: Patch "configfs: Return -EFBIG from configfs_write_bin_file." has been added to the 4.7-stable tree To: phil.turnbull@oracle.com, gregkh@linuxfoundation.org, hch@lst.de Cc: , From: Date: Tue, 27 Sep 2016 17:04:43 +0200 Message-ID: <1474988683130@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled configfs: Return -EFBIG from configfs_write_bin_file. to the 4.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: configfs-return-efbig-from-configfs_write_bin_file.patch and it can be found in the queue-4.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 42857cf512cb34c2c8cb50f1e766689d979d64e0 Mon Sep 17 00:00:00 2001 From: Phil Turnbull Date: Thu, 15 Sep 2016 12:20:12 -0400 Subject: configfs: Return -EFBIG from configfs_write_bin_file. From: Phil Turnbull commit 42857cf512cb34c2c8cb50f1e766689d979d64e0 upstream. The check for writing more than cb_max_size bytes does not 'goto out' so it is a no-op which allows users to vmalloc an arbitrary amount. Fixes: 03607ace807b ("configfs: implement binary attributes") Signed-off-by: Phil Turnbull Signed-off-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman --- fs/configfs/file.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/configfs/file.c +++ b/fs/configfs/file.c @@ -333,6 +333,7 @@ configfs_write_bin_file(struct file *fil if (bin_attr->cb_max_size && *ppos + count > bin_attr->cb_max_size) { len = -EFBIG; + goto out; } tbuf = vmalloc(*ppos + count); Patches currently in stable-queue which might be from phil.turnbull@oracle.com are queue-4.7/configfs-return-efbig-from-configfs_write_bin_file.patch