diff options
author | James Morris <james.l.morris@oracle.com> | 2016-09-19 12:27:10 +1000 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2016-09-19 12:27:10 +1000 |
commit | de2f4b3453d29934ceb41eccebd55ab087e17d6c (patch) | |
tree | c8f363bd1ddddc5bc382e624d47c507ee956d19d /security/selinux/ss/conditional.c | |
parent | e350e24694e447e6ab7312fffae5ca31a0bb5165 (diff) | |
parent | 9b6a9ecc2d88ccdc57efc22d69436b9dd7e2eceb (diff) | |
download | lwn-de2f4b3453d29934ceb41eccebd55ab087e17d6c.tar.gz lwn-de2f4b3453d29934ceb41eccebd55ab087e17d6c.zip |
Merge branch 'stable-4.9' of git://git.infradead.org/users/pcmoore/selinux into next
Diffstat (limited to 'security/selinux/ss/conditional.c')
-rw-r--r-- | security/selinux/ss/conditional.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index 456e1a9bcfde..34afeadd9e73 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c @@ -242,6 +242,8 @@ int cond_read_bool(struct policydb *p, struct hashtab *h, void *fp) goto err; len = le32_to_cpu(buf[2]); + if (((len == 0) || (len == (u32)-1))) + goto err; rc = -ENOMEM; key = kmalloc(len + 1, GFP_KERNEL); |