<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/smack, branch v3.18</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=v3.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-10-12T14:13:55Z</updated>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security</title>
<updated>2014-10-12T14:13:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-10-12T14:13:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e40d331bd72447197f26525f21711c4a265b6a6'/>
<id>urn:sha1:5e40d331bd72447197f26525f21711c4a265b6a6</id>
<content type='text'>
Pull security subsystem updates from James Morris.

Mostly ima, selinux, smack and key handling updates.

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (65 commits)
  integrity: do zero padding of the key id
  KEYS: output last portion of fingerprint in /proc/keys
  KEYS: strip 'id:' from ca_keyid
  KEYS: use swapped SKID for performing partial matching
  KEYS: Restore partial ID matching functionality for asymmetric keys
  X.509: If available, use the raw subjKeyId to form the key description
  KEYS: handle error code encoded in pointer
  selinux: normalize audit log formatting
  selinux: cleanup error reporting in selinux_nlmsg_perm()
  KEYS: Check hex2bin()'s return when generating an asymmetric key ID
  ima: detect violations for mmaped files
  ima: fix race condition on ima_rdwr_violation_check and process_measurement
  ima: added ima_policy_flag variable
  ima: return an error code from ima_add_boot_aggregate()
  ima: provide 'ima_appraise=log' kernel option
  ima: move keyring initialization to ima_init()
  PKCS#7: Handle PKCS#7 messages that contain no X.509 certs
  PKCS#7: Better handling of unsupported crypto
  KEYS: Overhaul key identification when searching for asymmetric keys
  KEYS: Implement binary asymmetric key ID handling
  ...
</content>
</entry>
<entry>
<title>security: make security_file_set_fowner, f_setown and __f_setown void return</title>
<updated>2014-09-09T20:01:36Z</updated>
<author>
<name>Jeff Layton</name>
<email>jlayton@primarydata.com</email>
</author>
<published>2014-08-22T15:27:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0b93eddfe17dcb7d644eb5d6ad02a86fc41a977'/>
<id>urn:sha1:e0b93eddfe17dcb7d644eb5d6ad02a86fc41a977</id>
<content type='text'>
security_file_set_fowner always returns 0, so make it f_setown and
__f_setown void return functions and fix up the error handling in the
callers.

Cc: linux-security-module@vger.kernel.org
Signed-off-by: Jeff Layton &lt;jlayton@primarydata.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>Make Smack operate on smack_known struct where it still used char*</title>
<updated>2014-08-29T17:10:55Z</updated>
<author>
<name>Lukasz Pawelczyk</name>
<email>l.pawelczyk@samsung.com</email>
</author>
<published>2014-08-29T15:02:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21c7eae21a2100a89cfb8cebaf7b770271f32c6e'/>
<id>urn:sha1:21c7eae21a2100a89cfb8cebaf7b770271f32c6e</id>
<content type='text'>
Smack used to use a mix of smack_known struct and char* throughout its
APIs and implementation. This patch unifies the behaviour and makes it
store and operate exclusively on smack_known struct pointers when managing
labels.

Signed-off-by: Lukasz Pawelczyk &lt;l.pawelczyk@samsung.com&gt;

Conflicts:
	security/smack/smack_access.c
	security/smack/smack_lsm.c
</content>
</entry>
<entry>
<title>Fix a bidirectional UDS connect check typo</title>
<updated>2014-08-29T17:10:47Z</updated>
<author>
<name>Lukasz Pawelczyk</name>
<email>l.pawelczyk@samsung.com</email>
</author>
<published>2014-08-29T15:02:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d01757904d9deb619e23c9450218829943a46822'/>
<id>urn:sha1:d01757904d9deb619e23c9450218829943a46822</id>
<content type='text'>
The 54e70ec5eb090193b03e69d551fa6771a5a217c4 commit introduced a
bidirectional check that should have checked for mutual WRITE access
between two labels. Due to a typo the second check was incorrect.

Signed-off-by: Lukasz Pawelczyk &lt;l.pawelczyk@samsung.com&gt;
</content>
</entry>
<entry>
<title>Small fixes in comments describing function parameters</title>
<updated>2014-08-29T17:10:36Z</updated>
<author>
<name>Lukasz Pawelczyk</name>
<email>l.pawelczyk@samsung.com</email>
</author>
<published>2014-08-29T15:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e95ef49b7f8f497bdb529f4cb1fe228e986b3255'/>
<id>urn:sha1:e95ef49b7f8f497bdb529f4cb1fe228e986b3255</id>
<content type='text'>
Signed-off-by: Lukasz Pawelczyk &lt;l.pawelczyk@samsung.com&gt;
</content>
</entry>
<entry>
<title>Smack: Bring-up access mode</title>
<updated>2014-08-28T20:11:56Z</updated>
<author>
<name>Casey Schaufler</name>
<email>casey@schaufler-ca.com</email>
</author>
<published>2014-08-27T21:51:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d166c8024d620d654b12834fac354fb4203c6c22'/>
<id>urn:sha1:d166c8024d620d654b12834fac354fb4203c6c22</id>
<content type='text'>
People keep asking me for permissive mode, and I keep saying "no".

