diff options
author | James Morris <james.l.morris@oracle.com> | 2014-02-10 01:48:21 +0100 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-02-10 01:48:21 +0100 |
commit | f743166da7e93b617dd93120cdb5edcc8b84c464 (patch) | |
tree | cd71baff2cdd908bd4a5243f65f6b739a653d919 /security/selinux/ss | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mas... (diff) | |
parent | SELinux: Fix kernel BUG on empty security contexts. (diff) | |
download | linux-f743166da7e93b617dd93120cdb5edcc8b84c464.tar.xz linux-f743166da7e93b617dd93120cdb5edcc8b84c464.zip |
Merge branch 'stable-3.14' of git://git.infradead.org/users/pcmoore/selinux into for-linus
Diffstat (limited to 'security/selinux/ss')
-rw-r--r-- | security/selinux/ss/services.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index c93c21127f0c..5d0144ee8ed6 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -1232,6 +1232,10 @@ static int security_context_to_sid_core(const char *scontext, u32 scontext_len, struct context context; int rc = 0; + /* An empty security context is never valid. */ + if (!scontext_len) + return -EINVAL; + if (!ss_initialized) { int i; |