1. 06 4月, 2016 2 次提交
  2. 04 3月, 2016 1 次提交
  3. 10 2月, 2016 1 次提交
  4. 09 2月, 2016 1 次提交
  5. 06 2月, 2016 1 次提交
  6. 15 12月, 2015 1 次提交
    • P
      IMA: create machine owner and blacklist keyrings · 41c89b64
      Petko Manolov 提交于
      This option creates IMA MOK and blacklist keyrings.  IMA MOK is an
      intermediate keyring that sits between .system and .ima keyrings,
      effectively forming a simple CA hierarchy.  To successfully import a key
      into .ima_mok it must be signed by a key which CA is in .system keyring.
      On turn any key that needs to go in .ima keyring must be signed by CA in
      either .system or .ima_mok keyrings. IMA MOK is empty at kernel boot.
      
      IMA blacklist keyring contains all revoked IMA keys.  It is consulted
      before any other keyring.  If the search is successful the requested
      operation is rejected and error is returned to the caller.
      Signed-off-by: NPetko Manolov <petkan@mip-labs.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      41c89b64
  7. 21 10月, 2015 1 次提交
    • D
      KEYS: Merge the type-specific data with the payload data · 146aa8b1
      David Howells 提交于
      Merge the type-specific data with the payload data into one four-word chunk
      as it seems pointless to keep them separate.
      
      Use user_key_payload() for accessing the payloads of overloaded
      user-defined keys.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      cc: linux-cifs@vger.kernel.org
      cc: ecryptfs@vger.kernel.org
      cc: linux-ext4@vger.kernel.org
      cc: linux-f2fs-devel@lists.sourceforge.net
      cc: linux-nfs@vger.kernel.org
      cc: ceph-devel@vger.kernel.org
      cc: linux-ima-devel@lists.sourceforge.net
      146aa8b1
  8. 20 10月, 2015 1 次提交
  9. 25 9月, 2015 1 次提交
    • D
      X.509: Don't strip leading 00's from key ID when constructing key description · e7c87bef
      David Howells 提交于
      Don't strip leading zeros from the crypto key ID when using it to construct
      the struct key description as the signature in kernels up to and including
      4.2 matched this aspect of the key.  This means that 1 in 256 keys won't
      actually match if their key ID begins with 00.
      
      The key ID is stored in the module signature as binary and so must be
      converted to text in order to invoke request_key() - but it isn't stripped
      at this point.
      
      Something like this is likely to be observed in dmesg when the key is loaded:
      
      [    1.572423] Loaded X.509 cert 'Build time autogenerated kernel
          key: 62a7c3d2da278be024da4af8652c071f3fea33'
      
      followed by this when we try and use it:
      
        [    1.646153] Request for unknown module key 'Build time autogenerated
          kernel key: 0062a7c3d2da278be024da4af8652c071f3fea33' err -11
      
      The 'Loaded' line should show an extra '00' on the front of the hex string.
      
      This problem should not affect 4.3-rc1 and onwards because there the key
      should be matched on one of its auxiliary identities rather than the key
      struct's description string.
      Reported-by: NArjan van de Ven <arjan@linux.intel.com>
      Reported-by: NAndy Whitcroft <apw@canonical.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      e7c87bef
  10. 13 8月, 2015 1 次提交
  11. 07 8月, 2015 2 次提交
  12. 22 5月, 2015 1 次提交
    • M
      KEYS: fix "ca_keys=" partial key matching · f2b3dee4
      Mimi Zohar 提交于
      The call to asymmetric_key_hex_to_key_id() from ca_keys_setup()
      silently fails with -ENOMEM.  Instead of dynamically allocating
      memory from a __setup function, this patch defines a variable
      and calls __asymmetric_key_hex_to_key_id(), a new helper function,
      directly.
      
      This bug was introduced by 'commit 46963b77 ("KEYS: Overhaul
      key identification when searching for asymmetric keys")'.
      
      Changelog:
      - for clarification, rename hexlen to asciihexlen in
        asymmetric_key_hex_to_key_id()
      - add size argument to __asymmetric_key_hex_to_key_id() - David Howells
      - inline __asymmetric_key_hex_to_key_id() - David Howells
      - remove duplicate strlen() calls
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Cc: stable@vger.kernel.org # 3.18
      f2b3dee4
  13. 07 10月, 2014 1 次提交
  14. 06 10月, 2014 1 次提交
  15. 03 10月, 2014 1 次提交
  16. 17 9月, 2014 2 次提交
    • D
      PKCS#7: Better handling of unsupported crypto · 41559420
      David Howells 提交于
      Provide better handling of unsupported crypto when verifying a PKCS#7 message.
      If we can't bridge the gap between a pair of X.509 certs or between a signed
      info block and an X.509 cert because it involves some crypto we don't support,
      that's not necessarily the end of the world as there may be other ways points
      at which we can intersect with a ring of trusted keys.
      
      Instead, only produce ENOPKG immediately if all the signed info blocks in a
      PKCS#7 message require unsupported crypto to bridge to the first X.509 cert.
      Otherwise, we defer the generation of ENOPKG until we get ENOKEY during trust
      validation.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      41559420
    • D
      KEYS: Overhaul key identification when searching for asymmetric keys · 46963b77
      David Howells 提交于
      Make use of the new match string preparsing to overhaul key identification
      when searching for asymmetric keys.  The following changes are made:
      
       (1) Use the previously created asymmetric_key_id struct to hold the following
           key IDs derived from the X.509 certificate or PKCS#7 message:
      
      	id: serial number + issuer
      	skid: subjKeyId + subject
      	authority: authKeyId + issuer
      
       (2) Replace the hex fingerprint attached to key->type_data[1] with an
           asymmetric_key_ids struct containing the id and the skid (if present).
      
       (3) Make the asymmetric_type match data preparse select one of two searches:
      
           (a) An iterative search for the key ID given if prefixed with "id:".  The
           	 prefix is expected to be followed by a hex string giving the ID to
           	 search for.  The criterion key ID is checked against all key IDs
           	 recorded on the key.
      
           (b) A direct search if the key ID is not prefixed with "id:".  This will
           	 look for an exact match on the key description.
      
       (4) Make x509_request_asymmetric_key() take a key ID.  This is then converted
           into "id:<hex>" and passed into keyring_search() where match preparsing
           will turn it back into a binary ID.
      
       (5) X.509 certificate verification then takes the authority key ID and looks
           up a key that matches it to find the public key for the certificate
           signature.
      
       (6) PKCS#7 certificate verification then takes the id key ID and looks up a
           key that matches it to find the public key for the signed information
           block signature.
      
      Additional changes:
      
       (1) Multiple subjKeyId and authKeyId values on an X.509 certificate cause the
           cert to be rejected with -EBADMSG.
      
       (2) The 'fingerprint' ID is gone.  This was primarily intended to convey PGP
           public key fingerprints.  If PGP is supported in future, this should
           generate a key ID that carries the fingerprint.
      
       (3) Th ca_keyid= kernel command line option is now converted to a key ID and
           used to match the authority key ID.  Possibly this should only match the
           actual authKeyId part and not the issuer as well.
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NVivek Goyal <vgoyal@redhat.com>
      46963b77
  17. 03 8月, 2014 1 次提交
  18. 29 7月, 2014 1 次提交
  19. 28 7月, 2014 1 次提交
  20. 23 7月, 2014 1 次提交
  21. 17 7月, 2014 3 次提交
    • D
      KEYS: validate certificate trust only with builtin keys · 32c4741c
      Dmitry Kasatkin 提交于
      Instead of allowing public keys, with certificates signed by any
      key on the system trusted keyring, to be added to a trusted keyring,
      this patch further restricts the certificates to those signed only by
      builtin keys on the system keyring.
      
      This patch defines a new option 'builtin' for the kernel parameter
      'keys_ownerid' to allow trust validation using builtin keys.
      
      Simplified Mimi's "KEYS: define an owner trusted keyring" patch
      
      Changelog v7:
      - rename builtin_keys to use_builtin_keys
      Signed-off-by: NDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      32c4741c
    • D
      KEYS: validate certificate trust only with selected key · ffb70f61
      Dmitry Kasatkin 提交于
      Instead of allowing public keys, with certificates signed by any
      key on the system trusted keyring, to be added to a trusted keyring,
      this patch further restricts the certificates to those signed by a
      particular key on the system keyring.
      
      This patch defines a new kernel parameter 'ca_keys' to identify the
      specific key which must be used for trust validation of certificates.
      
      Simplified Mimi's "KEYS: define an owner trusted keyring" patch.
      
      Changelog:
      - support for builtin x509 public keys only
      - export "asymmetric_keyid_match"
      - remove ifndefs MODULE
      - rename kernel boot parameter from keys_ownerid to ca_keys
      Signed-off-by: NDmitry Kasatkin <d.kasatkin@samsung.com>
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      ffb70f61
    • M
      KEYS: verify a certificate is signed by a 'trusted' key · 3be4beaf
      Mimi Zohar 提交于
      Only public keys, with certificates signed by an existing
      'trusted' key on the system trusted keyring, should be added
      to a trusted keyring.  This patch adds support for verifying
      a certificate's signature.
      
      This is derived from David Howells pkcs7_request_asymmetric_key() patch.
      
      Changelog v6:
      - on error free key - Dmitry
      - validate trust only for not already trusted keys - Dmitry
      - formatting cleanup
      
      Changelog:
      - define get_system_trusted_keyring() to fix kbuild issues
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Acked-by: NDmitry Kasatkin <dmitry.kasatkin@gmail.com>
      3be4beaf
  22. 24 11月, 2013 1 次提交
    • L
      Revert "KEYS: verify a certificate is signed by a 'trusted' key" · 4c1cc40a
      Linus Torvalds 提交于
      This reverts commit 09fbc473, which
      caused the following build errors:
      
        crypto/asymmetric_keys/x509_public_key.c: In function ‘x509_key_preparse’:
        crypto/asymmetric_keys/x509_public_key.c:237:35: error: ‘system_trusted_keyring’ undeclared (first use in this function)
         ret = x509_validate_trust(cert, system_trusted_keyring);
                                         ^
        crypto/asymmetric_keys/x509_public_key.c:237:35: note: each undeclared identifier is reported only once for each function it appears in
      
      reported by Jim Davis. Mimi says:
      
       "I made the classic mistake of requesting this patch to be upstreamed
        at the last second, rather than waiting until the next open window.
      
        At this point, the best course would probably be to revert the two
        commits and fix them for the next open window"
      Reported-by: NJim Davis <jim.epost@gmail.com>
      Acked-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4c1cc40a
  23. 26 10月, 2013 2 次提交
  24. 26 9月, 2013 8 次提交
  25. 25 9月, 2013 2 次提交
  26. 10 10月, 2012 1 次提交