From: Casey Schaufler <casey@schaufler-ca.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Paul Moore <paul@paul-moore.com>,
Stephen Smalley <stephen.smalley.work@gmail.com>,
Ondrej Mosnacek <omosnace@redhat.com>,
selinux@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org,
Casey Schaufler <casey@schaufler-ca.com>
Subject: Re: [PATCH next] lsm: Fix signedness bug in selinux_secid_to_secctx()
Date: Sat, 2 Nov 2024 10:41:47 -0700 [thread overview]
Message-ID: <b226a01a-2545-4b67-9cc6-59cfa0ffabbc@schaufler-ca.com> (raw)
In-Reply-To: <2d02f331-42ee-40db-a64f-5ee378eb44db@stanley.mountain>
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;
next prev parent reply other threads:[~2024-11-02 17:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-02 9:31 Dan Carpenter
2024-11-02 17:41 ` Casey Schaufler [this message]
2024-11-05 22:05 ` Paul Moore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b226a01a-2545-4b67-9cc6-59cfa0ffabbc@schaufler-ca.com \
--to=casey@schaufler-ca.com \
--cc=dan.carpenter@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=omosnace@redhat.com \
--cc=paul@paul-moore.com \
--cc=selinux@vger.kernel.org \
--cc=stephen.smalley.work@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®