[PATCH RESEND] DPP: Check PKEX Encrypted Key attribute length against the curve
Jouni Malinen
j at w1.fi
Sat Oct 24 09:33:39 PDT 2026
On Sat, Oct 17, 2026 at 06:15:00AM -0700, Alejandro Pacheco wrote:
> dpp_pkex_rx_exchange_req() and dpp_pkex_rx_exchange_resp() passed the
> Encrypted Key attribute to crypto_ec_point_from_bin() after checking
> only that its length was even and nonzero (and, for the request, not
> larger than twice the maximum coordinate length).
> crypto_ec_point_from_bin() reads 2 * prime_len octets for the x and y
> coordinates, so a shorter attribute resulted in reading beyond the
> attribute and, when it was the last one, beyond the received frame. An
> oversized attribute in the response also caused an incorrect N.x length
> to be used when deriving z.
>
> Require the attribute to be exactly 2 * prime_len octets, as is already
> done for the Bootstrapping Key attribute in the PKEX Commit-Reveal
> messages.
>
> Add module tests for PKEX Exchange Request and Response processing
> rejecting an Encrypted Key attribute of the wrong length.
Thanks, applied.
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list