All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] crypto: dh - input validation fixes
@ 2017-11-01 22:25 ` Eric Biggers
  0 siblings, 0 replies; 22+ messages in thread
From: Eric Biggers @ 2017-11-01 22:25 UTC (permalink / raw)
  To: linux-crypto, Herbert Xu
  Cc: keyrings, Tudor-Dan Ambarus, Mat Martineau, Salvatore Benedetto,
	Stephan Mueller, Eric Biggers

From: Eric Biggers <ebiggers@google.com>

This series fixes several corner cases in the Diffie-Hellman key
exchange implementations:

- With CONFIG_DEBUG_SG=y and the software DH implementation, setting 'p'
  to 0 caused a BUG_ON().
- Both the software and QAT DH implementations had a double-free bug in
  the case where 'g' could not be allocated.
- With the QAT DH implementation, setting 'g' or 'key' larger than 'p'
  caused a buffer underflow.

Note that in kernels configured with CONFIG_KEY_DH_OPERATIONS=y, these
bugs are reachable by unprivileged users via KEYCTL_DH_COMPUTE.

Eric Biggers (4):
  crypto: dh - fix double free of ctx->p
  crypto: dh - don't permit 'p' to be 0
  crypto: qat - fix double free of ctx->p
  crypto: dh - don't permit 'key' or 'g' size longer than 'p'

 crypto/dh.c                                   | 18 +++++++++---------
 crypto/dh_helper.c                            | 16 ++++++++++++++++
 drivers/crypto/qat/qat_common/qat_asym_algs.c | 15 ++++++++-------
 3 files changed, 33 insertions(+), 16 deletions(-)

-- 
2.15.0.403.gc27cc4dac6-goog


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

end of thread, other threads:[~2017-11-03  6:23 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-01 22:25 [PATCH 0/4] crypto: dh - input validation fixes Eric Biggers
2017-11-01 22:25 ` Eric Biggers
2017-11-01 22:25 ` [PATCH 1/4] crypto: dh - fix double free of ctx->p Eric Biggers
2017-11-01 22:25   ` Eric Biggers
2017-11-02 10:55   ` Tudor Ambarus
2017-11-02 10:55     ` Tudor Ambarus
2017-11-02 17:30     ` Eric Biggers
2017-11-02 17:30       ` Eric Biggers
2017-11-01 22:25 ` [PATCH 2/4] crypto: dh - don't permit 'p' to be 0 Eric Biggers
2017-11-01 22:25   ` Eric Biggers
2017-11-02 11:40   ` Tudor Ambarus
2017-11-02 11:40     ` Tudor Ambarus
2017-11-02 17:31     ` Eric Biggers
2017-11-02 17:31       ` Eric Biggers
2017-11-03  6:23   ` Tudor Ambarus
2017-11-03  6:23     ` Tudor Ambarus
2017-11-01 22:25 ` [PATCH 3/4] crypto: qat - fix double free of ctx->p Eric Biggers
2017-11-01 22:25   ` Eric Biggers
2017-11-02 17:34   ` Eric Biggers
2017-11-02 17:34     ` Eric Biggers
2017-11-01 22:25 ` [PATCH 4/4] crypto: dh - don't permit 'key' or 'g' size longer than 'p' Eric Biggers
2017-11-01 22:25   ` Eric Biggers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.