David Goulet [Thu, 2 Oct 2025 17:43:34 +0000 (13:43 -0400)]
ci: Pin TPA runners for now
For unknown reasons, the non TPA runners lead to this failure:
slow/process/callbacks:
FAIL ../../src/test/test_process_slow.c:157: assert(timer_tick_count OP_LT 10): 10 vs 10
FAIL ../../src/test/test_process_slow.c:188: assert(ret OP_EQ 0): -1 vs 0
FAIL ../../src/test/test_process_slow.c:240: assert(smartlist_len(process_data->stdout_data) OP_EQ 12): 0 vs 12
[callbacks FAILED]
slow/process/nonexistent_executable: Sep 30 13:29:58.340 [err] tor_assertion_failed_(): Bug: ../../src/core/mainloop/mainloop.c:750: shutdown_did_not_work_callback: Assertion line should be unreached failed; aborting. (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: Tor 0.4.8.18-dev: Assertion line should be unreached failed in shutdown_did_not_work_callback at ../../src/core/mainloop/mainloop.c:750: . Stack trace: (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(log_backtrace_impl+0x57) [0x5648f4b4fef7] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(tor_assertion_failed_+0x147) [0x5648f4b5d837] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x1b3676) [0x5648f4b0b676] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(+0x21482) [0x7f75a879c482] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: /lib/x86_64-linux-gnu/libevent-2.1.so.7(event_base_loop+0x49f) [0x7f75a879cc1f] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x1b4024) [0x5648f4b0c024] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(run_main_loop_until_done+0x35) [0x5648f4b0fa45] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x81d3d) [0x5648f49d9d3d] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x82237) [0x5648f49da237] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(+0x9aeb4) [0x5648f49f2eb4] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(testcase_run_one+0x72) [0x5648f49f2f82] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(tinytest_main+0x104) [0x5648f49f3814] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(main+0x493) [0x5648f49d32c3] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7f75a803724a] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x85) [0x7f75a8037305] (on Tor 0.4.8.18-dev )
Sep 30 13:29:58.341 [err] Bug: ./src/test/test-slow(_start+0x21) [0x5648f49d33e1] (on Tor 0.4.8.18-dev )
It is unclear why this is being triggered only on 0.4.8 and non TPA runners
(not happening on main) thus for now pin the runners until we either figure
this one out or deprecate 0.4.8
Signed-off-by: David Goulet <dgoulet@torproject.org>
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>
Waldemar Zimpel [Mon, 9 Jun 2025 12:07:33 +0000 (14:07 +0200)]
Logging / Channel padding delay
Reduce the amount of messages being logged related to
channel padding delay when log level is "notice".
Log the channel padding delay as "info" as soon as the
delay occurs. Log "notice" on each heartbeat only
containing the average channel padding delay and the
amount of delays (that exceeded the allowed time window)
occurring between heartbeats or, if first heartbeat
since startup, between startup and heartbeat.
Nick Mathewson [Mon, 19 May 2025 01:11:00 +0000 (21:11 -0400)]
Fix a new GCC warning about strings.
When we say something like
```
const char foo[3] = "foo";
```
GCC now complains, because there is no space for the terminating NUL.
But we use this construction in a lot of places in our tests to
initialize test digests, keys, and so on. So to resolve the issue,
we have to mark these strings with a new attribute.
orbea [Thu, 31 Aug 2023 21:35:52 +0000 (14:35 -0700)]
crypt_openssl_mgt: define DISABLE_ENGINES after OPENSSL_NO_ENGINE
With LibreSSL-3.8.1 these engines are no long available causing a build
failure, but LibreSSL correctly defines OPENSSL_NO_ENGINE as part of its
opensslfeatures.h. However Tor includes crypto_openssl_mgt.h before any
of the openssl includes which would define OPENSSL_NO_ENGINE and then
fails to define DISABLE_ENGINES.
As the define is used in only a single .c file it is best to move it
there.
David Goulet [Thu, 27 Mar 2025 12:49:40 +0000 (08:49 -0400)]
conflux: Avoid non fatal assert in CIRCUIT_IS_CONFLUX()
In the circuit_about_to_free(), we clear the circ->conflux object and then we
end up trying to emit an event on the control port which calls
CIRCUIT_IS_CONFLUX() and non fatal assert on the false branch.
Fixes #41037
Signed-off-by: David Goulet <dgoulet@torproject.org>
Jim Newsome [Wed, 30 Oct 2024 15:34:58 +0000 (10:34 -0500)]
CI: use a fixed version of chutney
While chutney currently runs tor's chutney test in its own CI,
it's difficult to guarantee the two won't accidentally diverge.
Probably best to use a fixed version here so that we can control
chutney version bumps and avoid surprise breakage in tor's CI.
This will also free us to intentionally make breaking changes in
chutney (though I don't have any immediate plans for any).