Re: [PATCH v5] crypto: atmel-ecc - fix missing ECDH public key validation

From: Thorsten Blum

Date: Tue Dec 01 2026 - 06:31:33 EST


On Mon, Nov 30, 2026 at 12:43:51PM +0000, Ryan Prinz wrote:
> atmel_ecdh_compute_shared_secret() passes the peer's ECDH public point
> to the ATECC508A/608A/608B secure element without software validation;
> only req->src_len is checked.
>
> Validate the point in software before it reaches the I2C command, the
> same check crypto_ecdh_shared_secret() performs for the generic
> "ecdh-nist-p256" implementation: call ecc_is_pubkey_valid_partial()
> and reject the request if it fails.
>
> Fixes: 11105693fa05 ("crypto: atmel-ecc - introduce Microchip / Atmel ECC driver")
> Signed-off-by: Ryan Prinz <rc4d5a@xxxxxxxxxxxxxx>

The software validation looks good to me.

Reviewed-by: Thorsten Blum <blum@xxxxxxxxxx>

Herbert, since hardware validation of the public key remains unknown,
would you keep the Fixes: tag or treat this as hardening?

Thanks,
Thorsten