Commit 4eb327b5 authored by Venkat Yekkirala's avatar Venkat Yekkirala Committed by David S. Miller

[SELINUX]: Fix bug in security_sid_mls_copy

The following fixes a bug where random mem is being tampered with in the
non-mls case; encountered by Jashua Brindle on a gentoo box.
Signed-off-by: default avatarVenkat Yekkirala <vyekkirala@TrustedCS.com>
Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 16164366
...@@ -1841,7 +1841,7 @@ int security_sid_mls_copy(u32 sid, u32 mls_sid, u32 *new_sid) ...@@ -1841,7 +1841,7 @@ int security_sid_mls_copy(u32 sid, u32 mls_sid, u32 *new_sid)
u32 len; u32 len;
int rc = 0; int rc = 0;
if (!ss_initialized) { if (!ss_initialized || !selinux_mls_enabled) {
*new_sid = sid; *new_sid = sid;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment