<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/audit.h, branch v4.1</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=v4.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-04-22T21:49:23Z</updated>
<entry>
<title>Merge branch 'upstream' of git://git.infradead.org/users/pcmoore/audit</title>
<updated>2015-04-22T21:49:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-04-22T21:49:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27cf3a16b2535a490f8cf1d29a6634f1c70f7831'/>
<id>urn:sha1:27cf3a16b2535a490f8cf1d29a6634f1c70f7831</id>
<content type='text'>
Pull audit fixes from Paul Moore:
 "Seven audit patches for v4.1, all bug fixes.

  The largest, and perhaps most significant commit helps resolve some
  memory pressure issues related to the inode cache and audit, there are
  also a few small commits which help resolve some timing issues with
  the audit log queue, and the rest fall into the always popular "code
  clean-up" category.

  In general, nothing really substantial, just a nice set of maintenance
  patches"

* 'upstream' of git://git.infradead.org/users/pcmoore/audit:
  audit: Remove condition which always evaluates to false
  audit: reduce mmap_sem hold for mm-&gt;exe_file
  audit: consolidate handling of mm-&gt;exe_file
  audit: code clean up
  audit: don't reset working wait time accidentally with auditd
  audit: don't lose set wait time on first successful call to audit_log_start()
  audit: move the tree pruning to a dedicated thread
</content>
</entry>
<entry>
<title>audit: consolidate handling of mm-&gt;exe_file</title>
<updated>2015-02-23T21:55:47Z</updated>
<author>
<name>Davidlohr Bueso</name>
<email>dave@stgolabs.net</email>
</author>
<published>2015-02-23T02:20:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4766b199ef9e1ca6316ee4f8f9d80c2ba1ed0290'/>
<id>urn:sha1:4766b199ef9e1ca6316ee4f8f9d80c2ba1ed0290</id>
<content type='text'>
This patch adds a audit_log_d_path_exe() helper function
to share how we handle auditing of the exe_file's path.
Used by both audit and auditsc. No functionality is changed.

Signed-off-by: Davidlohr Bueso &lt;dbueso@suse.de&gt;
[PM: tweaked subject line]
Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: replace getname()/putname() hacks with reference counters</title>
<updated>2015-01-23T05:23:58Z</updated>
<author>
<name>Paul Moore</name>
<email>pmoore@redhat.com</email>
</author>
<published>2015-01-22T05:00:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55422d0bd292f5ad143cc32cb8bb8505257274c4'/>
<id>urn:sha1:55422d0bd292f5ad143cc32cb8bb8505257274c4</id>
<content type='text'>
In order to ensure that filenames are not released before the audit
subsystem is done with the strings there are a number of hacks built
into the fs and audit subsystems around getname() and putname().  To
say these hacks are "ugly" would be kind.

This patch removes the filename hackery in favor of a more
conventional reference count based approach.  The diffstat below tells
most of the story; lots of audit/fs specific code is replaced with a
traditional reference count based approach that is easily understood,
even by those not familiar with the audit and/or fs subsystems.

CC: viro@zeniv.linux.org.uk
CC: linux-fsdevel@vger.kernel.org
Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>audit: reduce scope of audit_log_fcaps</title>
<updated>2014-09-23T20:37:51Z</updated>
<author>
<name>Richard Guy Briggs</name>
<email>rgb@redhat.com</email>
</author>
<published>2014-05-26T15:02:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=691e6d59d2b6cdb4595e5f626503a1c9e98b8baf'/>
<id>urn:sha1:691e6d59d2b6cdb4595e5f626503a1c9e98b8baf</id>
<content type='text'>
audit_log_fcaps() isn't used outside kernel/audit.c.  Reduce its scope.

Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: Use struct net not pid_t to remember the network namespce to reply in</title>
<updated>2014-03-20T14:10:53Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2014-02-28T18:49:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=638a0fd2a062568c568661be0a780be8e8836d03'/>
<id>urn:sha1:638a0fd2a062568c568661be0a780be8e8836d03</id>
<content type='text'>
While reading through 3.14-rc1 I found a pretty siginficant mishandling
of network namespaces in the recent audit changes.

In struct audit_netlink_list and audit_reply add a reference to the
network namespace of the caller and remove the userspace pid of the
caller.  This cleanly remembers the callers network namespace, and
removes a huge class of races and nasty failure modes that can occur
when attempting to relook up the callers network namespace from a pid_t
(including the caller's network namespace changing, pid wraparound, and
the pid simply not being present).

Signed-off-by: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Acked-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: Audit proc/&lt;pid&gt;/cmdline aka proctitle</title>
<updated>2014-03-20T14:10:52Z</updated>
<author>
<name>William Roberts</name>
<email>bill.c.roberts@gmail.com</email>
</author>
<published>2014-02-11T18:12:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f1c82502c299da08b7b7f08b435212e51166ed9'/>
<id>urn:sha1:3f1c82502c299da08b7b7f08b435212e51166ed9</id>
<content type='text'>
During an audit event, cache and print the value of the process's
proctitle value (proc/&lt;pid&gt;/cmdline). This is useful in situations
where processes are started via fork'd virtual machines where the
comm field is incorrect. Often times, setting the comm field still
is insufficient as the comm width is not very wide and most
virtual machine "package names" do not fit. Also, during execution,
many threads have their comm field set as well. By tying it back to
the global cmdline value for the process, audit records will be more
complete in systems with these properties. An example of where this
is useful and applicable is in the realm of Android. With Android,
their is no fork/exec for VM instances. The bare, preloaded Dalvik
VM listens for a fork and specialize request. When this request comes
in, the VM forks, and the loads the specific application (specializing).
This was done to take advantage of COW and to not require a load of
basic packages by the VM on very app spawn. When this spawn occurs,
the package name is set via setproctitle() and shows up in procfs.
Many of these package names are longer then 16 bytes, the historical
width of task-&gt;comm. Having the cmdline in the audit records will
couple the application back to the record directly. Also, on my
Debian development box, some audit records were more useful then
what was printed under comm.

