[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220217142133.72205-1-cgzones@googlemail.com>
Date: Thu, 17 Feb 2022 15:21:25 +0100
From: Christian Göttsche <cgzones@...glemail.com>
To: selinux@...r.kernel.org
Cc: Paul Moore <paul@...l-moore.com>,
Stephen Smalley <stephen.smalley.work@...il.com>,
Eric Paris <eparis@...isplace.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Ondrej Mosnacek <omosnace@...hat.com>,
Austin Kim <austin.kim@....com>,
Kees Cook <keescook@...omium.org>,
Yang Li <yang.lee@...ux.alibaba.com>,
Casey Schaufler <casey@...aufler-ca.com>,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: [PATCH 2/5] selinux: use correct type for context length
security_sid_to_context() expects a pointer to an u32 as the address
where to store the length of the computed context.
Reported by sparse:
security/selinux/xfrm.c:359:39: warning: incorrect type in argument 4 (different signedness)
security/selinux/xfrm.c:359:39: expected unsigned int [usertype] *scontext_len
security/selinux/xfrm.c:359:39: got int *
Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
---
security/selinux/xfrm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index 90697317895f..c576832febc6 100644
--- a/security/selinux/xfrm.c
+++ b/security/selinux/xfrm.c
@@ -347,7 +347,7 @@ int selinux_xfrm_state_alloc_acquire(struct xfrm_state *x,
int rc;
struct xfrm_sec_ctx *ctx;
char *ctx_str = NULL;
- int str_len;
+ u32 str_len;
if (!polsec)
return 0;
--
2.35.1
Powered by blists - more mailing lists