summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGES85
-rw-r--r--apps/Makefile.ssl51
-rw-r--r--apps/apps.c39
-rw-r--r--apps/apps.h1
-rw-r--r--apps/ca.c56
-rw-r--r--apps/ciphers.c2
-rw-r--r--apps/dgst.c2
-rw-r--r--apps/enc.c16
-rw-r--r--apps/ocsp.c2
-rw-r--r--apps/openssl.c18
-rw-r--r--apps/pkcs12.c4
-rw-r--r--apps/pkcs8.c4
-rw-r--r--apps/req.c36
-rw-r--r--apps/s_cb.c4
-rw-r--r--apps/s_client.c10
-rw-r--r--apps/s_server.c6
-rw-r--r--apps/s_socket.c9
-rw-r--r--apps/s_time.c7
-rw-r--r--apps/speed.c2
-rw-r--r--apps/verify.c3
-rw-r--r--apps/winrand.c1
-rw-r--r--apps/x509.c7
-rw-r--r--crypto/aes/aes_cbc.c30
-rw-r--r--crypto/asn1/Makefile.ssl43
-rw-r--r--crypto/asn1/a_bitstr.c4
-rw-r--r--crypto/asn1/a_bytes.c2
-rw-r--r--crypto/asn1/a_d2i_fp.c4
-rw-r--r--crypto/asn1/a_object.c4
-rw-r--r--crypto/asn1/a_strex.c14
-rw-r--r--crypto/asn1/asn1_par.c7
-rw-r--r--crypto/asn1/f_int.c3
-rw-r--r--crypto/asn1/t_crl.c7
-rw-r--r--crypto/asn1/t_pkey.c23
-rw-r--r--crypto/asn1/t_req.c18
-rw-r--r--crypto/asn1/t_x509.c9
-rw-r--r--crypto/asn1/t_x509a.c4
-rw-r--r--crypto/asn1/tasn_dec.c4
-rw-r--r--crypto/asn1/tasn_prn.c2
-rw-r--r--crypto/bf/bftest.c6
-rw-r--r--crypto/bio/b_print.c12
-rw-r--r--crypto/bio/b_sock.c4
-rw-r--r--crypto/bio/bf_buff.c2
-rw-r--r--crypto/bio/bio.h3
-rw-r--r--crypto/bio/bio_lib.c12
-rw-r--r--crypto/bio/bss_conn.c4
-rw-r--r--crypto/bio/bss_log.c2
-rw-r--r--crypto/bio/bss_mem.c8
-rw-r--r--crypto/buffer/buffer.c57
-rw-r--r--crypto/buffer/buffer.h8
-rw-r--r--crypto/conf/Makefile.ssl25
-rw-r--r--crypto/conf/conf_def.c2
-rw-r--r--crypto/cryptlib.c8
-rw-r--r--crypto/cryptlib.h10
-rw-r--r--crypto/crypto.h5
-rw-r--r--crypto/dsa/dsa_lib.c1
-rw-r--r--crypto/ec/Makefile.ssl1
-rw-r--r--crypto/ecdh/Makefile.ssl10
-rw-r--r--crypto/ecdsa/Makefile.ssl10
-rw-r--r--crypto/evp/bio_b64.c1
-rw-r--r--crypto/evp/digest.c2
-rw-r--r--crypto/evp/e_rc2.c1
-rw-r--r--crypto/evp/e_rc4.c5
-rw-r--r--crypto/evp/encode.c2
-rw-r--r--crypto/evp/evp_enc.c14
-rw-r--r--crypto/evp/evp_key.c2
-rw-r--r--crypto/evp/evp_lib.c2
-rw-r--r--crypto/evp/evp_pbe.c2
-rw-r--r--crypto/evp/p5_crpt.c2
-rw-r--r--crypto/evp/p5_crpt2.c1
-rw-r--r--crypto/hmac/Makefile.ssl34
-rw-r--r--crypto/hmac/hmac.c3
-rw-r--r--crypto/lhash/lh_stats.c86
-rw-r--r--crypto/md2/md2_dgst.c6
-rw-r--r--crypto/md4/md4.c2
-rw-r--r--crypto/mem.c25
-rw-r--r--crypto/mem_dbg.c6
-rw-r--r--crypto/objects/obj_dat.c7
-rw-r--r--crypto/ocsp/ocsp_ht.c2
-rw-r--r--crypto/pem/pem.h8
-rw-r--r--crypto/pem/pem_info.c1
-rw-r--r--crypto/pem/pem_lib.c8
-rw-r--r--crypto/pkcs7/pk7_doit.c2
-rw-r--r--crypto/rand/rand_egd.c2
-rw-r--r--crypto/rand/randfile.c5
-rw-r--r--crypto/txt_db/txt_db.c4
-rw-r--r--crypto/ui/Makefile.ssl14
-rw-r--r--crypto/ui/ui_lib.c5
-rw-r--r--crypto/x509/x509.h2
-rw-r--r--crypto/x509/x509_cmp.c9
-rw-r--r--crypto/x509v3/v3_info.c2
-rw-r--r--demos/b64.c2
-rw-r--r--demos/spkigen.c3
-rw-r--r--ssl/Makefile.ssl164
-rw-r--r--ssl/kssl.c20
-rw-r--r--ssl/kssl.h3
-rw-r--r--ssl/s23_clnt.c2
-rw-r--r--ssl/s23_srvr.c2
-rw-r--r--ssl/s2_clnt.c4
-rw-r--r--ssl/s2_enc.c3
-rw-r--r--ssl/s2_lib.c7
-rw-r--r--ssl/s2_pkt.c2
-rw-r--r--ssl/s2_srvr.c4
-rw-r--r--ssl/s3_both.c8
-rw-r--r--ssl/s3_clnt.c21
-rw-r--r--ssl/s3_enc.c2
-rw-r--r--ssl/s3_srvr.c6
-rw-r--r--ssl/ssl.h1
-rw-r--r--ssl/ssl_asn1.c11
-rw-r--r--ssl/ssl_err.c1
-rw-r--r--ssl/ssl_lib.c8
-rw-r--r--ssl/ssl_sess.c6
-rw-r--r--ssl/ssl_task.c2
-rw-r--r--ssl/ssltest.c13
-rw-r--r--ssl/t1_enc.c8
-rw-r--r--test/Makefile.ssl10
115 files changed, 805 insertions, 508 deletions
diff --git a/CHANGES b/CHANGES
index 43565ec0e3..4f64e6deb5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -315,6 +315,91 @@ TODO: bug: pad x with leading zeros if necessary
Changes between 0.9.6h and 0.9.7 [XX xxx 2002]
+ *) Introduce safe string copy and catenation functions
+ (BUF_strlcpy() and BUF_strlcat()).
+ [Ben Laurie (CHATS) and Richard Levitte]
+
+ *) Avoid using fixed-size buffers for one-line DNs.
+ [Ben Laurie (CHATS)]
+
+ *) Add BUF_MEM_grow_clean() to avoid information leakage when
+ resizing buffers containing secrets, and use where appropriate.
+ [Ben Laurie (CHATS)]
+
+ *) Avoid using fixed size buffers for configuration file location.
+ [Ben Laurie (CHATS)]
+
+ *) Avoid filename truncation for various CA files.
+ [Ben Laurie (CHATS)]
+
+ *) Use sizeof in preference to magic numbers.
+ [Ben Laurie (CHATS)]
+
+ *) Avoid filename truncation in cert requests.
+ [Ben Laurie (CHATS)]
+
+ *) New OPENSSL_assert() macro (similar to assert(), but enabled
+ unconditionally).
+ [Ben Laurie (CHATS)]
+
+ *) Add assertions to check for (supposedly impossible) buffer
+ overflows.
+ [Ben Laurie (CHATS)]
+
+ *) Don't cache truncated DNS entries in the local cache (this could
+ potentially lead to a spoofing attack).
+ [Ben Laurie (CHATS)]
+
+ *) Fix various buffers to be large enough for hex/decimal
+ representations in a platform independent manner.
+ [Ben Laurie (CHATS)]
+
+ *) Add CRYPTO_realloc_clean() to avoid information leakage when
+ resizing buffers containing secrets, and use where appropriate.
+ [Ben Laurie (CHATS)]
+
+ *) Add BIO_indent() to avoid much slightly worrying code to do
+ indents.
+ [Ben Laurie (CHATS)]
+
+ *) Convert sprintf()/BIO_puts() to BIO_printf().
+ [Ben Laurie (CHATS)]
+
+ *) buffer_gets() could terminate with the buffer only half
+ full. Fixed.
+ [Ben Laurie (CHATS)]
+
+ *) Add assertions to prevent user-supplied crypto functions from
+ overflowing internal buffers by having large block sizes, etc.
+ [Ben Laurie (CHATS)]
+
+ *) Eliminate unused copy of key in RC4.
+ [Ben Laurie (CHATS)]
+
+ *) Eliminate unused and incorrectly sized buffers for IV in pem.h.
+ [Ben Laurie (CHATS)]
+
+ *) Fix off-by-one error in EGD path.
+ [Ben Laurie (CHATS)]
+
+ *) If RANDFILE path is too long, ignore instead of truncating.
+ [Ben Laurie (CHATS)]
+
+ *) Eliminate unused and incorrectly sized X.509 structure
+ CBCParameter.
+ [Ben Laurie (CHATS)]
+
+ *) Eliminate unused and dangerous function knumber().
+ [Ben Laurie (CHATS)]
+
+ *) Eliminate unused and dangerous structure, KSSL_ERR.
+ [Ben Laurie (CHATS)]
+
+ *) Protect against overlong session ID context length in an encoded
+ session object. Since these are local, this does not appear to be
+ exploitable.
+ [Ben Laurie (CHATS)]
+
*) Change from security patch (see 0.9.6e below) that did not affect
the 0.9.6 release series:
diff --git a/apps/Makefile.ssl b/apps/Makefile.ssl
index 01346531e3..f1a4ad0fde 100644
--- a/apps/Makefile.ssl
+++ b/apps/Makefile.ssl
@@ -852,31 +852,32 @@ rand.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
rand.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
rand.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
rand.o: ../include/openssl/x509_vfy.h apps.h rand.c
-req.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
-req.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
-req.o: ../include/openssl/bn.h ../include/openssl/buffer.h
-req.o: ../include/openssl/cast.h ../include/openssl/conf.h
-req.o: ../include/openssl/crypto.h ../include/openssl/des.h
-req.o: ../include/openssl/des_old.h ../include/openssl/dh.h
-req.o: ../include/openssl/dsa.h ../include/openssl/e_os2.h
-req.o: ../include/openssl/ec.h ../include/openssl/ecdh.h
-req.o: ../include/openssl/ecdsa.h ../include/openssl/engine.h
-req.o: ../include/openssl/err.h ../include/openssl/evp.h
-req.o: ../include/openssl/idea.h ../include/openssl/lhash.h
-req.o: ../include/openssl/md2.h ../include/openssl/md4.h
-req.o: ../include/openssl/md5.h ../include/openssl/mdc2.h
-req.o: ../include/openssl/obj_mac.h ../include/openssl/objects.h
-req.o: ../include/openssl/opensslconf.h ../include/openssl/opensslv.h
-req.o: ../include/openssl/ossl_typ.h ../include/openssl/pem.h
-req.o: ../include/openssl/pem2.h ../include/openssl/pkcs7.h
-req.o: ../include/openssl/rand.h ../include/openssl/rc2.h
-req.o: ../include/openssl/rc4.h ../include/openssl/rc5.h
-req.o: ../include/openssl/ripemd.h ../include/openssl/rsa.h
-req.o: ../include/openssl/safestack.h ../include/openssl/sha.h
-req.o: ../include/openssl/stack.h ../include/openssl/symhacks.h
-req.o: ../include/openssl/txt_db.h ../include/openssl/ui.h
-req.o: ../include/openssl/ui_compat.h ../include/openssl/x509.h
-req.o: ../include/openssl/x509_vfy.h ../include/openssl/x509v3.h apps.h req.c
+req.o: ../crypto/cryptlib.h ../e_os.h ../include/openssl/aes.h
+req.o: ../include/openssl/asn1.h ../include/openssl/bio.h
+req.o: ../include/openssl/blowfish.h ../include/openssl/bn.h
+req.o: ../include/openssl/buffer.h ../include/openssl/cast.h
+req.o: ../include/openssl/conf.h ../include/openssl/crypto.h
+req.o: ../include/openssl/des.h ../include/openssl/des_old.h
+req.o: ../include/openssl/dh.h ../include/openssl/dsa.h
+req.o: ../include/openssl/e_os2.h ../include/openssl/ec.h
+req.o: ../include/openssl/ecdh.h ../include/openssl/ecdsa.h
+req.o: ../include/openssl/engine.h ../include/openssl/err.h
+req.o: ../include/openssl/evp.h ../include/openssl/idea.h
+req.o: ../include/openssl/lhash.h ../include/openssl/md2.h
+req.o: ../include/openssl/md4.h ../include/openssl/md5.h
+req.o: ../include/openssl/mdc2.h ../include/openssl/obj_mac.h
+req.o: ../include/openssl/objects.h ../include/openssl/opensslconf.h
+req.o: ../include/openssl/opensslv.h ../include/openssl/ossl_typ.h
+req.o: ../include/openssl/pem.h ../include/openssl/pem2.h
+req.o: ../include/openssl/pkcs7.h ../include/openssl/rand.h
+req.o: ../include/openssl/rc2.h ../include/openssl/rc4.h
+req.o: ../include/openssl/rc5.h ../include/openssl/ripemd.h
+req.o: ../include/openssl/rsa.h ../include/openssl/safestack.h
+req.o: ../include/openssl/sha.h ../include/openssl/stack.h
+req.o: ../include/openssl/symhacks.h ../include/openssl/txt_db.h
+req.o: ../include/openssl/ui.h ../include/openssl/ui_compat.h
+req.o: ../include/openssl/x509.h ../include/openssl/x509_vfy.h
+req.o: ../include/openssl/x509v3.h apps.h req.c
rsa.o: ../e_os.h ../include/openssl/aes.h ../include/openssl/asn1.h
rsa.o: ../include/openssl/bio.h ../include/openssl/blowfish.h
rsa.o: ../include/openssl/bn.h ../include/openssl/buffer.h
diff --git a/apps/apps.c b/apps/apps.c
index be7a80acb8..305227d7ab 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -337,8 +337,7 @@ void program_name(char *in, char *out, int size)
p++;
else
p=in;
- strncpy(out,p,size-1);
- out[size-1]='\0';
+ BUF_strlcpy(out,p,size);
}
#endif
#endif
@@ -447,16 +446,20 @@ int app_init(long mesgwin)
int dump_cert_text (BIO *out, X509 *x)
{
- char buf[256];
- X5