298d823bf8
PVK files with abnormally large length or salt fields can cause an
integer overflow which can result in an OOB read and heap corruption.
However this is an rarely used format and private key files do not
normally come from untrusted sources the security implications not
significant.
Fix by limiting PVK length field to 100K and salt to 10K: these should be
more than enough to cover any files encountered in practice.
Issue reported by Guido Vranken.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
|
||
---|---|---|
.. | ||
Makefile | ||
message | ||
pem.h | ||
pem2.h | ||
pem_all.c | ||
pem_err.c | ||
pem_info.c | ||
pem_lib.c | ||
pem_oth.c | ||
pem_pk8.c | ||
pem_pkey.c | ||
pem_seal.c | ||
pem_sign.c | ||
pem_x509.c | ||
pem_xaux.c | ||
pkcs7.lis | ||
pvkfmt.c |