]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
KEYS: Fix for erroneous trust of incorrectly signed X.509 certs
authorMat Martineau <mathew.j.martineau@linux.intel.com>
Sun, 17 Jul 2016 23:10:55 +0000 (00:10 +0100)
committerJames Morris <james.l.morris@oracle.com>
Mon, 18 Jul 2016 02:19:47 +0000 (12:19 +1000)
commitacddc72015e5bc8f640b02d38b36afd7841c9c14
tree1be27dee2805638585dd161d1f402136341c6f85
parentd128471a14775cd11abd81c09b2a086997ab3150
KEYS: Fix for erroneous trust of incorrectly signed X.509 certs

Arbitrary X.509 certificates without authority key identifiers (AKIs)
can be added to "trusted" keyrings, including IMA or EVM certs loaded
from the filesystem. Signature verification is currently bypassed for
certs without AKIs.

Trusted keys were recently refactored, and this bug is not present in
4.6.

restrict_link_by_signature should return -ENOKEY (no matching parent
certificate found) if the certificate being evaluated has no AKIs,
instead of bypassing signature checks and returning 0 (new certificate
accepted).

Reported-by: Petko Manolov <petkan@mip-labs.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
crypto/asymmetric_keys/restrict.c