<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/audit.c, branch v2.6.25</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.25</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.25'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-03-28T21:45:21Z</updated>
<entry>
<title>audit: silence two kerneldoc warnings in kernel/audit.c</title>
<updated>2008-03-28T21:45:21Z</updated>
<author>
<name>Dave Jones</name>
<email>davej@codemonkey.org.uk</email>
</author>
<published>2008-03-28T21:15:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f706d5d22c35e18ed13a4b2b4991aac75bf39df5'/>
<id>urn:sha1:f706d5d22c35e18ed13a4b2b4991aac75bf39df5</id>
<content type='text'>
Silence two kerneldoc warnings.

Warning(kernel/audit.c:1276): No description found for parameter 'string'
Warning(kernel/audit.c:1276): No description found for parameter 'len'

[also fix a typo for bonus points]

Signed-off-by: Dave Jones &lt;davej@codemonkey.org.uk&gt;
Acked-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>audit: netlink socket can be auto-bound to pid other than current-&gt;pid (v2)</title>
<updated>2008-03-20T22:39:41Z</updated>
<author>
<name>Pavel Emelyanov</name>
<email>xemul@openvz.org</email>
</author>
<published>2008-03-20T22:39:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75c0371a2d385ecbd6e1f854d9dce20889f06736'/>
<id>urn:sha1:75c0371a2d385ecbd6e1f854d9dce20889f06736</id>
<content type='text'>
From:	Pavel Emelyanov &lt;xemul@openvz.org&gt;

This patch is based on the one from Thomas.

