<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/security/selinux/include, branch master</title>
<subtitle>Linux Kernel</subtitle>
<id>https://git.etezian.org/cgit.cgi/linux.git/atom?h=master</id>
<link rel='self' href='https://git.etezian.org/cgit.cgi/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/'/>
<updated>2016-12-21T15:39:25+00:00</updated>
<entry>
<title>selinux: use the kernel headers when building scripts/selinux</title>
<updated>2016-12-21T15:39:25+00:00</updated>
<author>
<name>Paul Moore</name>
<email>paul@paul-moore.com</email>
</author>
<published>2016-12-21T15:39:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=bfc5e3a6af397dcf9c99a6c1872458e7867c4680'/>
<id>urn:sha1:bfc5e3a6af397dcf9c99a6c1872458e7867c4680</id>
<content type='text'>
Commit 3322d0d64f4e ("selinux: keep SELinux in sync with new capability
definitions") added a check on the defined capabilities without
explicitly including the capability header file which caused problems
when building genheaders for users of clang/llvm.  Resolve this by
using the kernel headers when building genheaders, which is arguably
the right thing to do regardless, and explicitly including the
kernel's capability.h header file in classmap.h.  We also update the
mdp build, even though it wasn't causing an error we really should
be using the headers from the kernel we are building.

Reported-by: Nicolas Iooss &lt;nicolas.iooss@m4x.org&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;</content>
</entry>
<entry>
<title>selinux: Convert isec-&gt;lock into a spinlock</title>
<updated>2016-11-22T22:44:02+00:00</updated>
<author>
<name>Andreas Gruenbacher</name>
<email>agruenba@redhat.com</email>
</author>
<published>2016-11-15T10:06:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=9287aed2ad1ff1bde5eb190bcd6dccd5f1cf47d3'/>
<id>urn:sha1:9287aed2ad1ff1bde5eb190bcd6dccd5f1cf47d3</id>
<content type='text'>
Convert isec-&gt;lock from a mutex into a spinlock.  Instead of holding
the lock while sleeping in inode_doinit_with_dentry, set
isec-&gt;initialized to LABEL_PENDING and release the lock.  Then, when
the sid has been determined, re-acquire the lock.  If isec-&gt;initialized
is still set to LABEL_PENDING, set isec-&gt;sid; otherwise, the sid has
been set by another task (LABEL_INITIALIZED) or invalidated
(LABEL_INVALID) in the meantime.

This fixes a deadlock on gfs2 where

 * one task is in inode_doinit_with_dentry -&gt; gfs2_getxattr, holds
   isec-&gt;lock, and tries to acquire the inode's glock, and

 * another task is in do_xmote -&gt; inode_go_inval -&gt;
   selinux_inode_invalidate_secctx, holds the inode's glock, and
   tries to acquire isec-&gt;lock.

Signed-off-by: Andreas Gruenbacher &lt;agruenba@redhat.com&gt;
[PM: minor tweaks to keep checkpatch.pl happy]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>selinux: keep SELinux in sync with new capability definitions</title>
<updated>2016-11-21T20:37:24+00:00</updated>
<author>
<name>Stephen Smalley</name>
<email>sds@tycho.nsa.gov</email>
</author>
<published>2016-11-18T15:23:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=3322d0d64f4e942862a152f6f11137a1f5eac2e9'/>
<id>urn:sha1:3322d0d64f4e942862a152f6f11137a1f5eac2e9</id>
<content type='text'>
When a new capability is defined, SELinux needs to be updated.
Trigger a build error if a new capability is defined without
corresponding update to security/selinux/include/classmap.h's
COMMON_CAP2_PERMS.  This is similar to BUILD_BUG_ON() guards
in the SELinux nlmsgtab code to ensure that SELinux tracks
new netlink message types as needed.

Note that there is already a similar build guard in
security/selinux/hooks.c to detect when more than 64
capabilities are defined, since that will require adding
a third capability class to SELinux.

A nicer way to do this would be to extend scripts/selinux/genheaders
or a similar tool to auto-generate the necessary definitions and code
for SELinux capability checking from include/uapi/linux/capability.h.
AppArmor does something similar in its Makefile, although it only
needs to generate a single table of names.  That is left as future
work.

Signed-off-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
[PM: reformat the description to keep checkpatch.pl happy]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>selinux: drop SECURITY_SELINUX_POLICYDB_VERSION_MAX</title>
<updated>2016-08-19T00:01:15+00:00</updated>
<author>
<name>William Roberts</name>
<email>william.c.roberts@intel.com</email>
</author>
<published>2016-08-15T19:42:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=348a0db9e69e4c214bf5d7677f17cb99cdc47db0'/>
<id>urn:sha1:348a0db9e69e4c214bf5d7677f17cb99cdc47db0</id>
<content type='text'>
Remove the SECURITY_SELINUX_POLICYDB_VERSION_MAX Kconfig option

Per: https://github.com/SELinuxProject/selinux/wiki/Kernel-Todo

This was only needed on Fedora 3 and 4 and just causes issues now,
so drop it.

The MAX and MIN should just be whatever the kernel can support.

Signed-off-by: William Roberts &lt;william.c.roberts@intel.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>netlabel: Pass a family parameter to netlbl_skbuff_err().</title>
<updated>2016-06-27T19:06:16+00:00</updated>
<author>
<name>Huw Davies</name>
<email>huw@codeweavers.com</email>
</author>
<published>2016-06-27T19:06:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=a04e71f631fa3d2fd2aa0404c11484739d1e9073'/>
<id>urn:sha1:a04e71f631fa3d2fd2aa0404c11484739d1e9073</id>
<content type='text'>
This makes it possible to route the error to the appropriate
labelling engine.  CALIPSO is far less verbose than CIPSO
when encountering a bogus packet, so there is no need for a
CALIPSO error handler.

Signed-off-by: Huw Davies &lt;huw@codeweavers.com&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>selinux: distinguish non-init user namespace capability checks</title>
<updated>2016-04-26T19:41:43+00:00</updated>
<author>
<name>Stephen Smalley</name>
<email>sds@tycho.nsa.gov</email>
</author>
<published>2016-04-08T17:52:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=8e4ff6f228e4722cac74db716e308d1da33d744f'/>
<id>urn:sha1:8e4ff6f228e4722cac74db716e308d1da33d744f</id>
<content type='text'>
Distinguish capability checks against a target associated
with the init user namespace versus capability checks against
a target associated with a non-init user namespace by defining
and using separate security classes for the latter.

This is needed to support e.g. Chrome usage of user namespaces
for the Chrome sandbox without needing to allow Chrome to also
exercise capabilities on targets in the init user namespace.

Suggested-by: Dan Walsh &lt;dwalsh@redhat.com&gt;
Signed-off-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>selinux: Change bool variable name to index.</title>
<updated>2016-04-14T15:24:50+00:00</updated>
<author>
<name>Prarit Bhargava</name>
<email>prarit@redhat.com</email>
</author>
<published>2016-04-14T14:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=0fd71a620be8648486a126fccadf9f7c2a818676'/>
<id>urn:sha1:0fd71a620be8648486a126fccadf9f7c2a818676</id>
<content type='text'>
security_get_bool_value(int bool) argument "bool" conflicts with
in-kernel macros such as BUILD_BUG().  This patch changes this to
index which isn't a type.

Cc: Paul Moore &lt;paul@paul-moore.com&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Cc: Eric Paris &lt;eparis@parisplace.org&gt;
Cc: James Morris &lt;james.l.morris@oracle.com&gt;
Cc: "Serge E. Hallyn" &lt;serge@hallyn.com&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Cc: Andrew Perepechko &lt;anserper@ya.ru&gt;
Cc: Jeff Vander Stoep &lt;jeffv@google.com&gt;
Cc: selinux@tycho.nsa.gov
Cc: Eric Paris &lt;eparis@redhat.com&gt;
Cc: Paul Moore &lt;pmoore@redhat.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Acked-by: David Howells &lt;dhowells@redhat.com&gt;
[PM: wrapped description for checkpatch.pl, use "selinux:..." as subj]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>selinux: restrict kernel module loading</title>
<updated>2016-04-05T20:11:56+00:00</updated>
<author>
<name>Jeff Vander Stoep</name>
<email>jeffv@google.com</email>
</author>
<published>2016-04-05T20:06:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=61d612ea731e57dc510472fb746b55cdc017f371'/>
<id>urn:sha1:61d612ea731e57dc510472fb746b55cdc017f371</id>
<content type='text'>
Utilize existing kernel_read_file hook on kernel module load.
Add module_load permission to the system class.

Enforces restrictions on kernel module origin when calling the
finit_module syscall. The hook checks that source type has
permission module_load for the target type.
Example for finit_module:

allow foo bar_file:system module_load;

Similarly restrictions are enforced on kernel module loading when
calling the init_module syscall. The hook checks that source
type has permission module_load with itself as the target object
because the kernel module is sourced from the calling process.
Example for init_module:

allow foo foo:system module_load;

Signed-off-by: Jeff Vander Stoep &lt;jeffv@google.com&gt;
[PM: fixed return value of selinux_kernel_read_file()]
Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>selinux: simply inode label states to INVALID and INITIALIZED</title>
<updated>2016-04-05T20:10:55+00:00</updated>
<author>
<name>Paul Moore</name>
<email>paul@paul-moore.com</email>
</author>
<published>2016-03-28T19:16:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=4b57d6bcd94034e2eb168bdec2474e3b2b848e44'/>
<id>urn:sha1:4b57d6bcd94034e2eb168bdec2474e3b2b848e44</id>
<content type='text'>
There really is no need for LABEL_MISSING as we really only care if
the inode's label is INVALID or INITIALIZED.  Also adjust the
revalidate code to reload the label whenever the label is not
INITIALIZED so we are less sensitive to label state in the future.

Signed-off-by: Paul Moore &lt;paul@paul-moore.com&gt;
</content>
</entry>
<entry>
<title>selinux: export validatetrans decisions</title>
<updated>2015-12-24T16:09:41+00:00</updated>
<author>
<name>Andrew Perepechko</name>
<email>anserper@ya.ru</email>
</author>
<published>2015-12-24T16:09:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.etezian.org/cgit.cgi/linux.git/commit/?id=f9df6458218f4fe8a1c3bf0af89c1fa9eaf0db39'/>
<id>urn:sha1:f9df6458218f4fe8a1c3bf0af89c1fa9eaf0db39</id>
<content type='text'>
Make validatetrans decisions available through selinuxfs.
"/validatetrans" is added to selinuxfs for this purpose.
This functionality is needed by file system servers
implemented in userspace or kernelspace without the VFS
layer.

Writing "$oldcontext $newcontext $tclass $taskcontext"
to /validatetrans is expected to return 0 if the transition
is allowed and -EPERM otherwise.

Signed-off-by: Andrew Perepechko &lt;anserper@ya.ru&gt;
CC: andrew.perepechko@seagate.com
Acked-by: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;
</content>
</entry>
</feed>
