<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/security.c, branch v2.6.28</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.28</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.28'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2008-10-30T18:38:47Z</updated>
<entry>
<title>nfsd: fix vm overcommit crash</title>
<updated>2008-10-30T18:38:47Z</updated>
<author>
<name>Alan Cox</name>
<email>alan@redhat.com</email>
</author>
<published>2008-10-29T21:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=731572d39fcd3498702eda4600db4c43d51e0b26'/>
<id>urn:sha1:731572d39fcd3498702eda4600db4c43d51e0b26</id>
<content type='text'>
Junjiro R.  Okajima reported a problem where knfsd crashes if you are
using it to export shmemfs objects and run strict overcommit.  In this
situation the current-&gt;mm based modifier to the overcommit goes through a
NULL pointer.

We could simply check for NULL and skip the modifier but we've caught
other real bugs in the past from mm being NULL here - cases where we did
need a valid mm set up (eg the exec bug about a year ago).

To preserve the checks and get the logic we want shuffle the checking
around and add a new helper to the vm_ security wrappers

Also fix a current-&gt;mm reference in nommu that should use the passed mm

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix build]
Reported-by: Junjiro R. Okajima &lt;hooanon05@yahoo.co.jp&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
Signed-off-by: Alan Cox &lt;alan@redhat.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>Merge branch 'master' into next</title>
<updated>2008-08-28T00:47:34Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2008-08-28T00:47:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86d688984deefa3ae5a802880c11f2b408b5d6cf'/>
<id>urn:sha1:86d688984deefa3ae5a802880c11f2b408b5d6cf</id>
<content type='text'>
</content>
</entry>
<entry>
<title>security: add/fix security kernel-doc</title>
<updated>2008-08-20T10:16:32Z</updated>
<author>
<name>Randy Dunlap</name>
<email>randy.dunlap@oracle.com</email>
</author>
<published>2008-08-18T04:44:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3f23d815c5049c9d7022226cec2242e384dd0b43'/>
<id>urn:sha1:3f23d815c5049c9d7022226cec2242e384dd0b43</id>
<content type='text'>
Add security/inode.c functions to the kernel-api docbook.
Use '%' on constants in kernel-doc notation.
Fix several typos/spellos in security function descriptions.

Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>security: Fix setting of PF_SUPERPRIV by __capable()</title>
<updated>2008-08-14T12:59:43Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2008-08-14T10:37:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cd9c58fbe9ec92b45b27e131719af4f2bd9eb40'/>
<id>urn:sha1:5cd9c58fbe9ec92b45b27e131719af4f2bd9eb40</id>
<content type='text'>
Fix the setting of PF_SUPERPRIV by __capable() as it could corrupt the flags
the target process if that is not the current process and it is trying to
change its own flags in a different way at the same time.

__capable() is using neither atomic ops nor locking to protect t-&gt;flags.  This
patch removes __capable() and introduces has_capability() that doesn't set
PF_SUPERPRIV on the process being queried.

This patch further splits security_ptrace() in two:

 (1) security_ptrace_may_access().  This passes judgement on whether one
     process may access another only (PTRACE_MODE_ATTACH for ptrace() and
     PTRACE_MODE_READ for /proc), and takes a pointer to the child process.
     current is the parent.

 (2) security_ptrace_traceme().  This passes judgement on PTRACE_TRACEME only,
     and takes only a pointer to the parent process.  current is the child.

     In Smack and commoncap, this uses has_capability() to determine whether
     the parent will be permitted to use PTRACE_ATTACH if normal checks fail.
     This does not set PF_SUPERPRIV.

Two of the instances of __capable() actually only act on current, and so have
been changed to calls to capable().

