Re: [PATCH] wpa_supplicant: Fix parsing of max_oper_chwidth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 07, 2018 at 03:24:29PM +0200, Sven Eckelmann wrote:
> The max_oper_chwidth is parsed in wpa_config_set as INT_RANGE (see
> ssid_fields). The actual parsing for INT_RANGE is done by
> wpa_config_parse_int which can only store the result as full integer.
> 
> max_oper_chwidth is stored as u8 (a single byte) in wpa_ssid. This means
> that on little endian systems, the least significant byte of the parsed
> value are really stored in the max_oper_chwidth. But on big endian system,
> the only most significant byte is stored as max_oper_chwidth. This means
> that 0 is always stored because the provided range doesn't allow any other
> value for systems with multi-byte-wide integers.
> 
> This also means that for common systems with 4-byte-wide integers, the
> remaining 3 bytes were written after the actual member of the struct. This
> should not have influenced the behavior of succeeding members because these
> bytes would have been part of the padding between the members on most
> systems.
> 
> Increasing its size to a full int fixes the write operations outside of the
> member and allows to use the max_oper_chwidth setting on big endian
> systems.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux