<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/keys, branch v4.6</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=v4.6</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-03-17T18:33:45Z</updated>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security</title>
<updated>2016-03-17T18:33:45Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-17T18:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bb7aeae3d680c2c777f54274b0270ced0599f33d'/>
<id>urn:sha1:bb7aeae3d680c2c777f54274b0270ced0599f33d</id>
<content type='text'>
Pull security layer updates from James Morris:
 "There are a bunch of fixes to the TPM, IMA, and Keys code, with minor
  fixes scattered across the subsystem.

  IMA now requires signed policy, and that policy is also now measured
  and appraised"

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (67 commits)
  X.509: Make algo identifiers text instead of enum
  akcipher: Move the RSA DER encoding check to the crypto layer
  crypto: Add hash param to pkcs1pad
  sign-file: fix build with CMS support disabled
  MAINTAINERS: update tpmdd urls
  MODSIGN: linux/string.h should be #included to get memcpy()
  certs: Fix misaligned data in extra certificate list
  X.509: Handle midnight alternative notation in GeneralizedTime
  X.509: Support leap seconds
  Handle ISO 8601 leap seconds and encodings of midnight in mktime64()
  X.509: Fix leap year handling again
  PKCS#7: fix unitialized boolean 'want'
  firmware: change kernel read fail to dev_dbg()
  KEYS: Use the symbol value for list size, updated by scripts/insert-sys-cert
  KEYS: Reserve an extra certificate symbol for inserting without recompiling
  modsign: hide openssl output in silent builds
  tpm_tis: fix build warning with tpm_tis_resume
  ima: require signed IMA policy
  ima: measure and appraise the IMA policy itself
  ima: load policy using path
  ...
</content>
</entry>
<entry>
<title>Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-03-17T18:22:54Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-03-17T18:22:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=70477371dc350746d10431d74f0f213a8d59924c'/>
<id>urn:sha1:70477371dc350746d10431d74f0f213a8d59924c</id>
<content type='text'>
Pull crypto update from Herbert Xu:
 "Here is the crypto update for 4.6:

  API:
   - Convert remaining crypto_hash users to shash or ahash, also convert
     blkcipher/ablkcipher users to skcipher.
   - Remove crypto_hash interface.
   - Remove crypto_pcomp interface.
   - Add crypto engine for async cipher drivers.
   - Add akcipher documentation.
   - Add skcipher documentation.

  Algorithms:
   - Rename crypto/crc32 to avoid name clash with lib/crc32.
   - Fix bug in keywrap where we zero the wrong pointer.

  Drivers:
   - Support T5/M5, T7/M7 SPARC CPUs in n2 hwrng driver.
   - Add PIC32 hwrng driver.
   - Support BCM6368 in bcm63xx hwrng driver.
   - Pack structs for 32-bit compat users in qat.
   - Use crypto engine in omap-aes.
   - Add support for sama5d2x SoCs in atmel-sha.
   - Make atmel-sha available again.
   - Make sahara hashing available again.
   - Make ccp hashing available again.
   - Make sha1-mb available again.
   - Add support for multiple devices in ccp.
   - Improve DMA performance in caam.
   - Add hashing support to rockchip"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (116 commits)
  crypto: qat - remove redundant arbiter configuration
  crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()
  crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
  crypto: qat - Change the definition of icp_qat_uof_regtype
  hwrng: exynos - use __maybe_unused to hide pm functions
  crypto: ccp - Add abstraction for device-specific calls
  crypto: ccp - CCP versioning support
  crypto: ccp - Support for multiple CCPs
  crypto: ccp - Remove check for x86 family and model
  crypto: ccp - memset request context to zero during import
  lib/mpi: use "static inline" instead of "extern inline"
  lib/mpi: avoid assembler warning
  hwrng: bcm63xx - fix non device tree compatibility
  crypto: testmgr - allow rfc3686 aes-ctr variants in fips mode.
  crypto: qat - The AE id should be less than the maximal AE number
  lib/mpi: Endianness fix
  crypto: rockchip - add hash support for crypto engine in rk3288
  crypto: xts - fix compile errors
  crypto: doc - add skcipher API documentation
  crypto: doc - update AEAD AD handling
  ...
