1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-03-13 21:29:16 +01:00

Fix buffer overflow in write_chalresp_state()

Buffer was defined as CR_SALT_SIZE = 32 but number of random bytes
was CR_CHALLENGE_SIZE = 63.
This commit is contained in:
Björn Wiedenmann 2018-08-15 19:51:01 +02:00 committed by Björn Wiedenmann
parent 05f74ea8e5
commit bef666a899

2
util.c
View File

@ -524,7 +524,7 @@ write_chalresp_state(FILE *f, CR_STATE *state)
iterations = state->iterations;
}
if (generate_random(salt, CR_CHALLENGE_SIZE)) {
if (generate_random(salt, CR_SALT_SIZE)) {
goto out;
}