linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Dave Jones <davej@redhat.com>, Kees Cook <keescook@chromium.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: 3.6-rc4 audit_log_d_path oops.
Date: Thu, 6 Sep 2012 10:50:27 -0700	[thread overview]
Message-ID: <CAGXu5jJhuuMsfeZtKoJ7ZWgRKgs5Fcp2GgO9+UaA5kMCk_H1qQ@mail.gmail.com> (raw)
In-Reply-To: <20120906164536.GB30220@redhat.com>

On Thu, Sep 6, 2012 at 9:45 AM, Dave Jones <davej@redhat.com> wrote:
> On Thu, Sep 06, 2012 at 09:32:49AM -0700, Kees Cook wrote:
>  > > I just realised, the funny thing about this is that the machine running that test
>  > > had selinux/audit disabled. And yet here we are, screwing around with audit buffers.
>  >
>  > The intent was to have this message show up in dmesg even if auditd
>  > wasn't running, and even if the specific process wasn't being
>  > explicitly audited.
>  >
>  > > Should there be a test on audit_enable=0 in audit_log_link_denied() ?
>  > >
>  > > I'm now curious how much more of the audit code is getting run through similar lack of tests
>  >
>  > What is the condition in which audit_log_start fails?
>
> in the case of that oops, given I had booted with audit=0, I suspect it was hitting the first check...
>
> 1157         if (audit_initialized != AUDIT_INITIALIZED)
> 1158                 return NULL;

Ah-ha, okay. Yeah, I'm fine with the fix you had. If _start fails, just return.

-Kees

-- 
Kees Cook
Chrome OS Security

      reply	other threads:[~2012-09-06 17:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-06 13:46 3.6-rc4 audit_log_d_path oops Dave Jones
2012-09-06 15:08 ` Check all returns from audit_log_start Dave Jones
2012-09-06 15:36   ` Eric Paris
2012-09-06 15:47     ` Dave Jones
2012-09-06 15:56       ` Dave Jones
2012-09-06 15:16 ` 3.6-rc4 audit_log_d_path oops Dave Jones
2012-09-06 15:34   ` Eric Paris
2012-09-06 16:32   ` Kees Cook
2012-09-06 16:45     ` Dave Jones
2012-09-06 17:50       ` Kees Cook [this message]

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=CAGXu5jJhuuMsfeZtKoJ7ZWgRKgs5Fcp2GgO9+UaA5kMCk_H1qQ@mail.gmail.com \
    --to=keescook@chromium.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).