[RFC PATCH v3 5/5] selinux: introduce kdbus access controls

2015-10-07 Thread Paul Moore
Add the SELinux access control implementation for the new kdbus LSM hooks using the new kdbus object class and the following permissions: [NOTE: permissions below are based on kdbus code from Aug 2015] * kdbus:impersonate Send a different security label to kdbus peers. * kdbus:fakecreds

[RFC PATCH v3 4/5] selinux: introduce kdbus names into the policy

2015-10-07 Thread Paul Moore
SELinux treats kdbus service names as objects and therefore needs a mechanism to map service names to security labels. This patch adds support for loading kdbus name/label matches with the security policy. The patch supports service name prefix matching to lessen the burden on the policy develope

[RFC PATCH v3 2/5] lsm: introduce hooks for kdbus

2015-10-07 Thread Paul Moore
Add LSM access control hooks to kdbus; several new hooks are added and the existing security_file_receive() hook is reused. The new hooks are listed below: * security_kdbus_conn_new Check if the current task is allowed to create a new kdbus connection. * security_kdbus_own_name Check i

[RFC PATCH v3 3/5] lsm: add support for auditing kdbus service names

2015-10-07 Thread Paul Moore
The kdbus service names will be recorded using 'service', similar to the existing dbus audit records. Signed-off-by: Paul Moore --- ChangeLog: - v3 * Ported to the 4.3-rc4 based kdbus tree - v2 * Initial draft --- include/linux/lsm_audit.h |2 ++ security/lsm_audit.c |4 2 f

[RFC PATCH v3 0/5] kdbus LSM/SELinux hooks

2015-10-07 Thread Paul Moore
No real functional improvements since the v2 patchset earlier this week, the main update is rebasing on GregKH's current kdbus tree which is now 4.3-rc4 based and as a result brings the LSM stacking changes and SELinux ioctl/xperm additions. --- Paul Moore (5): kdbus: add creator credential

[RFC PATCH v3 1/5] kdbus: add creator credentials to the endpoints

2015-10-07 Thread Paul Moore
In order to effectively enforce LSM based access controls we need to have more information about the kdbus endpoint creator than the uid/gid currently stored in the kdbus_node_type struct. This patch replaces the uid/gid values with a reference to the node creator's credential struct which serves

Re: [PATCH] security: selinux: Use a kmem_cache for allocation struct file_security_struct

2015-10-07 Thread Stephen Smalley
On 10/05/2015 01:45 AM, Sangwoo wrote: > The size of struct file_security_struct is 16byte at my setup. > But, the real allocation size for per each file_security_struct > is 64bytes in my setup that kmalloc min size is 64bytes > because ARCH_DMA_MINALIGN is 64. > > This allocation is called every

overlayfs: regression bug from 4bacc9c9 (Make f_path always point to the overlay and f_inode to the underlay)

2015-10-07 Thread Alban Crequy
Hi, I'm reporting an issue in overlay fs that was introduced in v4.2 (it worked on v4.1): when overlay fs is mounted inside a overlay fs, I get a "no such device or address" error (ENXIO) during open(). After adding some debug printks, I found that the ENXIO comes from fs/inode.c:no_open(). The b

Re: [tpmdd-devel] [PATCH 4/4] keys, trusted: seal/unseal with TPM 2.0 chips

2015-10-07 Thread Jarkko Sakkinen
On Wed, 2015-10-07 at 10:32 +, Fuchs, Andreas wrote: > > > > > > > I looked at Patch 3/4 and it seems you default to -EPERM > > > > > > > on TPM2_Create()- > > > > > > > and TPM2_Load()-failures ? > > > > > > > You might want to test against rc == TPM_RC_OBJECT_MEMORY > > > > > > > and return -

RE: [tpmdd-devel] [PATCH 4/4] keys, trusted: seal/unseal with TPM 2.0 chips

2015-10-07 Thread Fuchs, Andreas
> > > > > > I looked at Patch 3/4 and it seems you default to -EPERM on > > > > > > TPM2_Create()- > > > > > > and TPM2_Load()-failures ? > > > > > > You might want to test against rc == TPM_RC_OBJECT_MEMORY and > > > > > > return -EBUSY > > > > > > in those cases. Would you agree ? > > > > > > (

Re: [tpmdd-devel] [PATCH 4/4] keys, trusted: seal/unseal with TPM 2.0 chips

2015-10-07 Thread Jarkko Sakkinen
On Wed, Oct 07, 2015 at 10:04:40AM +, Fuchs, Andreas wrote: > > > > > I looked at Patch 3/4 and it seems you default to -EPERM on > > > > > TPM2_Create()- > > > > > and TPM2_Load()-failures ? > > > > > You might want to test against rc == TPM_RC_OBJECT_MEMORY and return > > > > > -EBUSY > > >

RE: [tpmdd-devel] [PATCH 4/4] keys, trusted: seal/unseal with TPM 2.0 chips

2015-10-07 Thread Fuchs, Andreas
> > > > I looked at Patch 3/4 and it seems you default to -EPERM on > > > > TPM2_Create()- > > > > and TPM2_Load()-failures ? > > > > You might want to test against rc == TPM_RC_OBJECT_MEMORY and return > > > > -EBUSY > > > > in those cases. Would you agree ? > > > > (P.S. I can cross-post there

Re: [PATCH] Introduces generic __list_splice_init_rcu();

2015-10-07 Thread Petko Manolov
On 15-10-06 11:37:01, Paul E. McKenney wrote: > On Sun, Sep 27, 2015 at 06:10:28PM +0300, Petko Manolov wrote: > > __list_splice_init_rcu() can be used to splice lists forming both stack and > > queue structures, depending on its arguments. It is based on the initial > > list_splice_init_rcu() wit