Permissive mode is wrong for more reasons than I can enumerate,
but the compelling one is that it's once on, never off.

Nonetheless, there is an argument to be made for running a
process with lots of permissions, logging which are required,
and then locking the process down. There wasn't a way to do
that with Smack, but this provides it.

The notion is that you start out by giving the process an
appropriate Smack label, such as "ATBirds". You create rules
with a wide range of access and the "b" mode. On Tizen it
might be:

	ATBirds	System	rwxalb
	ATBirds	User	rwxalb
	ATBirds	_	rwxalb
	User	ATBirds	wb
	System	ATBirds	wb

Accesses that fail will generate audit records. Accesses
that succeed because of rules marked with a "b" generate
log messages identifying the rule, the program and as much
object information as is convenient.

When the system is properly configured and the programs
brought in line with the labeling scheme the "b" mode can
be removed from the rules. When the system is ready for
production the facility can be configured out.

This provides the developer the convenience of permissive
mode without creating a system that looks like it is
enforcing a policy while it is not.

Signed-off-by: Casey Schaufler &lt;casey@schaufler-ca.com&gt;
</content>
</entry>
<entry>
<title>Smack: Fix setting label on successful file open</title>
<updated>2014-08-25T21:27:28Z</updated>
<author>
<name>Marcin Niesluchowski</name>
<email>m.niesluchow@samsung.com</email>
</author>
<published>2014-08-19T12:26:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d83d2c26461d661384676a4eed935d925b0fcc34'/>
<id>urn:sha1:d83d2c26461d661384676a4eed935d925b0fcc34</id>
<content type='text'>
While opening with CAP_MAC_OVERRIDE file label is not set.
Other calls may access it after CAP_MAC_OVERRIDE is dropped from process.

Signed-off-by: Marcin Niesluchowski &lt;m.niesluchow@samsung.com&gt;
</content>
</entry>
<entry>
<title>Smack: remove unneeded NULL-termination from securtity label</title>
<updated>2014-08-08T21:51:19Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>k.khlebnikov@samsung.com</email>
</author>
<published>2014-08-07T16:52:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=da1b63566c469bf3e2b24182114422e16b1aa34c'/>
<id>urn:sha1:da1b63566c469bf3e2b24182114422e16b1aa34c</id>
<content type='text'>
Values of extended attributes are stored as binary blobs. NULL-termination
of them isn't required. It just wastes disk space and confuses command-line
tools like getfattr because they have to print that zero byte at the end.

This patch removes terminating zero byte from initial security label in
smack_inode_init_security and cuts it out in function smack_inode_getsecurity
which is used by syscall getxattr. This change seems completely safe, because
function smk_parse_smack ignores everything after first zero byte.

Signed-off-by: Konstantin Khlebnikov &lt;k.khlebnikov@samsung.com&gt;
</content>
</entry>
<entry>
<title>Smack: handle zero-length security labels without panic</title>
<updated>2014-08-08T21:51:07Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>k.khlebnikov@samsung.com</email>
</author>
<published>2014-08-07T16:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b862e561bad6372872f5bf98d95f4131d265b110'/>
<id>urn:sha1:b862e561bad6372872f5bf98d95f4131d265b110</id>
<content type='text'>
Zero-length security labels are invalid but kernel should handle them.

This patch fixes kernel panic after setting zero-length security labels:
# attr -S -s "SMACK64" -V "" file

And after writing zero-length string into smackfs files syslog and onlycp:
# python -c 'import os; os.write(1, "")' &gt; /smack/syslog

The problem is caused by brain-damaged logic in function smk_parse_smack()
which takes pointer to buffer and its length but if length below or equal zero
it thinks that the buffer is zero-terminated. Unfortunately callers of this
function are widely used and proper fix requires serious refactoring.

Signed-off-by: Konstantin Khlebnikov &lt;k.khlebnikov@samsung.com&gt;
</content>
</entry>
<entry>
<title>Smack: fix behavior of smack_inode_listsecurity</title>
<updated>2014-08-08T21:50:19Z</updated>
<author>
<name>Konstantin Khlebnikov</name>
<email>k.khlebnikov@samsung.com</email>
</author>
<published>2014-08-07T16:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd5c9d230d2ac8a2594dfd15f0cca678fd7a64c7'/>
<id>urn:sha1:fd5c9d230d2ac8a2594dfd15f0cca678fd7a64c7</id>
<content type='text'>
Security operation -&gt;inode_listsecurity is used for generating list of
available extended attributes for syscall listxattr. Currently it's used
only in nfs4 or if filesystem doesn't provide i_op-&gt;listxattr.

The list is the set of NULL-terminated names, one after the other.
This method must include zero byte at the and into result.

Also this function must return length even if string does not fit into
output buffer or it is NULL, see similar method in selinux and man listxattr.

Signed-off-by: Konstantin Khlebnikov &lt;k.khlebnikov@samsung.com&gt;
</content>
</entry>
</feed>
