openssl/crypto
Matt Caswell 73f0df8331 Add some sanity checks around usage of t_fromb64()
The internal SRP function t_fromb64() converts from base64 to binary. It
does not validate that the size of the destination is sufficiently large -
that is up to the callers. In some places there was such a check, but not
in others.

Add an argument to t_fromb64() to provide the size of the destination
buffer and validate that we don't write too much data. Also add some sanity
checks to the callers where appropriate.

With thanks to Shi Lei for reporting this issue.

Reviewed-by: Richard Levitte <levitte@openssl.org>
2016-09-14 10:06:41 +01:00
..
aes MIPS assembly pack: adapt it for MIPS[32|64]R6. 2016-09-02 13:33:17 +02:00
asn1 Constify a bit X509_NAME_get_entry 2016-08-23 11:47:22 +02:00
async Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
bf Remove/rename some old files. 2016-06-01 11:29:57 -04:00
bio If errno is ENXIO in BSS_new_file(), set BIO_R_NO_SUCH_FILE 2016-09-08 23:39:26 +02:00
blake2 Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
bn bn/bn_lcl.h: improve interoperability with clang and Android NDK. 2016-09-13 13:34:12 +02:00
buffer Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
camellia Missed some copyright merge 2016-06-13 16:05:25 -04:00
cast Remove/rename some old files. 2016-06-01 11:29:57 -04:00
chacha chacha/asm/chacha-ppc.pl: add missing .text directive. 2016-09-08 09:05:59 +02:00
cmac Copyright consolidation 06/10 2016-05-17 14:51:04 -04:00
cms Fix enable-zlib 2016-08-22 09:43:13 +01:00
comp Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
conf Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
ct SCT_set_source resets validation_status 2016-08-23 20:31:03 +01:00
des SPARC assembly pack: enforce V8+ ABI constraints. 2016-07-01 14:25:08 +02:00
dh Constify private key decode. 2016-08-17 12:01:29 +01:00
dsa Constify private key decode. 2016-08-17 12:01:29 +01:00
dso VMS: be less picky when loading DSOs 2016-09-11 23:18:03 +02:00
ec Fix EC_KEY_print so it prints out private key information 2016-09-10 06:53:33 +10:00
engine Fix mem leaks during auto-deinit 2016-09-08 12:40:19 +01:00
err Fix mem leaks during auto-deinit 2016-09-08 12:40:19 +01:00
evp GH1537: Avoid double-free in the EVP_PKEY API 2016-09-07 09:41:20 -04:00
hmac Teach EVP_PKEY_HMAC keys how to EVP_PKEY_cmp() 2016-06-24 12:31:31 -04:00
idea Remove/rename some old files. 2016-06-01 11:29:57 -04:00
include/internal Avoid duplicated code. 2016-08-19 16:52:58 +01:00
kdf Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
lhash fix code formatting 2016-07-01 10:56:19 -04:00
md2 Convert memset calls to OPENSSL_cleanse 2016-06-30 15:51:57 +01:00
md4 Remove/rename some old files. 2016-06-01 11:29:57 -04:00
md5 Remove/rename some old files. 2016-06-01 11:29:57 -04:00
mdc2 Avoid overflow in MDC2_Update() 2016-08-24 14:12:51 +01:00
modes modes/asm/ghash-armv4.pl: improve interoperability with Android NDK. 2016-09-03 10:41:52 +02:00
objects Sanity check an ASN1_object_size result 2016-08-23 00:19:15 +01:00
ocsp Fix an uninitialised read on an error path 2016-08-25 10:11:35 +01:00
pem Limit reads in do_b2i_bio() 2016-08-16 00:27:10 +01:00
perlasm perlasm/ppc-xlate.pl: recognize .type directive. 2016-08-29 23:12:28 +02:00
pkcs7 Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
pkcs12 Don't switch password formats using global state. 2016-08-25 11:42:33 +01:00
poly1305 MIPS assembly pack: adapt it for MIPS[32|64]R6. 2016-09-02 13:33:17 +02:00
rand Fix mem leaks during auto-deinit 2016-09-08 12:40:19 +01:00
rc2 Remove/rename some old files. 2016-06-01 11:29:57 -04:00
rc4 spelling fixes, just comments and readme. 2016-08-05 19:07:30 -04:00
rc5 Remove/rename some old files. 2016-06-01 11:29:57 -04:00
ripemd Copyright consolidation 08/10 2016-05-17 14:51:34 -04:00
rsa RT2676: Reject RSA eponent if even or 1 2016-08-22 11:25:12 -04:00
seed Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
sha MIPS assembly pack: adapt it for MIPS[32|64]R6. 2016-09-02 13:33:17 +02:00
srp Add some sanity checks around usage of t_fromb64() 2016-09-14 10:06:41 +01:00
stack Add some const casts 2016-08-10 09:53:58 -04:00
ts Convert TS_STATUS_INFO* functions to use const getters 2016-08-16 23:36:27 +01:00
txt_db Rename lh_xxx,sk_xxx tp OPENSSL_{LH,SK}_xxx 2016-05-20 10:48:29 -04:00
ui Code cleanup UI 2016-08-31 09:34:16 -04:00
whrlpool Convert memset calls to OPENSSL_cleanse 2016-06-30 15:51:57 +01:00
x509 Un-delete still documented X509_STORE_CTX_set_verify 2016-08-24 20:30:45 +01:00
x509v3 Constify some X509_NAME, ASN1 printing code 2016-08-23 11:47:22 +02:00
alphacpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
arm64cpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
arm_arch.h Copyright consolidation 07/10 2016-05-17 14:51:26 -04:00
armcap.c Copyright consolidation 07/10 2016-05-17 14:51:26 -04:00
armv4cpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
build.info Move OS-specific fopen quirks to o_fopen.c. 2016-06-22 21:51:53 +02:00
c64xpluscpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
cpt_err.c Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
cryptlib.c crypto/cryptlib.c: omit OPENSSL_ia32cap_loc(). 2016-06-22 20:20:37 +02:00
cversion.c Copyright consolidation 08/10 2016-05-17 14:51:34 -04:00
dllmain.c Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
ebcdic.c Copyright consolidation 05/10 2016-05-17 15:38:09 -04:00
ex_data.c Fix mem leaks during auto-deinit 2016-09-08 12:40:19 +01:00
ia64cpuid.S Add final(?) set of copyrights. 2016-06-01 11:27:25 -04:00
init.c Don't try to init dasync internally 2016-08-17 21:34:42 +02:00
LPdir_nyi.c Remove the silly CVS markers from LPdir_*.c 2016-07-16 07:58:23 +02:00
LPdir_unix.c Remove the silly CVS markers from LPdir_*.c 2016-07-16 07:58:23 +02:00
LPdir_vms.c Copyright consolidation 05/10 2016-05-17 15:38:09 -04:00
LPdir_win32.c Remove the silly CVS markers from LPdir_*.c 2016-07-16 07:58:23 +02:00
LPdir_win.c Fix mingw build 2016-07-18 10:47:07 +01:00
LPdir_wince.c Remove the silly CVS markers from LPdir_*.c 2016-07-16 07:58:23 +02:00
mem_clr.c Fix some style issues... 2016-08-02 09:59:23 +02:00
mem_dbg.c fix crypto-mdebug build 2016-07-20 12:41:31 +01:00
mem_sec.c Copyright consolidation 06/10 2016-05-17 14:51:04 -04:00
mem.c Convert memset calls to OPENSSL_cleanse 2016-06-30 15:51:57 +01:00
mips_arch.h MIPS assembly pack: adapt it for MIPS[32|64]R6. 2016-09-02 13:33:17 +02:00
o_dir.c Copyright consolidation 05/10 2016-05-17 15:38:09 -04:00
o_fips.c Copyright consolidation 04/10 2016-05-17 14:24:46 -04:00
o_fopen.c Fix a few if(, for(, while( inside code. 2016-07-20 07:21:53 -04:00
o_init.c Copyright consolidation 08/10 2016-05-17 14:51:34 -04:00
o_str.c buf2hexstr: properly deal with empty string 2016-06-21 20:55:54 +02:00
o_time.c VSI submisson: make better use of item lists in o_time.c 2016-08-04 16:51:39 +02:00
pariscid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
ppc_arch.h GH919: Fix wrappers for two headers 2016-05-24 11:04:38 -04:00
ppccap.c Add ecp_nistz256-ppc64 module. 2016-08-29 23:12:32 +02:00
ppccpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
s390xcap.c Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
s390xcpuid.S s390x assembly pack: improve portability. 2016-06-06 11:08:04 +02:00
sparc_arch.h Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
sparccpuid.S spelling fixes, just comments and readme. 2016-08-05 19:07:30 -04:00
sparcv9cap.c crypto/sparcv9cap.c: add missing declaration. 2016-08-12 10:26:20 +02:00
threads_none.c Copyright consolidation 04/10 2016-05-17 14:24:46 -04:00
threads_pthread.c CRYPTO_atomic_add(): check that the object is lock free 2016-08-24 14:37:48 +01:00
threads_win.c include/openssl: don't include <windows.h> in public headers. 2016-07-08 11:49:44 +02:00
uid.c Copyright consolidation 07/10 2016-05-17 14:51:26 -04:00
vms_rms.h Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
x86_64cpuid.pl crypto/x86[_64]cpuid.pl: add OPENSSL_ia32_rd[rand|seed]_bytes. 2016-07-15 13:20:52 +02:00
x86cpuid.pl crypto/x86[_64]cpuid.pl: add OPENSSL_ia32_rd[rand|seed]_bytes. 2016-07-15 13:20:52 +02:00