</content>
</entry>
<entry>
<title>Merge tag 'keys-next-20160303' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into next</title>
<updated>2016-03-04T00:39:53Z</updated>
<author>
<name>James Morris</name>
<email>james.l.morris@oracle.com</email>
</author>
<published>2016-03-04T00:39:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88a1b564a20e371e6be41b39b85673e9c1959491'/>
<id>urn:sha1:88a1b564a20e371e6be41b39b85673e9c1959491</id>
<content type='text'>
</content>
</entry>
<entry>
<title>security/keys: make big_key.c explicitly non-modular</title>
<updated>2016-02-18T15:15:59Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2015-12-09T22:37:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a1f2bdf338f15dbad10ee6362891ebf79244858b'/>
<id>urn:sha1:a1f2bdf338f15dbad10ee6362891ebf79244858b</id>
<content type='text'>
The Kconfig currently controlling compilation of this code is:

config BIG_KEYS
        bool "Large payload keys"

...meaning that it currently is not being built as a module by anyone.

Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.

Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.

We also delete the MODULE_LICENSE tag since all that information
is already contained at the top of the file in the comments.

Cc: James Morris &lt;james.l.morris@oracle.com&gt;
Cc: "Serge E. Hallyn" &lt;serge@hallyn.com&gt;
Cc: keyrings@vger.kernel.org
Cc: linux-security-module@vger.kernel.org
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
<entry>
<title>tpm: fix checks for policy digest existence in tpm2_seal_trusted()</title>
<updated>2016-02-10T02:10:55Z</updated>
<author>
<name>Jarkko Sakkinen</name>
<email>jarkko.sakkinen@linux.intel.com</email>
</author>
<published>2016-01-06T14:43:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f3c82ade7c59303167d56b0be3e0707751fc45e2'/>
<id>urn:sha1:f3c82ade7c59303167d56b0be3e0707751fc45e2</id>
<content type='text'>
In my original patch sealing with policy was done with dynamically
allocated buffer that I changed later into an array so the checks in
tpm2-cmd.c became invalid. This patch fixes the issue.

Fixes: 5beb0c435bdd ("keys, trusted: seal with a TPM2 authorization policy")
Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Jarkko Sakkinen &lt;jarkko.sakkinen@linux.intel.com&gt;
Acked-by: Peter Huewe &lt;peterhuewe@gmx.de&gt;
</content>
</entry>
<entry>
<title>KEYS: Add an alloc flag to convey the builtinness of a key</title>
<updated>2016-02-09T16:40:46Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-02-09T16:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d2787cf0b210d2925e8d44e2e79241385249d6b'/>
<id>urn:sha1:5d2787cf0b210d2925e8d44e2e79241385249d6b</id>
<content type='text'>
Add KEY_ALLOC_BUILT_IN to convey that a key should have KEY_FLAG_BUILTIN
set rather than setting it after the fact.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Only apply KEY_FLAG_KEEP to a key if a parent keyring has it set</title>
<updated>2016-01-27T23:48:40Z</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-01-27T01:02:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eee045021fb22aeac7f5d6f2092430b530c880ee'/>
<id>urn:sha1:eee045021fb22aeac7f5d6f2092430b530c880ee</id>
<content type='text'>
KEY_FLAG_KEEP should only be applied to a key if the keyring it is being
linked into has KEY_FLAG_KEEP set.

To this end, partially revert the following patch:

	commit 1d6d167c2efcfe9539d9cffb1a1be9c92e39c2c0
	Author: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
	Date:   Thu Jan 7 07:46:36 2016 -0500
	KEYS: refcount bug fix

to undo the change that made it unconditional (Mimi got it right the first
time).

Without undoing this change, it becomes impossible to delete, revoke or
invalidate keys added to keyrings through __key_instantiate_and_link()
where the keyring has itself been linked to.  To test this, run the
following command sequence:

    keyctl newring foo @s
    keyctl add user a a %:foo
    keyctl unlink %user:a %:foo
    keyctl clear %:foo

With the commit mentioned above the third and fourth commands fail with
EPERM when they should succeed.

