<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/security.c, branch v3.12.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security/security.c?h=v3.12.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/security/security.c?h=v3.12.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-25T09:30:03Z</updated>
<entry>
<title>xattr: Constify -&gt;name member of "struct xattr".</title>
<updated>2013-07-25T09:30:03Z</updated>
<author>
<name>Tetsuo Handa</name>
<email>penguin-kernel@I-love.SAKURA.ne.jp</email>
</author>
<published>2013-07-24T20:44:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9548906b2bb7ff09e12c013a55d669bef2c8e121'/>
<id>urn:sha1:9548906b2bb7ff09e12c013a55d669bef2c8e121</id>
<content type='text'>
Since everybody sets kstrdup()ed constant string to "struct xattr"-&gt;name but
nobody modifies "struct xattr"-&gt;name , we can omit kstrdup() and its failure
checking by constifying -&gt;name member of "struct xattr".

Signed-off-by: Tetsuo Handa &lt;penguin-kernel@I-love.SAKURA.ne.jp&gt;
Reviewed-by: Joel Becker &lt;jlbec@evilplan.org&gt; [ocfs2]
Acked-by: Serge E. Hallyn &lt;serge.hallyn@ubuntu.com&gt;
Acked-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
Acked-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Reviewed-by: Paul Moore &lt;paul@paul-moore.com&gt;
Tested-by: Paul Moore &lt;paul@paul-moore.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>NFS: Extend NFS xattr handlers to accept the security namespace</title>
<updated>2013-06-08T20:20:17Z</updated>
<author>
<name>David Quigley</name>
<email>dpquigl@davequigley.com</email>
</author>
<published>2013-05-22T16:50:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c9bccef6b98ae563f725f6e315d8adc685239781'/>
<id>urn:sha1:c9bccef6b98ae563f725f6e315d8adc685239781</id>
<content type='text'>
The existing NFSv4 xattr handlers do not accept xattr calls to the security
namespace. This patch extends these handlers to accept xattrs from the security
namespace in addition to the default NFSv4 ACL namespace.

Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: Matthew N. Dodd &lt;Matthew.Dodd@sparta.com&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>LSM: Add flags field to security_sb_set_mnt_opts for in kernel mount data.</title>
<updated>2013-06-08T20:20:12Z</updated>
<author>
<name>David Quigley</name>
<email>dpquigl@davequigley.com</email>
</author>
<published>2013-05-22T16:50:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=649f6e7718891fe7691e5084ce3fa623acba3129'/>
<id>urn:sha1:649f6e7718891fe7691e5084ce3fa623acba3129</id>
<content type='text'>
There is no way to differentiate if a text mount option is passed from user
space or the kernel. A flags field is being added to the
security_sb_set_mnt_opts hook to allow for in kernel security flags to be sent
to the LSM for processing in addition to the text options received from mount.
This patch also updated existing code to fix compilation errors.

Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: David P. Quigley &lt;dpquigl@tycho.nsa.gov&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>Security: Add Hook to test if the particular xattr is part of a MAC model.</title>
<updated>2013-06-08T20:20:11Z</updated>
<author>
<name>David Quigley</name>
<email>dpquigl@davequigley.com</email>
</author>
<published>2013-05-22T16:50:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=746df9b59c8a5f162c907796c7295d3c4c0d8995'/>
<id>urn:sha1:746df9b59c8a5f162c907796c7295d3c4c0d8995</id>
<content type='text'>
The interface to request security labels from user space is the xattr
interface. When requesting the security label from an NFS server it is
important to make sure the requested xattr actually is a MAC label. This allows
us to make sure that we get the desired semantics from the attribute instead of
something else such as capabilities or a time based LSM.

Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: Matthew N. Dodd &lt;Matthew.Dodd@sparta.com&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>Security: Add hook to calculate context based on a negative dentry.</title>
<updated>2013-06-08T20:19:41Z</updated>
<author>
<name>David Quigley</name>
<email>dpquigl@davequigley.com</email>
</author>
<published>2013-05-22T16:50:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d47be3dfecaf20255af89a57460285c82d5271ad'/>
<id>urn:sha1:d47be3dfecaf20255af89a57460285c82d5271ad</id>
<content type='text'>
There is a time where we need to calculate a context without the
inode having been created yet. To do this we take the negative dentry and
calculate a context based on the process and the parent directory contexts.

Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Signed-off-by: Matthew N. Dodd &lt;Matthew.Dodd@sparta.com&gt;
Signed-off-by: Miguel Rodel Felipe &lt;Rodel_FM@dsi.a-star.edu.sg&gt;
Signed-off-by: Phua Eu Gene &lt;PHUA_Eu_Gene@dsi.a-star.edu.sg&gt;
Signed-off-by: Khin Mi Mi Aung &lt;Mi_Mi_AUNG@dsi.a-star.edu.sg&gt;
Signed-off-by: Steve Dickson &lt;steved@redhat.com&gt;
Signed-off-by: Trond Myklebust &lt;Trond.Myklebust@netapp.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security</title>
<updated>2013-04-30T23:27:51Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-04-30T23:27:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2e1deaad1e48453cea782854ab87df3f78c121c2'/>
<id>urn:sha1:2e1deaad1e48453cea782854ab87df3f78c121c2</id>
<content type='text'>
Pull security subsystem update from James Morris:
 "Just some minor updates across the subsystem"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  ima: eliminate passing d_name.name to process_measurement()
  TPM: Retry SaveState command in suspend path
  tpm/tpm_i2c_infineon: Add small comment about return value of __i2c_transfer
  tpm/tpm_i2c_infineon.c: Add OF attributes type and name to the of_device_id table entries
  tpm_i2c_stm_st33: Remove duplicate inclusion of header files
  tpm: Add support for new Infineon I2C TPM (SLB 9645 TT 1.2 I2C)
  char/tpm: Convert struct i2c_msg initialization to C99 format
  drivers/char/tpm/tpm_ppi: use strlcpy instead of strncpy
  tpm/tpm_i2c_stm_st33: formatting and white space changes
  Smack: include magic.h in smackfs.c
  selinux: make security_sb_clone_mnt_opts return an error on context mismatch
  seccomp: allow BPF_XOR based ALU instructions.
  Fix NULL pointer dereference in smack_inode_unlink() and smack_inode_rmdir()
  Smack: add support for modification of existing rules
  smack: SMACK_MAGIC to include/uapi/linux/magic.h
  Smack: add missing support for transmute bit in smack_str_from_perm()
  Smack: prevent revoke-subject from failing when unseen label is written to it
  tomoyo: use DEFINE_SRCU() to define tomoyo_ss
  tomoyo: use DEFINE_SRCU() to define tomoyo_ss
