]>
git.ipfire.org Git - thirdparty/tor.git/log
David Goulet [Tue, 5 Aug 2025 14:41:51 +0000 (10:41 -0400)]
Merge branch 'maint-0.4.8'
David Goulet [Mon, 4 Aug 2025 19:38:47 +0000 (19:38 +0000)]
Merge branch 'unix-processes/cloexec-pipes' into 'main'
Unix processes / IPC / Utilize pipes with "close-on-exec" flag set
See merge request tpo/core/tor!916
excurso [Mon, 4 Aug 2025 19:38:47 +0000 (19:38 +0000)]
Unix processes / IPC / Utilize pipes with "close-on-exec" flag set
Waldemar Zimpel [Tue, 8 Jul 2025 18:52:49 +0000 (20:52 +0200)]
Fix: "Bug: Duplicate call to circuit_mark_for_close()"
Second attempt
Closes issues #41106, #40951
David Goulet [Tue, 1 Jul 2025 12:19:45 +0000 (08:19 -0400)]
Merge branch 'maint-0.4.8'
David Goulet [Tue, 1 Jul 2025 12:19:36 +0000 (08:19 -0400)]
geoip: Fix Rust clippy warning
Signed-off-by: David Goulet <dgoulet@torproject.org>
David Goulet [Tue, 1 Jul 2025 12:17:21 +0000 (12:17 +0000)]
Merge branch 'changelogs' into 'main'
forward port changelogs 0.4.8.14 - 0.4.8.17
See merge request tpo/core/tor!914
David Goulet [Tue, 1 Jul 2025 12:16:00 +0000 (12:16 +0000)]
Merge branch 'tabs' into 'main'
clean up tabs/whitespace in automake files
See merge request tpo/core/tor!913
Roger Dingledine [Tue, 1 Jul 2025 06:13:10 +0000 (02:13 -0400)]
forward port changelogs 0.4.8.14 - 0.4.8.17
Roger Dingledine [Tue, 1 Jul 2025 05:59:45 +0000 (01:59 -0400)]
clean up tabs/whitespace in automake files
it used to be a clean set of tabs but it accumulated chaos
over the years
diff is best viewed with git diff -w
David Goulet [Mon, 30 Jun 2025 16:59:50 +0000 (12:59 -0400)]
Merge branch 'maint-0.4.8'
Tor CI Release [Mon, 30 Jun 2025 14:11:34 +0000 (14:11 +0000)]
version: Bump version to 0.4.8.17-dev
David Goulet [Mon, 30 Jun 2025 14:05:34 +0000 (10:05 -0400)]
Merge branch 'maint-0.4.8'
Tor CI Release [Mon, 30 Jun 2025 13:14:59 +0000 (13:14 +0000)]
version: Bump version to 0.4.8.17
David Goulet [Mon, 30 Jun 2025 13:55:54 +0000 (09:55 -0400)]
Merge branch 'maint-0.4.8'
Tor CI Release [Mon, 30 Jun 2025 13:14:10 +0000 (13:14 +0000)]
fallbackdir: Update list generated on June 30, 2025
Tor CI Release [Mon, 30 Jun 2025 13:13:13 +0000 (13:13 +0000)]
Update geoip files to match ipfire location db, 2025/06/30.
David Goulet [Thu, 26 Jun 2025 16:16:45 +0000 (12:16 -0400)]
Merge branch 'maint-0.4.8'
ValdikSS [Thu, 26 Jun 2025 14:24:28 +0000 (10:24 -0400)]
tls: Set TLSv1.3 ciphers to preserve ciphersuites order
This commit fixes two issues:
1. ciphers.inc has TLSv1.3 ciphers prefixed with "TXT", while current version
has "RFC". TLS1_3_RFC_AES_128_GCM_SHA256 should be instead of
TLS1_3_TXT_AES_128_GCM_SHA256, in both define and CIPHER() macro.
2. Tor calls only SSL_set_cipher_list() in tlstls_openssl.c, this sets only
TLSv1.2 ciphers, while TLSv1.3 ciphers stay in default state. TLSv1.3
ciphersuites are set with SSL_set_ciphersuites(), but the list require to
contain only TLSv1.3 suites (no v1.2).
Contrary to SSL_set_cipher_list(), TLSv1.3 SSL_set_ciphersuites() does NOT
accept finalizing :, so it should be stripped out.
Signed-off-by: David Goulet <dgoulet@torproject.org>
Alexander Hansen Færøy [Tue, 17 Jun 2025 15:19:10 +0000 (17:19 +0200)]
Merge branch 'unix-processes/code-cleanup/1' into 'main'
Unix processes / Remove dead code
See merge request tpo/core/tor!911
excurso [Tue, 17 Jun 2025 15:19:09 +0000 (15:19 +0000)]
Unix processes / Remove dead code
David Goulet [Thu, 12 Jun 2025 16:54:04 +0000 (12:54 -0400)]
Merge branch 'tor-gitlab/mr/905'
David Goulet [Thu, 12 Jun 2025 15:57:31 +0000 (11:57 -0400)]
Merge branch 'maint-0.4.8'
David Goulet [Thu, 12 Jun 2025 15:57:27 +0000 (11:57 -0400)]
Merge branch 'tor-gitlab/mr/910' into maint-0.4.8
David Goulet [Thu, 12 Jun 2025 15:56:21 +0000 (15:56 +0000)]
Merge branch 'of_development' into 'main'
channel.h: missed channel state transition comment added
See merge request tpo/core/tor!888
zero_gear [Thu, 12 Jun 2025 15:56:21 +0000 (17:56 +0200)]
channel.h: missed channel state transition comment added
David Goulet [Thu, 12 Jun 2025 15:54:42 +0000 (11:54 -0400)]
Merge branch 'tor-gitlab/mr/901'
David Goulet [Thu, 12 Jun 2025 15:53:05 +0000 (11:53 -0400)]
Merge branch 'tor-gitlab/mr/891'
David Goulet [Wed, 11 Jun 2025 13:00:48 +0000 (13:00 +0000)]
Merge branch 'hsdir-interval' into 'main'
hs-common: Reduce HS_TIMER_PERIOD_LENGTH_MIN from 30 to 5
See merge request tpo/core/tor!909
Waldemar Zimpel [Sun, 8 Jun 2025 12:20:48 +0000 (14:20 +0200)]
Unix processes / Obtain exit status code
The actual way for obtaining the exit code
of an exited child process
Nick Mathewson [Tue, 10 Jun 2025 16:34:34 +0000 (12:34 -0400)]
Changes file for CGO (ticket 41047, prop359).
Nick Mathewson [Tue, 10 Jun 2025 16:29:40 +0000 (12:29 -0400)]
Remove circuit_sendme_cell_is_next
We needed this function previously, when we only computed a SENDME
tag conditionally, depending on whether we were about to need it.
But as part of the CGO refactoring, we now compute and store SENDME
tags unconditionally, whenever a cell is originated or recognized.
Therefore this function is no longer needed anywhere.
Nick Mathewson [Tue, 10 Jun 2025 16:24:54 +0000 (12:24 -0400)]
Enforce that SENDME tags have the expected length
The length is no longer a constant 20, but now depends on the
relay crypto algorithm in use.
Nick Mathewson [Tue, 10 Jun 2025 14:32:20 +0000 (10:32 -0400)]
Remove XXXs about Making CGO disable-able
Nick Mathewson [Thu, 5 Jun 2025 20:01:28 +0000 (16:01 -0400)]
Make SENDME tag lengths defined in a single place.
Nick Mathewson [Thu, 5 Jun 2025 19:54:56 +0000 (15:54 -0400)]
sendme: Use a simpler and more correct init for sendme tags.
Nick Mathewson [Wed, 4 Jun 2025 15:09:47 +0000 (11:09 -0400)]
Give relay_crypto.c access to cpath private members.
I'd considered moving all the relevant functions to crypt_path.c,
but after some experimentation it didn't seem to improve matters.
Nick Mathewson [Tue, 3 Jun 2025 12:31:02 +0000 (08:31 -0400)]
Set the key material length correctly based on crypto algorithm.
With this change, it appears that we can successfully negotiate
CGO.
Nick Mathewson [Mon, 2 Jun 2025 21:11:54 +0000 (17:11 -0400)]
Add some warnings for client create failures
Nick Mathewson [Mon, 2 Jun 2025 21:05:08 +0000 (17:05 -0400)]
Make extend_info_supports_ntor_v3 correct.
Previously it returned true if the extend_info was for an exit where we
intended to use congestion control, which is not exactly the same thing
as supporting ntor v3.
Nick Mathewson [Mon, 2 Jun 2025 20:44:27 +0000 (16:44 -0400)]
Relays: Advertise support for cgo.
Nick Mathewson [Mon, 2 Jun 2025 20:37:02 +0000 (16:37 -0400)]
Enable CGO at the client side when a relay supports it
Nick Mathewson [Mon, 2 Jun 2025 19:59:01 +0000 (15:59 -0400)]
client-side support for negotiating CGO via subprotocol request
This has been a bit tricky, since the old code assumed that
we never wanted to use extensions besides CC.
Nick Mathewson [Mon, 2 Jun 2025 19:54:03 +0000 (15:54 -0400)]
Accept subproto_request extensions for CGO.
Nick Mathewson [Mon, 2 Jun 2025 16:05:25 +0000 (12:05 -0400)]
Move responsibility for extension parsing to onion_crypto.c
Nick Mathewson [Mon, 2 Jun 2025 15:54:10 +0000 (11:54 -0400)]
Move responsibility for ntorv3 extension lookup to a function.
Nick Mathewson [Mon, 2 Jun 2025 15:11:05 +0000 (11:11 -0400)]
Add a negotiation message for subprotocol requests.
Nick Mathewson [Mon, 2 Jun 2025 14:36:18 +0000 (10:36 -0400)]
Use protovers to detect cgo support.
Nick Mathewson [Mon, 2 Jun 2025 14:32:46 +0000 (10:32 -0400)]
Remove incorrect note about supports_conflux flag
Nick Mathewson [Mon, 2 Jun 2025 14:22:50 +0000 (10:22 -0400)]
remove debug log with relay digest material
This will no longer always be a subset of the relay digest initial keys;
it's better just not to log this.
Nick Mathewson [Mon, 2 Jun 2025 14:21:05 +0000 (10:21 -0400)]
Move parameter initialization to the start of the client handshake
Since we're going to be determining cell format and relay crypto
algorithm when we send our negotiation message, we'll need to
initialize it here.
Nick Mathewson [Mon, 2 Jun 2025 14:13:39 +0000 (10:13 -0400)]
Remove rend_dh_handshake_state
It became useless when we removed v2 onion services.
Nick Mathewson [Mon, 2 Jun 2025 14:08:00 +0000 (10:08 -0400)]
Add cell format and crypto alg to circ_params
This allows them to be negotiated as part of the handshake.
Nick Mathewson [Wed, 28 May 2025 19:53:34 +0000 (15:53 -0400)]
relay_crypto: Implement support for CGO.
Nick Mathewson [Wed, 28 May 2025 19:14:51 +0000 (15:14 -0400)]
Turn relay_crypto_t into a tagged union.
Nick Mathewson [Wed, 28 May 2025 19:04:48 +0000 (15:04 -0400)]
Refactor relay_crypto_init API to take an algorithm.
Nick Mathewson [Wed, 28 May 2025 18:50:09 +0000 (14:50 -0400)]
Turn tor1_crypt_t into a distinct type.
Nick Mathewson [Wed, 28 May 2025 18:34:28 +0000 (14:34 -0400)]
Move relay_crypto_st.h to core/crypto.
Nick Mathewson [Wed, 28 May 2025 16:51:08 +0000 (12:51 -0400)]
Propagate longer keylens through onion handshakes.
Nick Mathewson [Wed, 28 May 2025 16:22:03 +0000 (12:22 -0400)]
relay crypto: functions to get key material length.
Nick Mathewson [Wed, 28 May 2025 16:02:39 +0000 (12:02 -0400)]
Allow SENDME tags to be 16 or 20 bytes.
Nick Mathewson [Wed, 28 May 2025 15:12:54 +0000 (11:12 -0400)]
Move tor1 crypto functions into new file
(I'd recommend reviewing this with "show -b --color-moved")
Nick Mathewson [Wed, 28 May 2025 14:02:38 +0000 (10:02 -0400)]
Refactor and simplify save_sendme logic in tor1.
Every time that we want a sendme_digest, we have already computed it
once, either to originate a cell or to recognize a cell. Rather
than figuring out when to compute the digest a second time, we
instead refactor our tor1 digest code to _always_ store such digests
in the relay_crypto_t.
This saves a bit of complexity, and shouldn't involve a performance
hit; rather, it has potential to speed things up by saving a sha1
call.
Nick Mathewson [Wed, 28 May 2025 12:52:57 +0000 (08:52 -0400)]
Refactor tor1 relay crypto functions into per-layer calls.
We'll need this for mixed circuits.
Also, the APIs here are a bit closer to the CGO APIs.
Nick Mathewson [Wed, 28 May 2025 12:27:58 +0000 (08:27 -0400)]
Rename two "record_*_digest functions to "save".
This makes an important distinction: "recording" a digest puts
it in the expected-sendme queue, whereas "saving" a digest makes
a temporary copy inside the relay_crypto_t.
Nick Mathewson [Wed, 28 May 2025 12:17:37 +0000 (08:17 -0400)]
Rename a couple of relay crypto functions to "tor1".
(I've designated the existing encryption algorithm "tor1".
Jim Newsome [Tue, 10 Jun 2025 22:17:53 +0000 (17:17 -0500)]
hs_common.h: delete duplicate definitions
Jim Newsome [Tue, 10 Jun 2025 22:13:41 +0000 (17:13 -0500)]
hs-common: Reduce HS_TIMER_PERIOD_LENGTH_MIN from 30 to 5
This matches the tor-spec change
<https://gitlab.torproject.org/tpo/core/torspec/-/merge_requests/406>
Progress on
<https://gitlab.torproject.org/tpo/core/chutney/-/issues/40038>
Alexander Hansen Færøy [Tue, 10 Jun 2025 12:35:21 +0000 (14:35 +0200)]
Merge branch 'tor_41091' into 'main'
cgo: Use the correct operation to re-align AES.
Closes #41091
See merge request tpo/core/tor!906
David Goulet [Mon, 9 Jun 2025 13:50:24 +0000 (09:50 -0400)]
Merge branch 'maint-0.4.8'
David Goulet [Mon, 9 Jun 2025 13:50:10 +0000 (09:50 -0400)]
Merge branch 'tor-gitlab/mr/903' into maint-0.4.8
David Goulet [Mon, 9 Jun 2025 13:36:26 +0000 (09:36 -0400)]
Merge branch 'maint-0.4.8'
Waldemar Zimpel [Sun, 1 Jun 2025 12:43:03 +0000 (14:43 +0200)]
Fix: "Bug: Duplicate call to circuit_mark_for_close()"
Closes issue #40951
Roger Dingledine [Mon, 9 Jun 2025 01:50:36 +0000 (21:50 -0400)]
log "list of supported TLS groups" only once
We had been logging it every two hours forever, even though it's based
on the version of OpenSSL we're using it so it will never change.
Fixes bug #41093.
The fix is an improvement on commit
ba88ad6b which addressed #41058.
Not adding a changes file since those commits haven't gone out in a
release yet either.
Nick Mathewson [Thu, 5 Jun 2025 20:12:24 +0000 (16:12 -0400)]
cgo: Use the correct operation to re-align AES.
By accident, this doesn't cause a bug, since 480 = 15*16*2.
Still, it's better to avoid problems in the future.
Closes #41091.
David Goulet [Tue, 3 Jun 2025 16:10:43 +0000 (16:10 +0000)]
Merge branch 'cloexec-pipes' into 'main'
start_daemon: open pipe with cloexec
Closes #41013 and #41088
See merge request tpo/core/tor!904
Jim Newsome [Mon, 2 Jun 2025 22:10:45 +0000 (17:10 -0500)]
start_daemon: open pipe with cloexec
Fixes #41013
Fixes #41088
Jim Newsome [Mon, 2 Jun 2025 22:09:20 +0000 (17:09 -0500)]
Add tor_pipe_cloexec
David Goulet [Tue, 27 May 2025 14:30:45 +0000 (14:30 +0000)]
Merge branch 'remove-tor_tls_get_num_server_handshakes' into 'main'
Remove tor_tls_get_num_server_handshakes declaration
See merge request tpo/core/tor!902
Alex Xu (Hello71) [Sun, 12 Jun 2022 20:29:06 +0000 (16:29 -0400)]
Remove tor_tls_get_num_server_handshakes declaration
This function has not been defined since
5205c7fd903c ("Initial NSS support for
TLS.").
Nick Mathewson [Thu, 22 May 2025 16:06:01 +0000 (12:06 -0400)]
test_crypto: rename a test
Based on a comment from Alex Xu.
Nick Mathewson [Thu, 22 May 2025 16:05:12 +0000 (12:05 -0400)]
polyval: clean up cpuid code
(Based on comments by Alex Xu)
Nick Mathewson [Thu, 22 May 2025 14:20:08 +0000 (10:20 -0400)]
Merge branch 'cgo-faster' into 'main'
Portability and speed improvements to cgo crypto
See merge request tpo/core/tor!900
Nick Mathewson [Thu, 22 May 2025 13:54:09 +0000 (09:54 -0400)]
Fix a bug with less optimized polyval variants.
Using "0" to mean "doesn't support multi-block processing"
ran us into trouble: (n > 0 * 16) is always true for n > 0,
so we were always running a loop with no termination condition.
Additionally, the >s in this block should have been >=s,
since we want to process multi-blocks as long as there are any.
This won't have a performance impact for our current input sizes,
but it's nice to be correct.
Nick Mathewson [Wed, 21 May 2025 17:19:58 +0000 (13:19 -0400)]
Merge branch 'openssl-cleanup' into 'main'
Clean up some legacy OpenSSL code
See merge request tpo/core/tor!895
Nick Mathewson [Wed, 21 May 2025 17:06:30 +0000 (13:06 -0400)]
Merge branch 'cgo-fixes-misc' into 'main'
Fix a few bugs from #41051 (CGO cell format)
Closes #41071 and #41070
See merge request tpo/core/tor!892
Nick Mathewson [Sun, 18 May 2025 14:34:43 +0000 (10:34 -0400)]
Remove AES support for old OpenSSLs
Nick Mathewson [Thu, 15 May 2025 16:21:49 +0000 (12:21 -0400)]
Optimize the everloving heck out of OpenSSL AES as used by CGO.
Optimizations:
1. Calling EVP_CryptInit with a cipher returned by
e.g. EVP_aes_128_ctr() is quite slow, since it needs to look
up the _actual_ EVP_CIPHER corresponding to the given EVP,
which involves grabbing locks, doing a search through a
provider, and so on. We use EVP_CIPHER_fetch to speed
that up a lot.
2. There is not in fact any need to EVP_CIPHER_CTX_Reset a
cipher before calling EVP_CryptInit on it a second time
2. Using an ECB cipher + CRYPTO_ctr128_encrypt was not in fact
the most efficient way to implement a counter mode with an
adjustable IV. Instead, the fastest way seems to be:
- Set the IV manually
- Ensure that we are always aligned to block boundary
when we do so.
Nick Mathewson [Thu, 15 May 2025 16:46:02 +0000 (12:46 -0400)]
polyval: use real pclmul intrinsics on clang.
Modern clangs don't appear to have a problem with it.
Nick Mathewson [Thu, 15 May 2025 14:59:01 +0000 (10:59 -0400)]
Use polyvalx in cgo.
Nick Mathewson [Thu, 15 May 2025 14:49:55 +0000 (10:49 -0400)]
Add support for pre-expanded polyval keys with pclmul.
We don't want to do this without pclmul, since it doesn't help in that case.
We don't want to do this unconditionally, since many of our polyval keys
are only used for 16 byte inputs.
(Yes, this makes a difference in practice!)
Nick Mathewson [Thu, 15 May 2025 14:00:21 +0000 (10:00 -0400)]
Speed up polyval through pipelining.
This optimization helps because:
- We're not blocking the computation of each block on the computation of the
previous one, which leads to fewer pipeline stalls.
- We're deferring reduction until the end of handling a bunch of blocks.
Nick Mathewson [Thu, 15 May 2025 13:14:42 +0000 (09:14 -0400)]
Add benchmarks for cgo and polyval.
Nick Mathewson [Thu, 15 May 2025 12:54:42 +0000 (08:54 -0400)]
Improve tor1 encryption benchmarks
Include cell origination (which costs more) and cycles per byte.
Rename benchmark to "tor1", since cgo is coming next.
Nick Mathewson [Sat, 26 Apr 2025 02:04:23 +0000 (22:04 -0400)]
polyval: Detect pclmul presence using cpuid.
Nick Mathewson [Sat, 26 Apr 2025 01:18:19 +0000 (21:18 -0400)]
polyval: Allow PV_DECLARE declare multiple variants.
Nick Mathewson [Sat, 26 Apr 2025 01:04:25 +0000 (21:04 -0400)]
polyval: move declarations into a macro
I'll be using this to implement CPUID-based dispatch, which will require
multiple backends to coexist.
Nick Mathewson [Wed, 21 May 2025 14:15:07 +0000 (10:15 -0400)]
Merge branch '41052_cgo_encryption' into 'main'
CGO: Crypto implementation
Closes #41052
See merge request tpo/core/tor!879
Nick Mathewson [Sat, 26 Apr 2025 00:44:06 +0000 (20:44 -0400)]
polyval: Remove precomputation for ctmul64 case.
In my benchmarks it saved less than 1%, so it really
doesn't make sense to keep it.
Nick Mathewson [Wed, 23 Apr 2025 15:27:07 +0000 (11:27 -0400)]
CGO: Fix authenticated-sendme tag handling.
See discussion at torspec#328: it's important that our
SENDME authentication tag always be taken based on the
_encrypted_ cell.