Reported-by: Stephen Gallager &lt;sgallagh@redhat.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by:  Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
cc: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
cc: keyrings@vger.kernel.org
cc: stable@vger.kernel.org
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>KEYS: Use skcipher</title>
<updated>2016-01-27T12:36:03Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2016-01-24T13:18:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c3917fd9dfbc8e5e4ca145398d7dc13e42a2d52f'/>
<id>urn:sha1:c3917fd9dfbc8e5e4ca145398d7dc13e42a2d52f</id>
<content type='text'>
This patch replaces uses of blkcipher with skcipher.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>KEYS: Fix keyring ref leak in join_session_keyring()</title>
<updated>2016-01-19T23:50:48Z</updated>
<author>
<name>Yevgeny Pats</name>
<email>yevgeny@perception-point.io</email>
</author>
<published>2016-01-19T22:09:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23567fd052a9abb6d67fe8e7a9ccdd9800a540f2'/>
<id>urn:sha1:23567fd052a9abb6d67fe8e7a9ccdd9800a540f2</id>
<content type='text'>
This fixes CVE-2016-0728.

If a thread is asked to join as a session keyring the keyring that's already
set as its session, we leak a keyring reference.

This can be tested with the following program:

	#include &lt;stddef.h&gt;
	#include &lt;stdio.h&gt;
	#include &lt;sys/types.h&gt;
	#include &lt;keyutils.h&gt;

	int main(int argc, const char *argv[])
	{
		int i = 0;
		key_serial_t serial;

		serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
				"leaked-keyring");
		if (serial &lt; 0) {
			perror("keyctl");
			return -1;
		}

		if (keyctl(KEYCTL_SETPERM, serial,
			   KEY_POS_ALL | KEY_USR_ALL) &lt; 0) {
			perror("keyctl");
			return -1;
		}

		for (i = 0; i &lt; 100; i++) {
			serial = keyctl(KEYCTL_JOIN_SESSION_KEYRING,
					"leaked-keyring");
			if (serial &lt; 0) {
				perror("keyctl");
				return -1;
			}
		}

		return 0;
	}

If, after the program has run, there something like the following line in
/proc/keys:

3f3d898f I--Q---   100 perm 3f3f0000     0     0 keyring   leaked-keyring: empty

with a usage count of 100 * the number of times the program has been run,
then the kernel is malfunctioning.  If leaked-keyring has zero usages or
has been garbage collected, then the problem is fixed.

Reported-by: Yevgeny Pats &lt;yevgeny@perception-point.io&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Acked-by: Don Zickus &lt;dzickus@redhat.com&gt;
Acked-by: Prarit Bhargava &lt;prarit@redhat.com&gt;
Acked-by: Jarod Wilson &lt;jarod@redhat.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.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>2016-01-18T03:13:15Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-01-18T03:13:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5807fcaa9bf7dd87241df739161c119cf78a6bc4'/>
<id>urn:sha1:5807fcaa9bf7dd87241df739161c119cf78a6bc4</id>
<content type='text'>
Pull security subsystem updates from James Morris:

 - EVM gains support for loading an x509 cert from the kernel
   (EVM_LOAD_X509), into the EVM trusted kernel keyring.

 - Smack implements 'file receive' process-based permission checking for
   sockets, rather than just depending on inode checks.

 - Misc enhancments for TPM &amp; TPM2.

 - Cleanups and bugfixes for SELinux, Keys, and IMA.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (41 commits)
  selinux: Inode label revalidation performance fix
  KEYS: refcount bug fix
  ima: ima_write_policy() limit locking
  IMA: policy can be updated zero times
  selinux: rate-limit netlink message warnings in selinux_nlmsg_perm()
  selinux: export validatetrans decisions
  gfs2: Invalid security labels of inodes when they go invalid
  selinux: Revalidate invalid inode security labels
  security: Add hook to invalidate inode security labels
  selinux: Add accessor functions for inode-&gt;i_security
  security: Make inode argument of inode_getsecid non-const
  security: Make inode argument of inode_getsecurity non-const
  selinux: Remove unused variable in selinux_inode_init_security
  keys, trusted: seal with a TPM2 authorization policy
  keys, trusted: select hash algorithm for TPM2 chips
  keys, trusted: fix: *do not* allow duplicate key options
  tpm_ibmvtpm: properly handle interrupted packet receptions
  tpm_tis: Tighten IRQ auto-probing
  tpm_tis: Refactor the interrupt setup
  tpm_tis: Get rid of the duplicate IRQ probing code
  ...
</content>
</entry>
</feed>
