Re: [PATCH] ext_password_file: do not use wpa_config_get_line

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

 



On Wed, Sep 18, 2024 at 03:58:25PM +0200, rnhmjoj wrote:
> The file-based backed of the ext_password framework uses
> `wpa_config_get_line` to read the passwords line-by-line from a file.
> This function is meant to parse a single line from the
> wpa_supplicant.conf file, so it handles whitespace, quotes and other
> characters specially.
> 
> Its behavior, however, it's not compatible with the rest of the
> ext_password framework implementation. For example, if a passphrase
> contains a `#` character it must be quoted to prevent parsing the
> remaining characters as an inline comment, but the code handling the
> external password in `wpa_supplicant_get_psk` does not handle quotes.
> The result is that either it will hash the enclosing quotes, producing a
> wrong PSK, or if the passphrase is long enough, fail the length check.
> As a consequence, some passphrases are impossible to input correctly.
> 
> To solve this and other issues, this patch changes the behaviour of the
> `ext_password_file_get` function (which was not documented in details,
> at least w.r.t. special characters) to simply treat all characters
> literally: including trailing whitespaces (except CR and LF), `#` for
> inline comments, etc. Empty lines and full-line comments are still
> supported.

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