Of the places that were using __capable():

 (1) The OOM killer calls __capable() thrice when weighing the killability of a
     process.  All of these now use has_capability().

 (2) cap_ptrace() and smack_ptrace() were using __capable() to check to see
     whether the parent was allowed to trace any process.  As mentioned above,
     these have been split.  For PTRACE_ATTACH and /proc, capable() is now
     used, and for PTRACE_TRACEME, has_capability() is used.

 (3) cap_safe_nice() only ever saw current, so now uses capable().

 (4) smack_setprocattr() rejected accesses to tasks other than current just
     after calling __capable(), so the order of these two tests have been
     switched and capable() is used instead.

 (5) In smack_file_send_sigiotask(), we need to allow privileged processes to
     receive SIGIO on files they're manipulating.

 (6) In smack_task_wait(), we let a process wait for a privileged process,
     whether or not the process doing the waiting is privileged.

I've tested this with the LTP SELinux and syscalls testscripts.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Acked-by: Andrew G. Morgan &lt;morgan@kernel.org&gt;
Acked-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>[patch 3/4] fat: dont call notify_change</title>
<updated>2008-07-27T00:53:27Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2008-07-01T13:01:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b1da47e29e467f1ec36dc78d009bfb109fd533c7'/>
<id>urn:sha1:b1da47e29e467f1ec36dc78d009bfb109fd533c7</id>
<content type='text'>
The FAT_IOCTL_SET_ATTRIBUTES ioctl() calls notify_change() to change
the file mode before changing the inode attributes.  Replace with
explicit calls to security_inode_setattr(), fat_setattr() and
fsnotify_change().

This is equivalent to the original.  The reason it is needed, is that
later in the series we move the immutable check into notify_change().
That would break the FAT_IOCTL_SET_ATTRIBUTES ioctl, as it needs to
perform the mode change regardless of the immutability of the file.

[Fix error if fat is built as a module.  Thanks to OGAWA Hirofumi for
noticing.]

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Acked-by: OGAWA Hirofumi &lt;hirofumi@mail.parknet.co.jp&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>[PATCH] pass MAY_OPEN to vfs_permission() explicitly</title>
<updated>2008-07-27T00:53:22Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-07-17T13:37:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b77b0646ef4efe31a7449bb3d9360fd00f95433d'/>
<id>urn:sha1:b77b0646ef4efe31a7449bb3d9360fd00f95433d</id>
<content type='text'>
... and get rid of the last "let's deduce mask from nameidata-&gt;flags"
bit.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>security: remove register_security hook</title>
<updated>2008-07-14T05:04:06Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2008-07-10T08:02:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f0f0fd496333777d53daff21a4e3b28c4d03a6d'/>
<id>urn:sha1:6f0f0fd496333777d53daff21a4e3b28c4d03a6d</id>
<content type='text'>
The register security hook is no longer required, as the capability
module is always registered.  LSMs wishing to stack capability as
a secondary module should do so explicitly.

Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
Acked-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>security: remove dummy module</title>
<updated>2008-07-14T05:03:04Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2008-07-03T18:56:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5915eb53861c5776cfec33ca4fcc1fd20d66dd27'/>
<id>urn:sha1:5915eb53861c5776cfec33ca4fcc1fd20d66dd27</id>
<content type='text'>
Remove the dummy module and make the "capability" module the default.

Compile and boot tested.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>security: remove unused sb_get_mnt_opts hook</title>
<updated>2008-07-14T05:02:05Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2008-07-03T18:56:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b478a9f9889c81e88077d1495daadee64c0af541'/>
<id>urn:sha1:b478a9f9889c81e88077d1495daadee64c0af541</id>
<content type='text'>
The sb_get_mnt_opts() hook is unused, and is superseded by the
sb_show_options() hook.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Acked-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>LSM/SELinux: show LSM mount options in /proc/mounts</title>
<updated>2008-07-14T05:02:05Z</updated>
<author>
<name>Eric Paris</name>
<email>eparis@redhat.com</email>
</author>
<published>2008-07-03T23:47:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2069f457848f846cb31149c9aa29b330a6b66d1b'/>
<id>urn:sha1:2069f457848f846cb31149c9aa29b330a6b66d1b</id>
<content type='text'>
This patch causes SELinux mount options to show up in /proc/mounts.  As
with other code in the area seq_put errors are ignored.  Other LSM's
will not have their mount options displayed until they fill in their own
security_sb_show_options() function.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
</feed>
