From: Paul Moore <pmoore@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>, Jan Kara <jack@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Revert: audit: Fix check of return value of strnlen_user()
Date: Wed, 08 Jul 2015 15:06:32 -0400 [thread overview]
Message-ID: <1457123.W9SXFTB1AL@sifl> (raw)
In-Reply-To: <20150708122943.4716f7c3@gandalf.local.home>
On Wednesday, July 08, 2015 12:29:43 PM Steven Rostedt wrote:
> On Wed, 8 Jul 2015 12:02:49 -0400
>
> Steven Rostedt <rostedt@goodmis.org> wrote:
> > Well, any testing will have to wait. The reason I found this is because
> > it caused my own tests to fail for a bug fix I'm testing (unrelated to
> > this) that I'm getting ready to send to you. My box to run this on is
> > back to running those tests, which can take several hours.
>
> Oh well, my tests just stumbled over another unrelated 4.2-rc1 bug (I
> need to dig into this one now :-( ). But that freed up my machine to
> test this.
>
> I tested the following patch. Feel free to author it yourself and just
> add my reported/tested-by tags, or give it to me. Either way, I don't
> care. I just want it fixed so that it doesn't make my own tests fail.
>
> Thanks!
Acked-by: Paul Moore <pmoore@redhat.com>
Sorry to be late in replying, and I see that this is already in Linus' tree so
the ack above it probably a bit pointless, but thanks for reporting this and
providing a fix.
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> index 09c65640cad6..e85bdfd15fed 100644
> --- a/kernel/auditsc.c
> +++ b/kernel/auditsc.c
> @@ -1021,8 +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 (unlikely((len == 0) || len > MAX_ARG_STRLEN - 1)) {
> - WARN_ON(1);
> + if (WARN_ON_ONCE(len < 0 || len > MAX_ARG_STRLEN - 1)) {
> send_sig(SIGKILL, current, 0);
> return -1;
> }
--
paul moore
security @ redhat
next prev parent reply other threads:[~2015-07-08 19:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 15:26 [PATCH] Revert: audit: Fix check of return value of strnlen_user() Steven Rostedt
2015-07-08 15:53 ` Linus Torvalds
2015-07-08 15:59 ` Steven Rostedt
2015-07-08 16:02 ` Steven Rostedt
2015-07-08 16:29 ` Steven Rostedt
2015-07-08 19:06 ` Paul Moore [this message]
2015-07-09 4:09 ` Steven Rostedt
2015-07-09 12:54 ` Jan Kara
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=1457123.W9SXFTB1AL@sifl \
--to=pmoore@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=torvalds@linux-foundation.org \
/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