linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] AES GCM fixes for the CCP crypto driver
@ 2019-07-30 16:05 Hook, Gary
  2019-07-30 16:05 ` [PATCH 1/3] crypto: ccp - Fix oops by properly managing allocated structures Hook, Gary
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hook, Gary @ 2019-07-30 16:05 UTC (permalink / raw)
  To: linux-crypto@vger.kernel.org
  Cc: herbert@gondor.apana.org.au, davem@davemloft.net,
	Lendacky, Thomas, Hook, Gary

Additional testing features added to the crypto framework (including fuzzy
probing and variations of the lengths of input parameters such as AAD and
authsize) expose some gaps in robustness and function in the CCP driver.
Address these gaps:

Input text is allowed to be zero bytes in length. In this case no
encryption/decryption occurs, and certain data structures are not
allocated. Don't clean up what doesn't exist.

Valid auth tag sizes are 4, 8, 12, 13, 14, 15 or 16 bytes.
Note: since the CCP driver has been designed to be used directly, add
      validation of the authsize parameter at this layer.

AES GCM defines the input text for decryption as the concatenation of
the AAD, the ciphertext, and the tag. Only the cipher text needs to
be decrypted; the tag is simple used for comparison.

Gary R Hook (3):
  crypto: ccp - Fix oops by properly managing allocated structures
  crypto: ccp - Add support for valid authsize values less than 16
  crypto: ccp - Ignore tag length when decrypting GCM ciphertext

 drivers/crypto/ccp/ccp-crypto-aes-galois.c | 14 +++++++++
 drivers/crypto/ccp/ccp-ops.c               | 33 ++++++++++++++++------
 include/linux/ccp.h                        |  2 ++
 3 files changed, 40 insertions(+), 9 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-02  4:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-30 16:05 [PATCH 0/3] AES GCM fixes for the CCP crypto driver Hook, Gary
2019-07-30 16:05 ` [PATCH 1/3] crypto: ccp - Fix oops by properly managing allocated structures Hook, Gary
2019-07-30 16:05 ` [PATCH 2/3] crypto: ccp - Add support for valid authsize values less than 16 Hook, Gary
2019-07-30 16:05 ` [PATCH 3/3] crypto: ccp - Ignore tag length when decrypting GCM ciphertext Hook, Gary
2019-08-02  4:56 ` [PATCH 0/3] AES GCM fixes for the CCP crypto driver Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).