Two defects handling the psk array returned by an auth handler: strlen() ran before the string was validated (strlen(NULL) on a non-string entry), and the hex-PMK branch tested the array length instead of the entry length. A 64-character passphrase therefore reached the passphrase branch and its memcpy of str_len + 1 overflowed passphrase[MAX_PASSPHRASE_LEN + 1] by one byte. Validate the type first and branch on the string length. Signed-off-by: Felix Fietkau <nbd@nbd.name> |
||
|---|---|---|
| .. | ||
| config | ||
| ipv6 | ||
| services | ||
| utils | ||