Re: [PATCH] crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key()

2021-02-09 Thread Herbert Xu
On Wed, Feb 03, 2021 at 11:28:37AM +, Daniele Alessandrelli wrote: > From: Daniele Alessandrelli > > The length ('len' parameter) passed to crypto_ecdh_decode_key() is never > checked against the length encoded in the passed buffer ('buf' > parameter). This could lead to an out-of-bounds

[PATCH] crypto: ecdh_helper - Ensure 'len >= secret.len' in decode_key()

2021-02-03 Thread Daniele Alessandrelli
From: Daniele Alessandrelli The length ('len' parameter) passed to crypto_ecdh_decode_key() is never checked against the length encoded in the passed buffer ('buf' parameter). This could lead to an out-of-bounds access when the passed length is less than the encoded length. Add a check to