[PATCH] common: Fix misaligned access in get_max_nss_capability()

Jouni Malinen j at w1.fi
Fri May 8 14:19:07 PDT 2026


On Thu, May 07, 2026 at 10:11:27PM +0300, Andrei Otcheretianski wrote:
> The HE capabilities optional field starts at an odd offset within
> the packed struct. Casting &optional[0] or &optional[4] to
> le16 * causes misaligned memory access, which is undefined behavior
> and crashes wpa_supplicant with sanitizers enabled.
> Properly use WPA_GET_LE16() instead.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list