From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Guy Briggs Subject: Re: Subject: [PATCH 1/1] Fix redundant check against unsigned int in broken audit test fix for exec arg len Date: Tue, 14 Jul 2015 10:24:54 -0400 Message-ID: <20150714142454.GA29053@madcap2.tricolour.ca> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Mustapha Abiola Cc: paul@paul-moore.com, linux-kernel@vger.kernel.org, linux-audit@redhat.com List-Id: linux-audit@redhat.com On 15/07/12, Mustapha Abiola wrote: > >From 55fae099d46749b73895934aab8c2823c5a23abe Mon Sep 17 00:00:00 2001 > From: Mustapha Abiola > 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 > > --- > > 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 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