- 06 Jul, 2020 2 commits
-
-
We add constness to `peer_info_orig_len` and `cert_info_orig_len` in `tor_tls_cert_matches_key` to ensure that we don't accidentally alter the variables. This patch is part of the fix for TROVE-2020-001. See: https://bugs.torproject.org/33119
-
This patch fixes an out-of-bound memory read in `tor_tls_cert_matches_key()` when Tor is compiled to use Mozilla's NSS instead of OpenSSL. The NSS library stores some length fields in bits instead of bytes, but the comparison function found in `SECITEM_ItemsAreEqual()` needs the length to be encoded in bytes. This means that for a 140-byte, DER-encoded, SubjectPublicKeyInfo struct (with a 1024-bit RSA public key in it), we would ask `SECITEM_ItemsAreEqual()` to compare the first 1120 bytes instead of 140 (140bytes * 8bits = 1120bits). This patch fixes the issue by converting from bits to bytes before calling `SECITEM_ItemsAreEqual()` and convert the `len`-fields back to bits before we leave the function. This patch is part of the fix for TROVE-2020-001. See: https://bugs.torproject.org/33119
-
- 06 Apr, 2019 2 commits
-
-
In current NSS versions, these ciphersuites don't work with SSL_ExportKeyingMaterial(), which was causing relays to fail when they tried to negotiate the v3 link protocol authentication. Fixes bug 29241; bugfix on 0.4.0.1-alpha.
-
Diagnostic for 29241.
-
- 16 Jan, 2019 1 commit
-
-
Nick Mathewson authored
-
- 20 Sep, 2018 3 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
Fixes bug 27782; bugfix on 0.3.5.1-alpha
-
Nick Mathewson authored
Related to #27795 -- since NSS will close the socket, we must not count it as owned by Tor.
-
- 14 Sep, 2018 1 commit
-
-
Nick Mathewson authored
This is harder than with OpenSSL, since OpenSSL counts the bytes on its own and NSS doesn't. To fix this, we need to define a new PRFileDesc layer that has its own byte-counting support. Closes ticket 27289.
-
- 12 Sep, 2018 1 commit
-
-
Nick Mathewson authored
This function tells the underlying TLS object that it shouldn't close the fd on exit. Mostly, we hope not to have to use it, since the NSS implementation is kludgey, but it should allow us to fix
-
- 05 Sep, 2018 1 commit
-
-
Nick Mathewson authored
-
- 04 Sep, 2018 7 commits
-
-
Nick Mathewson authored
Fun fact: PR_Close leaks memory if its socket is not valid.
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
-
Nick Mathewson authored
The tls_log_errors() function now behaves differently for NSS than it did for OpenSSL, so we need to tweak it a bit.
-
Nick Mathewson authored
This function was supposed to implement a half-duplex mode for our TLS connections. However, nothing in Tor actually uses it (besides some unit tests), and the implementation looks really questionable to me. It's probably best to remove it. We can add a tested one later if we need one in the future.
-
Nick Mathewson authored
This is enough to get a chutney network to bootstrap, though a bunch of work remains.
-
- 22 Aug, 2018 1 commit
-
-
Nick Mathewson authored
7 unit tests are failing at this point, but they're all TLS-related.
-
- 21 Aug, 2018 3 commits
-
-
Nick Mathewson authored
-
Nick Mathewson authored
We used to link both libraries at once, but now that I'm working on TLS, there's nothing left to keep OpenSSL around for when NSS is enabled. Note that this patch causes a couple of places that still assumed OpenSSL to be disabled when NSS is enabled - tor-gencert - pbkdf2
-
Nick Mathewson authored
Also, add a stubbed-out nss version of the modules. The tests won't pass with NSS yet since the NSS modules don't do anything. This is a good patch to read with --color-moved.
-