<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/auditsc.c, branch v3.4.39</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.39</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.39'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2012-01-23T16:44:53Z</updated>
<entry>
<title>kernel-doc: fix new warnings in auditsc.c</title>
<updated>2012-01-23T16:44:53Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@xenotime.net</email>
</author>
<published>2012-01-21T19:02:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=42ae610c1a820ddecb80943d4ccfc936f7772535'/>
<id>urn:sha1:42ae610c1a820ddecb80943d4ccfc936f7772535</id>
<content type='text'>
Fix new kernel-doc warnings in auditsc.c:

Warning(kernel/auditsc.c:1875): No description found for parameter 'success'
Warning(kernel/auditsc.c:1875): No description found for parameter 'return_code'
Warning(kernel/auditsc.c:1875): Excess function parameter 'pt_regs' description in '__audit_syscall_exit'

Signed-off-by: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>audit: no leading space in audit_log_d_path prefix</title>
<updated>2012-01-17T21:17:04Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2012-01-06T22:07:10Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c158a35c8a681cf68d36f22f058f9f5466386c71'/>
<id>urn:sha1:c158a35c8a681cf68d36f22f058f9f5466386c71</id>
<content type='text'>
audit_log_d_path() injects an additional space before the prefix,
which serves no purpose and doesn't mix well with other audit_log*()
functions that do not sneak extra characters into the log.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: fix signedness bug in audit_log_execve_info()</title>
<updated>2012-01-17T21:17:03Z</updated>
<author>
<name>Xi Wang</name>
<email>xi.wang@gmail.com</email>
</author>
<published>2011-12-20T23:39:41Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5afb8a3f96573f7ea018abb768f5b6ebe1a6c1a4'/>
<id>urn:sha1:5afb8a3f96573f7ea018abb768f5b6ebe1a6c1a4</id>
<content type='text'>
In the loop, a size_t "len" is used to hold the return value of
audit_log_single_execve_arg(), which returns -1 on error.  In that
case the error handling (len &lt;= 0) will be bypassed since "len" is
unsigned, and the loop continues with (p += len) being wrapped.
Change the type of "len" to signed int to fix the error handling.

	size_t len;
	...
	for (...) {
		len = audit_log_single_execve_arg(...);
		if (len &lt;= 0)
			break;
		p += len;
	}

Signed-off-by: Xi Wang &lt;xi.wang@gmail.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: comparison on interprocess fields</title>
<updated>2012-01-17T21:17:03Z</updated>
<author>
<name>Peter Moody</name>
<email>pmoody@google.com</email>
</author>
<published>2012-01-04T20:24:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=10d68360871657204885371cdf2594412675d2f9'/>
<id>urn:sha1:10d68360871657204885371cdf2594412675d2f9</id>
<content type='text'>
This allows audit to specify rules in which we compare two fields of a
process.  Such as is the running process uid != to the running process
euid?

Signed-off-by: Peter Moody &lt;pmoody@google.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: implement all object interfield comparisons</title>
<updated>2012-01-17T21:17:02Z</updated>
<author>
<name>Peter Moody</name>
<email>pmoody@google.com</email>
</author>
<published>2011-12-14T00:17:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4a6633ed08af5ba67790b4d1adcdeb8ceb55677e'/>
<id>urn:sha1:4a6633ed08af5ba67790b4d1adcdeb8ceb55677e</id>
<content type='text'>
This completes the matrix of interfield comparisons between uid/gid
information for the current task and the uid/gid information for inodes.
aka I can audit based on differences between the euid of the process and
the uid of fs objects.

Signed-off-by: Peter Moody &lt;pmoody@google.com&gt;
Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: allow interfield comparison between gid and ogid</title>
<updated>2012-01-17T21:17:02Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2012-01-03T19:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c9fe685f7a17a0ee8bf3fbe51e40b1c8b8e65896'/>
<id>urn:sha1:c9fe685f7a17a0ee8bf3fbe51e40b1c8b8e65896</id>
<content type='text'>
Allow audit rules to compare the gid of the running task to the gid of the
inode in question.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: complex interfield comparison helper</title>
<updated>2012-01-17T21:17:02Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2012-01-03T19:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b34b039324bf081554ee8678f9b8c5d937e5206c'/>
<id>urn:sha1:b34b039324bf081554ee8678f9b8c5d937e5206c</id>
<content type='text'>
Rather than code the same loop over and over implement a helper function which
uses some pointer magic to make it generic enough to be used numerous places
as we implement more audit interfield comparisons

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: allow interfield comparison in audit rules</title>
<updated>2012-01-17T21:17:01Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2012-01-03T19:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=02d86a568c6d2d335256864451ac8ce781bc5652'/>
<id>urn:sha1:02d86a568c6d2d335256864451ac8ce781bc5652</id>
<content type='text'>
We wish to be able to audit when a uid=500 task accesses a file which is
uid=0.  Or vice versa.  This patch introduces a new audit filter type
AUDIT_FIELD_COMPARE which takes as an 'enum' which indicates which fields
should be compared.  At this point we only define the task-&gt;uid vs
inode-&gt;uid, but other comparisons can be added.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: do not call audit_getname on error</title>
<updated>2012-01-17T21:17:01Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2012-01-03T19:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4043cde8ecf7f7d880eb1133c201a3d392fd68c3'/>
<id>urn:sha1:4043cde8ecf7f7d880eb1133c201a3d392fd68c3</id>
<content type='text'>
Just a code cleanup really.  We don't need to make a function call just for
it to return on error.  This also makes the VFS function even easier to follow
and removes a conditional on a hot path.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>audit: only allow tasks to set their loginuid if it is -1</title>
<updated>2012-01-17T21:17:00Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2012-01-03T19:23:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=633b45454503489209b0d9a45f9e3cd1b852c614'/>
<id>urn:sha1:633b45454503489209b0d9a45f9e3cd1b852c614</id>
<content type='text'>
At the moment we allow tasks to set their loginuid if they have
CAP_AUDIT_CONTROL.  In reality we want tasks to set the loginuid when they
log in and it be impossible to ever reset.  We had to make it mutable even
after it was once set (with the CAP) because on update and admin might have
to restart sshd.  Now sshd would get his loginuid and the next user which
logged in using ssh would not be able to set his loginuid.

Systemd has changed how userspace works and allowed us to make the kernel
work the way it should.  With systemd users (even admins) are not supposed
to restart services directly.  The system will restart the service for
them.  Thus since systemd is going to loginuid==-1, sshd would get -1, and
sshd would be allowed to set a new loginuid without special permissions.

If an admin in this system were to manually start an sshd he is inserting
himself into the system chain of trust and thus, logically, it's his
loginuid that should be used!  Since we have old systems I make this a
Kconfig option.

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