Patch "configfs: Return -EFBIG from configfs_write_bin_file." has been added to the 4.7-stable tree
Subsystems (2)
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 <[email protected]> know about it.
Quoted 1 line
From
42857cf512cb34c2c8cb50f1e766689d979d64e0Mon Sep 17 00:00:00 2001
From: Phil Turnbull <[email protected]>
Date: Thu, 15 Sep 2016 12:20:12 -0400
Subject: configfs: Return -EFBIG from configfs_write_bin_file.
From: Phil Turnbull <[email protected]>
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.
--- fs/configfs/file.c | 1 + 1 file changed, 1 insertion(+)
fs/configfs/file.c +1 -0
@@ -333,6 +333,7 @@ configfs_write_bin_file(struct file *filif (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 [email protected] are
queue-4.7/configfs-return-efbig-from-configfs_write_bin_file.patch