Commit 8f82a688 authored by Steffen Klassert's avatar Steffen Klassert Committed by Eric Paris

selinux: Fix check for xfrm selinux context algorithm

selinux_xfrm_sec_ctx_alloc accidentally checks the xfrm domain of
interpretation against the selinux context algorithm. This patch
fixes this by checking ctx_alg against the selinux context algorithm.
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Acked-by: default avatarPaul Moore <paul.moore@hp.com>
Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent 4916ca40
...@@ -208,7 +208,7 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp, ...@@ -208,7 +208,7 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp,
if (!uctx) if (!uctx)
goto not_from_user; goto not_from_user;
if (uctx->ctx_doi != XFRM_SC_ALG_SELINUX) if (uctx->ctx_alg != XFRM_SC_ALG_SELINUX)
return -EINVAL; return -EINVAL;
str_len = uctx->ctx_len; str_len = uctx->ctx_len;
......
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