</content>
</entry>
<entry>
<title>selinux: add a skb_owned_by() hook</title>
<updated>2013-04-09T17:23:11Z</updated>
<author>
<name>Eric Dumazet</name>
<email>edumazet@google.com</email>
</author>
<published>2013-04-08T17:58:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ca10b9e9a8ca7342ee07065289cbe74ac128c169'/>
<id>urn:sha1:ca10b9e9a8ca7342ee07065289cbe74ac128c169</id>
<content type='text'>
Commit 90ba9b1986b5ac (tcp: tcp_make_synack() can use alloc_skb())
broke certain SELinux/NetLabel configurations by no longer correctly
assigning the sock to the outgoing SYNACK packet.

Cost of atomic operations on the LISTEN socket is quite big,
and we would like it to happen only if really needed.

This patch introduces a new security_ops-&gt;skb_owned_by() method,
that is a void operation unless selinux is active.

Reported-by: Miroslav Vadkerti &lt;mvadkert@redhat.com&gt;
Diagnosed-by: Paul Moore &lt;pmoore@redhat.com&gt;
Signed-off-by: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: linux-security-module@vger.kernel.org
Acked-by: James Morris &lt;james.l.morris@oracle.com&gt;
Tested-by: Paul Moore &lt;pmoore@redhat.com&gt;
Acked-by: Paul Moore &lt;pmoore@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>selinux: make security_sb_clone_mnt_opts return an error on context mismatch</title>
<updated>2013-04-02T00:30:13Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@redhat.com</email>
</author>
<published>2013-04-01T12:14:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=094f7b69ea738d7d619cba449d2af97159949459'/>
<id>urn:sha1:094f7b69ea738d7d619cba449d2af97159949459</id>
<content type='text'>
I had the following problem reported a while back. If you mount the
same filesystem twice using NFSv4 with different contexts, then the
second context= option is ignored. For instance:

    # mount server:/export /mnt/test1
    # mount server:/export /mnt/test2 -o context=system_u:object_r:tmp_t:s0
    # ls -dZ /mnt/test1
    drwxrwxrwt. root root system_u:object_r:nfs_t:s0       /mnt/test1
    # ls -dZ /mnt/test2
    drwxrwxrwt. root root system_u:object_r:nfs_t:s0       /mnt/test2

