projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
024c7e3
)
configfs: Return -EFBIG from configfs_write_bin_file.
author
Phil Turnbull
<phil.turnbull@oracle.com>
Thu, 15 Sep 2016 16:20:12 +0000
(12:20 -0400)
committer
Christoph Hellwig
<hch@lst.de>
Fri, 16 Sep 2016 10:58:28 +0000
(12:58 +0200)
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")
Cc: stable@kernel.org
Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/configfs/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/configfs/file.c
b/fs/configfs/file.c
index c30cf49b69d2f3de59e61ef273478d797cccc1b7..2c6312db85168050f6ee35d0e82465d994e7a1ea 100644
(file)
--- a/
fs/configfs/file.c
+++ b/
fs/configfs/file.c
@@
-333,6
+333,7
@@
configfs_write_bin_file(struct file *file, const char __user *buf,
if (bin_attr->cb_max_size &&
*ppos + count > bin_attr->cb_max_size) {
len = -EFBIG;
+ goto out;
}
tbuf = vmalloc(*ppos + count);
This page took
0.02639 seconds
and
5
git commands to generate.