LKML Archive on
help / color / mirror / Atom feed
From: Andrew Morton <>
To: Al Viro <>
Cc: Linus Torvalds <>,, Steve Grubb <>,
	Stephen Smalley <>,
	James Morris <>
Subject: Re: [GIT PULL] audit patches
Date: Wed, 21 Feb 2007 16:03:19 -0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Sun, 18 Feb 2007 04:01:27 +0000 Al Viro <> wrote:

> Misc audit patches (resend again...); the most intrusive one is AUDIT_FD_PAIR,
> allowing to log descriptor numbers from syscalls that do not return them in
> usual way (i.e. pipe() and socketpair()).  It took some massage of
> the failure exits in sys_socketpair(); the rest is absolutely trivial.
> Please, pull from
> audit.b37

Please send patches to the list for review if practical?  In this case it
was.  I trust davem has had a look at the non-trivial changes to

Looking at the changes to audit_receive_msg():

				if (sid) {
					if (selinux_sid_to_string(
							sid, &ctx, &len)) {
							" ssid=%u", sid);
						/* Maybe call audit_panic? */
					} else
							" subj=%s", ctx);

This is assuming that selinux_sid_to_string() always initialises `ctx'.

But AFAICT there are two error paths in security_sid_to_context() which
forget to do that, so we end up doing kfree(uninitialised-local).

I'd consider that a shortcoming in security_sid_to_context(), so not a
problem in this patch, as long as people agree with my blaming above.

The coding style in there is a bit odd-looking.

The new __audit_fd_pair() has unneeded braces in it.

  reply	other threads:[~2007-02-22  0:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-18  4:01 Al Viro
2007-02-22  0:03 ` Andrew Morton [this message]
2007-02-22 13:22   ` Stephen Smalley
2007-02-22 21:19     ` Andrew Morton
2007-02-23 14:00       ` [patch 1/1] selinux: always initialize arguments to security_sid_to_context (Was: Re: [GIT PULL] audit patches) Stephen Smalley
2008-04-29 18:08 [git pull] audit patches Al Viro
2009-04-05 19:17 Al Viro

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: [GIT PULL] audit patches' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).