* [PATCH next] lsm: Fix signedness bug in selinux_secid_to_secctx()
@ 2024-11-02 9:31 Dan Carpenter
2024-11-02 17:41 ` Casey Schaufler
2024-11-05 22:05 ` Paul Moore
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2024-11-02 9:31 UTC (permalink / raw)
To: Casey Schaufler
Cc: Paul Moore, Stephen Smalley, Ondrej Mosnacek, selinux,
linux-kernel, kernel-janitors
The "ret" variable needs to be signed for the error checking to work.
Fixes: 95a3c11eb670 ("lsm: replace context+len with lsm_context")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
security/selinux/hooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index eca9674c9478..0ff018f557ac 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -6644,7 +6644,7 @@ static int selinux_ismaclabel(const char *name)
static int selinux_secid_to_secctx(u32 secid, struct lsm_context *cp)
{
u32 seclen;
- u32 ret;
+ int ret;
if (cp) {
cp->id = LSM_ID_SELINUX;
--
2.45.2
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH next] lsm: Fix signedness bug in selinux_secid_to_secctx()
2024-11-02 9:31 [PATCH next] lsm: Fix signedness bug in selinux_secid_to_secctx() Dan Carpenter
@ 2024-11-02 17:41 ` Casey Schaufler
2024-11-05 22:05 ` Paul Moore
1 sibling, 0 replies; 3+ messages in thread
From: Casey Schaufler @ 2024-11-02 17:41 UTC (permalink / raw)
To: Dan Carpenter
Cc: Paul Moore, Stephen Smalley, Ondrej Mosnacek, selinux,
linux-kernel, kernel-janitors, Casey Schaufler
On 11/2/2024 2:31 AM, Dan Carpenter wrote:
> The "ret" variable needs to be signed for the error checking to work.
Doh.
Thank you.
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
>
> Fixes: 95a3c11eb670 ("lsm: replace context+len with lsm_context")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> security/selinux/hooks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index eca9674c9478..0ff018f557ac 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -6644,7 +6644,7 @@ static int selinux_ismaclabel(const char *name)
> static int selinux_secid_to_secctx(u32 secid, struct lsm_context *cp)
> {
> u32 seclen;
> - u32 ret;
> + int ret;
>
> if (cp) {
> cp->id = LSM_ID_SELINUX;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH next] lsm: Fix signedness bug in selinux_secid_to_secctx()
2024-11-02 9:31 [PATCH next] lsm: Fix signedness bug in selinux_secid_to_secctx() Dan Carpenter
2024-11-02 17:41 ` Casey Schaufler
@ 2024-11-05 22:05 ` Paul Moore
1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2024-11-05 22:05 UTC (permalink / raw)
To: Dan Carpenter
Cc: Casey Schaufler, Stephen Smalley, Ondrej Mosnacek, selinux,
linux-kernel, kernel-janitors
On Sat, Nov 2, 2024 at 5:31 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> The "ret" variable needs to be signed for the error checking to work.
>
> Fixes: 95a3c11eb670 ("lsm: replace context+len with lsm_context")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> security/selinux/hooks.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Merged into lsm/dev-staging, thanks Dan.
--
paul-moore.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-05 22:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-02 9:31 [PATCH next] lsm: Fix signedness bug in selinux_secid_to_secctx() Dan Carpenter
2024-11-02 17:41 ` Casey Schaufler
2024-11-05 22:05 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®