The kauditd_thread() calls the netlink_unicast() and passes 
the audit_pid to it. The audit_pid, in turn, is received from 
the user space and the tool (I've checked the audit v1.6.9) 
uses getpid() to pass one in the kernel. Besides, this tool 
doesn't bind the netlink socket to this id, but simply creates 
it allowing the kernel to auto-bind one.

That's the preamble.

The problem is that netlink_autobind() _does_not_ guarantees
that the socket will be auto-bound to the current pid. Instead
it uses the current pid as a hint to start looking for a free
id. So, in case of conflict, the audit messages can be sent
to a wrong socket. This can happen (it's unlikely, but can be)
in case some task opens more than one netlink sockets and then
the audit one starts - in this case the audit's pid can be busy
and its socket will be bound to another id.

The proposal is to introduce an audit_nlk_pid in audit subsys,
that will point to the netlink socket to send packets to. It
will most often be equal to audit_pid. The socket id can be 
got from the skb's netlink CB right in the audit_receive_msg.
The audit_nlk_pid reset to 0 is not required, since all the
decisions are taken based on audit_pid value only.

Later, if the audit tools will bind the socket themselves, the
kernel will have to provide a way to setup the audit_nlk_pid
as well.

A good side effect of this patch is that audit_pid can later 
be converted to struct pid, as it is not longer safe to use 
pid_t-s in the presence of pid namespaces. But audit code still 
uses the tgid from task_struct in the audit_signal_info and in
the audit_filter_syscall.

Signed-off-by: Thomas Graf &lt;tgraf@suug.ch&gt;
Signed-off-by: Pavel Emelyanov &lt;xemul@openvz.org&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>[PATCH] drop EOE records from printk</title>
<updated>2008-03-01T12:16:06Z</updated>
<author>
<name>Steve Grubb</name>
<email>sgrubb@redhat.com</email>
</author>
<published>2008-02-21T21:59:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8d07a67cface19ac07d7324f38bda7bbb06bbdb2'/>
<id>urn:sha1:8d07a67cface19ac07d7324f38bda7bbb06bbdb2</id>
<content type='text'>
Hi,

While we are looking at the printk issue, I see that its printk'ing the EOE
(end of event) records which is really not something that we need in syslog.
Its really intended for the realtime audit event stream handled by the audit
daemon. So, lets avoid printk'ing that record type.

Signed-off-by: Steve Grubb &lt;sgrubb@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>[RFC] AUDIT: do not panic when printk loses messages</title>
<updated>2008-03-01T12:16:06Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2008-02-21T20:53:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b29ee87e9b441e72454efd1be56aa1a05ffb2f58'/>
<id>urn:sha1:b29ee87e9b441e72454efd1be56aa1a05ffb2f58</id>
<content type='text'>
On the latest kernels if one was to load about 15 rules, set the failure
state to panic, and then run service auditd stop the kernel will panic.
This is because auditd stops, then the script deletes all of the rules.
These deletions are sent as audit messages out of the printk kernel
interface which is already known to be lossy.  These will overun the
default kernel rate limiting (10 really fast messages) and will call
audit_panic().  The same effect can happen if a slew of avc's come
through while auditd is stopped.

This can be fixed a number of ways but this patch fixes the problem by
just not panicing if auditd is not running.  We know printk is lossy and
if the user chooses to set the failure mode to panic and tries to use
printk we can't make any promises no matter how hard we try, so why try?
At least in this way we continue to get lost message accounting and will
eventually know that things went bad.

The other change is to add a new call to audit_log_lost() if auditd
disappears.  We already pulled the skb off the queue and couldn't send
it so that message is lost.  At least this way we will account for the
last message and panic if the machine is configured to panic.  This code
path should only be run if auditd dies for unforeseen reasons.  If
auditd closes correctly audit_pid will get set to 0 and we won't walk
this code path.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>d_path: Make d_path() use a struct path</title>
<updated>2008-02-15T05:17:09Z</updated>
<author>
<name>Jan Blunck</name>
<email>jblunck@suse.de</email>
</author>
<published>2008-02-15T03:38:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf28b4863f9ee8f122e8ff3ac0d403e07ba9c6d9'/>
<id>urn:sha1:cf28b4863f9ee8f122e8ff3ac0d403e07ba9c6d9</id>
<content type='text'>
d_path() is used on a &lt;dentry,vfsmount&gt; pair.  Lets use a struct path to
reflect this.

[akpm@linux-foundation.org: fix build in mm/memory.c]
Signed-off-by: Jan Blunck &lt;jblunck@suse.de&gt;
Acked-by: Bryan Wu &lt;bryan.wu@analog.com&gt;
Acked-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: Michael Halcrow &lt;mhalcrow@us.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>d_path: Use struct path in struct avc_audit_data</title>
<updated>2008-02-15T05:17:08Z</updated>
<author>
<name>Jan Blunck</name>
<email>jblunck@suse.de</email>
</author>
<published>2008-02-15T03:38:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=44707fdf5938ad269ea5d6c5744d82f6a7328746'/>
<id>urn:sha1:44707fdf5938ad269ea5d6c5744d82f6a7328746</id>
<content type='text'>
audit_log_d_path() is a d_path() wrapper that is used by the audit code.  To
use a struct path in audit_log_d_path() I need to embed it into struct
avc_audit_data.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Jan Blunck &lt;jblunck@suse.de&gt;
Acked-by: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: "J. Bruce Fields" &lt;bfields@fieldses.org&gt;
Cc: Neil Brown &lt;neilb@suse.de&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Cc: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[AUDIT] ratelimit printk messages audit</title>
<updated>2008-02-01T19:25:04Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2008-01-24T03:55:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=320f1b1ed28c601cc152053a2f428a126cb608bc'/>
<id>urn:sha1:320f1b1ed28c601cc152053a2f428a126cb608bc</id>
<content type='text'>
some printk messages from the audit system can become excessive.  This
patch ratelimits those messages.  It was found that messages, such as
the audit backlog lost printk message could flood the logs to the point
that a machine could take an nmi watchdog hit or otherwise become
unresponsive.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>[patch 2/2] audit: complement va_copy with va_end()</title>
<updated>2008-02-01T19:24:57Z</updated>
<author>
<name>Richard Knutsson</name>
<email>ricknu-0@student.ltu.se</email>
</author>
<published>2008-01-10T19:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=148b38dc9309044c8656aa36d5fd86069e2ea7cc'/>
<id>urn:sha1:148b38dc9309044c8656aa36d5fd86069e2ea7cc</id>
<content type='text'>
Complement va_copy() with va_end().

Signed-off-by: Richard Knutsson &lt;ricknu-0@student.ltu.se&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[patch 1/2] kernel/audit.c: warning fix</title>
<updated>2008-02-01T19:24:51Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2008-01-10T19:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef00be0554f1af9f2b685e0e3bb9e2ec0181937e'/>
<id>urn:sha1:ef00be0554f1af9f2b685e0e3bb9e2ec0181937e</id>
<content type='text'>
kernel/audit.c: In function 'audit_log_start':
kernel/audit.c:1133: warning: 'serial' may be used uninitialized in this function

Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>[AUDIT] create context if auditing was ever enabled</title>
<updated>2008-02-01T19:24:45Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2008-01-08T22:38:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b593d384efcff7bdf6beb1bc1bc69927977aee26'/>
<id>urn:sha1:b593d384efcff7bdf6beb1bc1bc69927977aee26</id>
<content type='text'>
Disabling audit at runtime by auditctl doesn't mean that we can
stop allocating contexts for new processes; we don't want to miss them
when that sucker is reenabled.

(based on work from Al Viro in the RHEL kernel series)

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
</feed>
