summaryrefslogtreecommitdiff
path: root/security/integrity/ima
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2014-10-29 15:03:54 +1100
committerJames Morris <james.l.morris@oracle.com>2014-10-29 15:03:54 +1100
commit6c880ad51b829006c5387df88967954c0e874993 (patch)
tree3a164ed2e33c874be7dbe4783037985996ac9efc /security/integrity/ima
parent9f76628da20f96a179ca62b504886f99ecc29223 (diff)
parent3b1deef6b1289a99505858a3b212c5b50adf0c2f (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity into for-linus
Diffstat (limited to 'security/integrity/ima')
-rw-r--r--security/integrity/ima/ima_appraise.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_appraise.c b/security/integrity/ima/ima_appraise.c
index 922685483bd3..7c8f41e618b6 100644
--- a/security/integrity/ima/ima_appraise.c
+++ b/security/integrity/ima/ima_appraise.c
@@ -378,6 +378,8 @@ int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name,
result = ima_protect_xattr(dentry, xattr_name, xattr_value,
xattr_value_len);
if (result == 1) {
+ if (!xattr_value_len || (xvalue->type >= IMA_XATTR_LAST))
+ return -EINVAL;
ima_reset_appraise_flags(dentry->d_inode,
(xvalue->type == EVM_IMA_XATTR_DIGSIG) ? 1 : 0);
result = 0;