public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: linux-audit@redhat.com
Cc: aaw@google.com, a.p.zijlstra@chello.nl
Subject: Re: [patch 058/209] audit: rework execve audit
Date: Fri, 27 Jul 2007 16:13:10 -0400	[thread overview]
Message-ID: <200707271613.10753.sgrubb@redhat.com> (raw)
In-Reply-To: <200707190848.l6J8mFQf023098@imap1.linux-foundation.org>

Hi,

I was testing our rawhide kernel and I'm scrolling these errors:

WARNING: at kernel/auditsc.c:859 audit_log_execve_info() (Not tainted)

Call Trace:
 [<ffffffff8106b06f>] audit_log_exit+0x5d7/0x964
 [<ffffffff81050805>] trace_hardirqs_on+0x12e/0x151
 [<ffffffff8106b60b>] audit_syscall_exit+0x9b/0x300
 [<ffffffff8100ee62>] syscall_trace_leave+0x2c/0x87
 [<ffffffff8100beb1>] int_very_careful+0x3a/0x43


> From: Peter Zijlstra <a.p.zijlstra@chello.nl>
> diff -puN kernel/auditsc.c~audit-rework-execve-audit kernel/auditsc.c
> --- a/kernel/auditsc.c~audit-rework-execve-audit
> +++ a/kernel/auditsc.c
> @@ -831,6 +831,55 @@ static int audit_log_pid_context(struct
>  	return rc;
>  }
>
> +static void audit_log_execve_info(struct audit_buffer *ab,
> +		struct audit_aux_data_execve *axi)
> +{
> +	int i;
> +	long len, ret;
> +	const char __user *p = (const char __user *)axi->mm->arg_start;
> +	char *buf;
> +
> +	if (axi->mm != current->mm)
> +		return; /* execve failed, no additional info */
> +
> +	for (i = 0; i < axi->argc; i++, p += len) {
> +		len = strnlen_user(p, MAX_ARG_PAGES*PAGE_SIZE);
> +		/*
> +		 * We just created this mm, if we can't find the strings
> +		 * we just copied into it something is _very_ wrong. Similar
> +		 * for strings that are too long, we should not have created
> +		 * any.
> +		 */
> +		if (!len || len > MAX_ARG_STRLEN) {
> +			WARN_ON(1);
> +			send_sig(SIGKILL, current, 0);
> +		}

Which is right here ^^^

Any ideas?

-Steve

  reply	other threads:[~2007-07-27 20:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-19  8:48 [patch 058/209] audit: rework execve audit akpm
2007-07-27 20:13 ` Steve Grubb [this message]
2007-07-27 20:44   ` Peter Zijlstra
2007-07-27 20:57     ` Steve Grubb
2007-07-27 21:55       ` Peter Zijlstra
2007-07-27 22:06         ` Peter Zijlstra
2007-07-27 22:24           ` Peter Zijlstra
2007-07-27 20:50   ` Alexander Viro
2007-07-27 21:03   ` Alexander Viro
2007-07-27 21:11     ` Steve Grubb
2007-07-27 21:21       ` Alexander Viro
2007-07-27 22:55   ` [PATCH] audit: fix two bugs in the new execve audit code Peter Zijlstra
2007-07-27 23:05     ` Andrew Morton
2007-07-28  2:05     ` Steve Grubb

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=200707271613.10753.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aaw@google.com \
    --cc=linux-audit@redhat.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