When we call into SELinux to set the context of a "cloned" superblock,
it will currently just bail out when it notices that we're reusing an
existing superblock. Since the existing superblock is already set up and
presumably in use, we can't go overwriting its context with the one from
the "original" sb. Because of this, the second context= option in this
case cannot take effect.

This patch fixes this by turning security_sb_clone_mnt_opts into an int
return operation. When it finds that the "new" superblock that it has
been handed is already set up, it checks to see whether the contexts on
the old superblock match it. If it does, then it will just return
success, otherwise it'll return -EBUSY and emit a printk to tell the
admin why the second mount failed.

Note that this patch may cause casualties. The NFSv4 code relies on
being able to walk down to an export from the pseudoroot. If you mount
filesystems that are nested within one another with different contexts,
then this patch will make those mounts fail in new and "exciting" ways.

For instance, suppose that /export is a separate filesystem on the
server:

    # mount server:/ /mnt/test1
    # mount salusa:/export /mnt/test2 -o context=system_u:object_r:tmp_t:s0
    mount.nfs: an incorrect mount option was specified

...with the printk in the ring buffer. Because we *might* eventually
walk down to /mnt/test1/export, the mount is denied due to this patch.
The second mount needs the pseudoroot superblock, but that's already
present with the wrong context.

OTOH, if we mount these in the reverse order, then both mounts work,
because the pseudoroot superblock created when mounting /export is
discarded once that mount is done. If we then however try to walk into
that directory, the automount fails for the similar reasons:

    # cd /mnt/test1/scratch/
    -bash: cd: /mnt/test1/scratch: Device or resource busy

The story I've gotten from the SELinux folks that I've talked to is that
this is desirable behavior. In SELinux-land, mounting the same data
under different contexts is wrong -- there can be only one.

Cc: Steve Dickson &lt;steved@redhat.com&gt;
Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Jeff Layton &lt;jlayton@redhat.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>tun: fix LSM/SELinux labeling of tun/tap devices</title>
<updated>2013-01-14T23:16:59Z</updated>
<author>
<name>Paul Moore</name>
<email>pmoore@redhat.com</email>
</author>
<published>2013-01-14T07:12:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5dbbaf2de89613d19a9286d4db0a535ca2735d26'/>
<id>urn:sha1:5dbbaf2de89613d19a9286d4db0a535ca2735d26</id>
<content type='text'>
This patch corrects some problems with LSM/SELinux that were introduced
with the multiqueue patchset.  The problem stems from the fact that the
multiqueue work changed the relationship between the tun device and its
associated socket; before the socket persisted for the life of the
device, however after the multiqueue changes the socket only persisted
for the life of the userspace connection (fd open).  For non-persistent
devices this is not an issue, but for persistent devices this can cause
the tun device to lose its SELinux label.

We correct this problem by adding an opaque LSM security blob to the
tun device struct which allows us to have the LSM security state, e.g.
SELinux labeling information, persist for the lifetime of the tun
device.  In the process we tweak the LSM hooks to work with this new
approach to TUN device/socket labeling and introduce a new LSM hook,
security_tun_dev_attach_queue(), to approve requests to attach to a
TUN queue via TUNSETQUEUE.

The SELinux code has been adjusted to match the new LSM hooks, the
other LSMs do not make use of the LSM TUN controls.  This patch makes
use of the recently added "tun_socket:attach_queue" permission to
restrict access to the TUNSETQUEUE operation.  On older SELinux
policies which do not define the "tun_socket:attach_queue" permission
the access control decision for TUNSETQUEUE will be handled according
to the SELinux policy's unknown permission setting.

Signed-off-by: Paul Moore &lt;pmoore@redhat.com&gt;
Acked-by: Eric Paris &lt;eparis@parisplace.org&gt;
Tested-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ima: support new kernel module syscall</title>
<updated>2012-12-14T02:35:26Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2012-10-16T02:10:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fdf90729e57812cb12d7938e2dee7c71e875fb08'/>
<id>urn:sha1:fdf90729e57812cb12d7938e2dee7c71e875fb08</id>
<content type='text'>
With the addition of the new kernel module syscall, which defines two
arguments - a file descriptor to the kernel module and a pointer to a NULL
terminated string of module arguments - it is now possible to measure and
appraise kernel modules like any other file on the file system.

This patch adds support to measure and appraise kernel modules in an
extensible and consistent manner.

To support filesystems without extended attribute support, additional
patches could pass the signature as the first parameter.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
</content>
</entry>
</feed>
