]> git.ipfire.org Git - thirdparty/hostap.git/commit
PKCS#1: Do not use pointer value after freeing
authorJouni Malinen <j@w1.fi>
Sun, 17 Dec 2023 10:10:13 +0000 (12:10 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 17 Dec 2023 10:17:10 +0000 (12:17 +0200)
commit33b5fc076341148c5a0d8094af301336f9f5a980
tree06558633b8ee5d78c498a3c025a24cffcdc59f2e
parent231d86ef9150c2bc317394a5ed276b22d12661c4
PKCS#1: Do not use pointer value after freeing

The check for extra data was not dereferencing the pointer, but avoid
complaints about such uses by freeing the decrypted data only after the
check. The hexdump could have read freed memory, so that needs to be
before the freeing.

Fixes: 54ac6ff8c4a2 ("PKCS 1: Add function for checking v1.5 RSA signature")
Signed-off-by: Jouni Malinen <j@w1.fi>
src/tls/pkcs1.c