Skip to content

Commit

Permalink
selinux: Fix check for xfrm selinux context algorithm
Browse files Browse the repository at this point in the history
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: Steffen Klassert <[email protected]>
Acked-by: Paul Moore <[email protected]>
Signed-off-by: Eric Paris <[email protected]>
  • Loading branch information
klassert authored and eparis committed Feb 25, 2011
1 parent 4916ca4 commit 8f82a68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/selinux/xfrm.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp,
if (!uctx)
goto not_from_user;

if (uctx->ctx_doi != XFRM_SC_ALG_SELINUX)
if (uctx->ctx_alg != XFRM_SC_ALG_SELINUX)
return -EINVAL;

str_len = uctx->ctx_len;
Expand Down

0 comments on commit 8f82a68

Please sign in to comment.