* Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit test fix for exec arg len
@ 2015-07-12 2:11 Mustapha Abiola
2015-07-13 20:32 ` Paul Moore
2015-07-14 14:24 ` Richard Guy Briggs
0 siblings, 2 replies; 3+ messages in thread
From: Mustapha Abiola @ 2015-07-12 2:11 UTC (permalink / raw)
To: eparis, paul, linux-kernel, linux-audit, mingo
[-- Attachment #1: Type: text/plain, Size: 947 bytes --]
>From 55fae099d46749b73895934aab8c2823c5a23abe Mon Sep 17 00:00:00 2001
From: Mustapha Abiola <hi@mustapha.org>
Date: Sat, 11 Jul 2015 17:01:04 +0000
Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit
test fix for exec arg len
Quick patch to fix the needless check of `len` being < 0 as its an
unsigned int.
Signed-off-by: Mustapha Abiola <hi@mustapha.org>
---
kernel/auditsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index e85bdfd..0012476 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1021,7 +1021,7 @@ static int audit_log_single_execve_arg(struct
audit_context *context,
* for strings that are too long, we should not have created
* any.
*/
- if (WARN_ON_ONCE(len < 0 || len > MAX_ARG_STRLEN - 1)) {
+ if (WARN_ON_ONCE(len > MAX_ARG_STRLEN - 1)) {
send_sig(SIGKILL, current, 0);
return -1;
}
--
1.9.1
[-- Attachment #2: 0001-Fix-redundant-check-against-unsigned-int-in-broken-a.patch --]
[-- Type: application/octet-stream, Size: 930 bytes --]
From 55fae099d46749b73895934aab8c2823c5a23abe Mon Sep 17 00:00:00 2001
From: Mustapha Abiola <hi@mustapha.org>
Date: Sat, 11 Jul 2015 17:01:04 +0000
Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit
test fix for exec arg len
Quick patch to fix the needless check of `len` being < 0 as its an
unsigned int.
Signed-off-by: Mustapha Abiola <hi@mustapha.org>
---
kernel/auditsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index e85bdfd..0012476 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1021,7 +1021,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
* for strings that are too long, we should not have created
* any.
*/
- if (WARN_ON_ONCE(len < 0 || len > MAX_ARG_STRLEN - 1)) {
+ if (WARN_ON_ONCE(len > MAX_ARG_STRLEN - 1)) {
send_sig(SIGKILL, current, 0);
return -1;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit test fix for exec arg len
2015-07-12 2:11 Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit test fix for exec arg len Mustapha Abiola
@ 2015-07-13 20:32 ` Paul Moore
2015-07-14 14:24 ` Richard Guy Briggs
1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2015-07-13 20:32 UTC (permalink / raw)
To: Mustapha Abiola; +Cc: eparis, linux-kernel, linux-audit, mingo
On Sunday, July 12, 2015 03:11:09 AM Mustapha Abiola wrote:
> From 55fae099d46749b73895934aab8c2823c5a23abe Mon Sep 17 00:00:00 2001
>
> From: Mustapha Abiola <hi@mustapha.org>
>
> Date: Sat, 11 Jul 2015 17:01:04 +0000
>
> Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken
> audit test fix for exec arg len
>
>
> Quick patch to fix the needless check of `len` being < 0 as its an
>
> unsigned int.
>
>
> Signed-off-by: Mustapha Abiola <hi@mustapha.org>
>
> ---
>
> kernel/auditsc.c | 2 +-
>
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thank you for the patch, but it appears your mail client has mangled the patch
so it does not apply cleanly. As a general rule, you should be able to save
the email and apply it directly to the tree; if not, you are doing something
wrong.
Have you read the notes in the Documentation/SubmittingPatches file, yet? If
not, I suggest taking a look, there is a lot of good information there on
submitting patches to the mailing list.
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
>
> index e85bdfd..0012476 100644
>
> --- a/kernel/auditsc.c
>
> +++ b/kernel/auditsc.c
>
> @@ -1021,7 +1021,7 @@ static int audit_log_single_execve_arg(struct
> audit_context *context,
>
> * for strings that are too long, we should not have created
>
> * any.
>
> */
>
> - if (WARN_ON_ONCE(len < 0 || len > MAX_ARG_STRLEN - 1)) {
>
> + if (WARN_ON_ONCE(len > MAX_ARG_STRLEN - 1)) {
>
> send_sig(SIGKILL, current, 0);
>
> return -1;
>
> }
--
paul moore
www.paul-moore.com
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit test fix for exec arg len
2015-07-12 2:11 Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit test fix for exec arg len Mustapha Abiola
2015-07-13 20:32 ` Paul Moore
@ 2015-07-14 14:24 ` Richard Guy Briggs
1 sibling, 0 replies; 3+ messages in thread
From: Richard Guy Briggs @ 2015-07-14 14:24 UTC (permalink / raw)
To: Mustapha Abiola; +Cc: paul, linux-kernel, linux-audit
On 15/07/12, Mustapha Abiola wrote:
> >From 55fae099d46749b73895934aab8c2823c5a23abe Mon Sep 17 00:00:00 2001
> From: Mustapha Abiola <hi@mustapha.org>
> Date: Sat, 11 Jul 2015 17:01:04 +0000
> Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit test fix for exec arg len
>
> Quick patch to fix the needless check of `len` being < 0 as its an unsigned int.
If you are able, it is much easier to use "git format-patch ..." and
"git send-email ...". Something in your workflow is double-spacing your
message... I echo Paul's recommendation...
> Signed-off-by: Mustapha Abiola <hi@mustapha.org>
>
> ---
>
> kernel/auditsc.c | 2 +-
>
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
>
> index e85bdfd..0012476 100644
>
> --- a/kernel/auditsc.c
>
> +++ b/kernel/auditsc.c
>
> @@ -1021,7 +1021,7 @@ static int audit_log_single_execve_arg(struct
> audit_context *context,
>
> * for strings that are too long, we should not have created
>
> * any.
>
> */
>
> - if (WARN_ON_ONCE(len < 0 || len > MAX_ARG_STRLEN - 1)) {
>
> + if (WARN_ON_ONCE(len > MAX_ARG_STRLEN - 1)) {
>
> send_sig(SIGKILL, current, 0);
>
> return -1;
>
> }
>
> --
>
> 1.9.1
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit
- RGB
--
Richard Guy Briggs <rbriggs@redhat.com>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-14 14:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-12 2:11 Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit test fix for exec arg len Mustapha Abiola
2015-07-13 20:32 ` Paul Moore
2015-07-14 14:24 ` Richard Guy Briggs
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox