diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-02-07 08:41:35 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-02-07 08:41:35 -0500 |
commit | db61ae2c84648db75c949f36d7dc2ee95fe7255b (patch) | |
tree | ce4131f281a35640fe7e1871f245e1520bb47095 | |
parent | 50911ddb37de55bfa6ff9a7452b4619f417b060a (diff) | |
parent | 8936c50d83f3a90fb6bb3314b86f56f46d42d749 (diff) | |
download | tor-db61ae2c84648db75c949f36d7dc2ee95fe7255b.tar.gz tor-db61ae2c84648db75c949f36d7dc2ee95fe7255b.zip |
Merge branch 'maint-0.2.6' into release-0.2.6
-rw-r--r-- | changes/bug17404 | 6 | ||||
-rw-r--r-- | src/common/tortls.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/changes/bug17404 b/changes/bug17404 new file mode 100644 index 0000000000..d524f6662d --- /dev/null +++ b/changes/bug17404 @@ -0,0 +1,6 @@ + o Major bugfixes (security, correctness): + - Fix a programming error that could cause us to read 4 bytes before + the beginning of an openssl string. This could be used to provoke + a crash on systems with an unusual malloc implementation, or + systems with unsual hardening installed. Fixes bug 17404; bugfix + on 0.2.3.6-alpha. diff --git a/src/common/tortls.c b/src/common/tortls.c index 97a82bf6e1..379f7347db 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -2739,6 +2739,10 @@ dn_indicates_v3_cert(X509_NAME *name) len = ASN1_STRING_to_UTF8(&s, str); if (len < 0) return 0; + if (len < 4) { + OPENSSL_free(s); + return 1; + } r = fast_memneq(s + len - 4, ".net", 4); OPENSSL_free(s); return r; |