The cached proctitle is tied to the life-cycle of the audit_context
structure and is built on demand.

Proctitle is controllable by userspace, and thus should not be trusted.
It is meant as an aid to assist in debugging. The proctitle event is
emitted during syscall audits, and can be filtered with auditctl.

Example:
type=AVC msg=audit(1391217013.924:386): avc:  denied  { getattr } for  pid=1971 comm="mkdir" name="/" dev="selinuxfs" ino=1 scontext=system_u:system_r:consolekit_t:s0-s0:c0.c255 tcontext=system_u:object_r:security_t:s0 tclass=filesystem
type=SYSCALL msg=audit(1391217013.924:386): arch=c000003e syscall=137 success=yes exit=0 a0=7f019dfc8bd7 a1=7fffa6aed2c0 a2=fffffffffff4bd25 a3=7fffa6aed050 items=0 ppid=1967 pid=1971 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mkdir" exe="/bin/mkdir" subj=system_u:system_r:consolekit_t:s0-s0:c0.c255 key=(null)
type=UNKNOWN[1327] msg=audit(1391217013.924:386):  proctitle=6D6B646972002D70002F7661722F72756E2F636F6E736F6C65

Acked-by: Steve Grubb &lt;sgrubb@redhat.com&gt; (wrt record formating)

Signed-off-by: William Roberts &lt;wroberts@tresys.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: Convert int limit uses to u32</title>
<updated>2014-01-14T19:54:00Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2014-01-14T18:33:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e1d0bb6224f019893d1c498cc3327559d183674'/>
<id>urn:sha1:3e1d0bb6224f019893d1c498cc3327559d183674</id>
<content type='text'>
The equivalent uapi struct uses __u32 so make the kernel
uses u32 too.

This can prevent some oddities where the limit is
logged/emitted as a negative value.

Convert kstrtol to kstrtouint to disallow negative values.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
[eparis: do not remove static from audit_default declaration]
</content>
</entry>
<entry>
<title>audit: listen in all network namespaces</title>
<updated>2014-01-14T03:27:24Z</updated>
<author>
<name>Richard Guy Briggs</name>
<email>rgb@redhat.com</email>
</author>
<published>2013-07-16T17:18:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=33faba7fa7f2288d2f8aaea95958b2c97bf9ebfb'/>
<id>urn:sha1:33faba7fa7f2288d2f8aaea95958b2c97bf9ebfb</id>
<content type='text'>
Convert audit from only listening in init_net to use register_pernet_subsys()
to dynamically manage the netlink socket list.

Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: fix netlink portid naming and types</title>
<updated>2014-01-14T03:26:52Z</updated>
<author>
<name>Richard Guy Briggs</name>
<email>rgb@redhat.com</email>
</author>
<published>2013-08-14T15:32:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f9441639e6319f0c0e12bd63fa2f58990af0a9d2'/>
<id>urn:sha1:f9441639e6319f0c0e12bd63fa2f58990af0a9d2</id>
<content type='text'>
Normally, netlink ports use the PID of the userspace process as the port ID.
If the PID is already in use by a port, the kernel will allocate another port
ID to avoid conflict.  Re-name all references to netlink ports from pid to
portid to reflect this reality and avoid confusion with actual PIDs.  Ports
use the __u32 type, so re-type all portids accordingly.

(This patch is very similar to ebiederman's 5deadd69)

Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Gao feng &lt;gaofeng@cn.fujitsu.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: call audit_bprm() only once to add AUDIT_EXECVE information</title>
<updated>2013-11-05T16:15:03Z</updated>
<author>
<name>Richard Guy Briggs</name>
<email>rgb@redhat.com</email>
</author>
<published>2013-10-30T22:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9410d228a4cf434305306746bb799fb7acdd8648'/>
<id>urn:sha1:9410d228a4cf434305306746bb799fb7acdd8648</id>
<content type='text'>
Move the audit_bprm() call from search_binary_handler() to exec_binprm().  This
allows us to get rid of the mm member of struct audit_aux_data_execve since
bprm-&gt;mm will equal current-&gt;mm.

This also mitigates the issue that -&gt;argc could be modified by the
load_binary() call in search_binary_handler().

audit_bprm() was being called to add an AUDIT_EXECVE record to the audit
context every time search_binary_handler() was recursively called.  Only one
reference is necessary.

Reported-by: Oleg Nesterov &lt;onestero@redhat.com&gt;
Cc: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: Richard Guy Briggs &lt;rgb@redhat.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
---
This patch is against 3.11, but was developed on Oleg's post-3.11 patches that
introduce exec_binprm().
</content>
</entry>
</feed>
