projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
smackfs: restrict bytes count in smk_set_cipso()
[linux-2.6-microblaze.git]
/
security
/
smack
/
smackfs.c
diff --git
a/security/smack/smackfs.c
b/security/smack/smackfs.c
index
66f3c53
..
3a75d2a
100644
(file)
--- a/
security/smack/smackfs.c
+++ b/
security/smack/smackfs.c
@@
-855,6
+855,8
@@
static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
if (format == SMK_FIXED24_FMT &&
(count < SMK_CIPSOMIN || count > SMK_CIPSOMAX))
return -EINVAL;
+ if (count > PAGE_SIZE)
+ return -EINVAL;
data = memdup_user_nul(buf, count);
if (IS_ERR(data))