[Bug 1990520] Re: [Ubuntu 22.04] zkey: Fix re-enciphering of EP11 identity key of KMIP plugin

Łukasz Zemczak 1990520 at bugs.launchpad.net
Fri Dec 2 00:46:07 UTC 2022


Hello bugproxy, or anyone else affected,

Accepted s390-tools into jammy-proposed. The package will build now and
be available at
https://launchpad.net/ubuntu/+source/s390-tools/2.20.0-0ubuntu3.2 in a
few hours, and then in the -proposed repository.

Please help us by testing this new package.  See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.  Your feedback will aid us getting this
update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested, what testing has been
performed on the package and change the tag from verification-needed-
jammy to verification-done-jammy. If it does not fix the bug for you,
please add a comment stating that, and change the tag to verification-
failed-jammy. In either case, without details of your testing we will
not be able to proceed.

Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification .  Thank you in
advance for helping!

N.B. The updated package will be released to -updates after the bug(s)
fixed by this package have been verified and the package has been in
-proposed for a minimum of 7 days.

** Changed in: s390-tools (Ubuntu Jammy)
       Status: Triaged => Fix Committed

** Tags added: verification-needed verification-needed-jammy

** Changed in: s390-tools-signed (Ubuntu Jammy)
       Status: Triaged => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1990520

Title:
  [Ubuntu 22.04] zkey: Fix re-enciphering of EP11 identity key of KMIP
  plugin

Status in Ubuntu on IBM z Systems:
  In Progress
Status in s390-tools package in Ubuntu:
  Fix Released
Status in s390-tools-signed package in Ubuntu:
  Fix Released
Status in s390-tools source package in Jammy:
  Fix Committed
Status in s390-tools-signed source package in Jammy:
  Fix Committed

Bug description:
  SRU Justification:
  ------------------

  [ Impact ]

   * When re-enciphering the identity key
     and/or wrapping key of the zkey KMIP plugin via 'zkey kms reencipher',
     the operation completes without an error,
     but the secure keys are left un-reenciphered.

   * A subsequent connection attempt with the KMIP server will fail
     because the identity key is no longer valid.

   * The re-enciphered secure key is not copied back into the key token
  buffer.

   * Also, the the public key part,
     i.e. the MACed SubjectPublicKeyInfo (SPKI) structure
     must also be re-enciphered (i.e. re-MACed),
     since the MAC is calculated with the EP11 master key.

  [ Fix ]

   * 4e2ebe03 4e2ebe0370d9fb036b7554d5ac5df4418dbe0397 "libseckey: Fix
  re-enciphering of EP11 secure key"

  [ Test Plan ]

   * An Ubuntu Server 22.04 for s390x installation with a CryptoExpress
     adapter in EP11 mode and at least one available/online domain is needed.

   * Perform a master key change on the EP11 APQNs used with the KMIP
  plugin.

   * The is done indirectly, via libkmipclient, a shared library that
     provides the KMIP client to communicate with an KMIP server.

   * Test will be done by IBM.

  [ Where problems could occur ]

   * The memcpy, at the beginning and/or at the end or the inserted code
     could be wrong, and copy wrong contents.

   * The newly introduced 're-encipher MACed SPKI' code can be erroneous,
     which may lead to a non working fix.

   * The calculation and handling of the length which could lead to a
  broken cmdblock.

   * Problems could occur in case the re-encryption is done with a different
     master key compared to the initial encryption,
     even though if this should be caught as 'CKR_IBM_WKID_MISMATCH'.

  [ Other Info ]
   
   * The s390-tools version v2.23 in kinetic already incl. this fix,
     hence it's not affected,
     nor versions for Ubuntu releases (in service) older than jammy
     are affected.

  __________

  Description:
  zkey: Fix re-enciphering of EP11 identity key of KMIP plugin

  Symptom:
  When re-enciphering the identity key and/or wrapping key of the zkey KMIP plugin via 'zkey kms reencipher', the operation completes without an error, but the secure keys are left un-reenciphered. A subsequent connection attempt with the KMIP server will fail because the identity key is no longer valid.

  Problem:
  The re-enciphered secure key is not copied back into the key token buffer. Also, the the public key part, i.e. the MACed SubjectPublicKeyInfo (SPKI) structure must also be re-enciphered (i.e. re-MACed), since the MAC is calculated with the EP11 master key.

  Solution:
  Copy the re-enciphered secure key back into the key token buffer, and also re-encipher the public key part.

  Reproduction:  Perform a master key change on the EP11 APQNs used with the
                 KMIP plugin.

  Problem-ID:    197605

  Upstream-ID:   4e2ebe0370d9fb036b7554d5ac5df4418dbe0397

  Preventive:    yes

  Date:          2022-04-08
  Author:        Ingo Franzki <ifranzki at linux.ibm.com>
  Component:     s390-tools

  == Comment: #1 - Ingo Franzki <ifranzki at de.ibm.com> - 2022-04-08 09:57:45 ==
  Upstream commit:
  https://github.com/ibm-s390-linux/s390-tools/commit/4e2ebe0370d9fb036b7554d5ac5df4418dbe0397

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-z-systems/+bug/1990520/+subscriptions




More information about the foundations-bugs mailing list