Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T15:06:14Zhttps://gitlab.torproject.org/legacy/trac/-/issues/21439Add a configure option to disable safety features that make fuzzing harder2020-06-13T15:06:14ZNick MathewsonAdd a configure option to disable safety features that make fuzzing harderWe've got quite a few places in our code where we use redundant safety features to prevent bugs from turning into really serious bugs. But many of those safety features interfere with fuzzing, by covering up any underlying bugs that fuz...We've got quite a few places in our code where we use redundant safety features to prevent bugs from turning into really serious bugs. But many of those safety features interfere with fuzzing, by covering up any underlying bugs that fuzzing would otherwise detect.
For example, I'm thinking of:
* The 4-byte sentinel word at the end of each buffer chunk
* Various places in our code where we NUL-terminate stuff that doesn't actually (we hope!) need to be NUL-terminated.
* The entire "memarea" fragmentation-resistant allocation strategy.
* Probably some other stuff too
But in addition to hardening our code a little, these features all make some classes of memory bug less likely to get noticed by the sanitizers.
Now, you might argue that there's no need to have a way to fuzz without those safety features, if they actually do provide safety. But on the other hand, they're meant to provide _redundant_ safety, and if they are ever actually needed, that's a bug in our code that we ought to fix.Tor: 0.3.1.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/21369Tor crashes with tor_assertion_failed_() [Assertion buf->datalen < INT_MAX fa...2020-06-13T15:05:54ZTracTor crashes with tor_assertion_failed_() [Assertion buf->datalen < INT_MAX failed in write_to_buf at ../src/or/buffers.c:832]One (of two) tor instance has crashed two times today:
```
Feb 1 13:15:58 arnor Tor-eriador[5110]: tor_assertion_failed_(): Bug: ../src/or/buffers.c:832: write_to_buf: Assertion buf->datalen < INT_MAX failed; aborting. (on Tor 0.2.9.9 ...One (of two) tor instance has crashed two times today:
```
Feb 1 13:15:58 arnor Tor-eriador[5110]: tor_assertion_failed_(): Bug: ../src/or/buffers.c:832: write_to_buf: Assertion buf->datalen < INT_MAX failed; aborting. (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: Assertion buf->datalen < INT_MAX failed in write_to_buf at ../src/or/buffers.c:832.
Stack trace: (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(log_backtrace+0x42) [0x556620673ba2] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(tor_assertion_failed_+0x8d) [0x55662068b71d] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(+0xadf7a) [0x5566205daf7a] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(connection_write_to_buf_impl_+0x294) [0x556620620294] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(+0x1081e6) [0x5566206351e6] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x7fc) [0x7f5a40489a0c] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(do_main_loop+0x27d) [0x55662057079d] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(tor_main+0x1c25) [0x556620574105] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(main+0x19) [0x55662056c1b9] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f5a3f5c4830] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor Tor-eriador[5110]: Bug: /usr/bin/tor(_start+0x29) [0x55662056c209] (on Tor 0.2.9.9 )
Feb 1 13:15:58 arnor systemd[1]: tor@eriador.service: Main process exited, code=killed, status=6/ABRT
```
And three hours later:
```
Feb 1 16:54:26 arnor Tor-eriador[24009]: tor_assertion_failed_(): Bug: ../src/or/buffers.c:832: write_to_buf: Assertion buf->datalen < INT_MAX failed; aborting. (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: Assertion buf->datalen < INT_MAX failed in write_to_buf at ../src/or/buffers.c:832. Stack trace: (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(log_backtrace+0x42) [0x55744384dba2] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(tor_assertion_failed_+0x8d) [0x55744386571d] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(+0xadf7a) [0x5574437b4f7a] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(connection_write_to_buf_impl_+0x294) [0x5574437fa294] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(+0x1081e6) [0x55744380f1e6] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5(event_base_loop+0x7fc) [0x7f164f746a0c] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(do_main_loop+0x27d) [0x55744374a79d] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(tor_main+0x1c25) [0x55744374e105] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(main+0x19) [0x5574437461b9] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f164e881830] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor Tor-eriador[24009]: Bug: /usr/bin/tor(_start+0x29) [0x557443746209] (on Tor 0.2.9.9 )
Feb 1 16:54:26 arnor systemd[1]: tor@eriador.service: Main process exited, code=killed, status=6/ABRT
```
The rest of the time everything was okay.
**Trac**:
**Username**: svengoTor: 0.3.0.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/21334prop224: Update prop224 HS desriptor generation code to produce the latest de...2020-06-13T15:07:14ZGeorge Kadianakisprop224: Update prop224 HS desriptor generation code to produce the latest descriptor formatThis is the older cousin of #20852. In this ticket we need to go over our prop224 HS descriptor generation code and make it produce descriptors that conform with the latest format (which includes the fake client authorization entries and...This is the older cousin of #20852. In this ticket we need to go over our prop224 HS descriptor generation code and make it produce descriptors that conform with the latest format (which includes the fake client authorization entries and such).Tor: 0.3.1.x-finalGeorge KadianakisGeorge Kadianakishttps://gitlab.torproject.org/legacy/trac/-/issues/21027tor_bug_occurred_(): Bug: src/or/entrynodes.c:816: entry_guard_add_to_sample_...2020-06-13T15:04:41ZGeorge Kadianakistor_bug_occurred_(): Bug: src/or/entrynodes.c:816: entry_guard_add_to_sample_impl: Non-fatal assertion !(have_sampled_guard_with_id(gs, rsa_id_digest)) failed. (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)Hey,
I've been running an oldish version of the guard branch on my tor browser. Top commit is `2767ae18064a879218` plus some extra logging code of mine.
I used Tor with guards and in my logs the following appeared:
```
Dec 18 01:10:04....Hey,
I've been running an oldish version of the guard branch on my tor browser. Top commit is `2767ae18064a879218` plus some extra logging code of mine.
I used Tor with guards and in my logs the following appeared:
```
Dec 18 01:10:04.000 [warn] tor_bug_occurred_(): Bug: src/or/entrynodes.c:816: entry_guard_add_to_sample_impl: Non-fatal assertion !(have_sampled_guard_with_id(gs, rsa_id_digest)) failed. (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: Non-fatal assertion !(have_sampled_guard_with_id(gs, rsa_id_digest)) failed in entry_guard_add_to_sample_impl at src/or/entrynodes.c:816. Stack trace: (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /usr/lib/x86_64-linux-gnu/libasan.so.1(backtrace+0x3a) [0x7f0cde5be48a] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(log_backtrace+0x46) [0x7f0cdff74dc6] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(tor_bug_occurred_+0x12f) [0x7f0cdffc4c1f] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x8a249a) [0x7f0cdff2f49a] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x8a3b5c) [0x7f0cdff30b5c] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x8a500f) [0x7f0cdff3200f] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(entry_guards_update_all+0x10f0) [0x7f0cdff379e0] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(guards_update_all+0x83) [0x7f0cdff43cc3] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(set_options+0x62af) [0x7f0cdfe2521f] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(options_trial_assign+0xb3) [0x7f0cdfe28693] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x803aff) [0x7f0cdfe90aff] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(connection_control_process_inbuf+0xdcd) [0x7f0cdfe9df9d] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x7cb938) [0x7f0cdfe58938] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x56f716) [0x7f0cdfbfc716] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/libevent-2.0.so.5(event_base_loop+0x937) [0x7f0cdde408d7] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(do_main_loop+0x385) [0x7f0cdfbfe535] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(tor_main+0x1385) [0x7f0cdfc03385] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(main+0x1c) [0x7f0cdfbf16dc] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f0cdc098b45] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
Dec 18 01:10:04.000 [warn] Bug: /home/f/tor-browser_en-US/Browser/TorBrowser/Tor/tor(+0x56665b) [0x7f0cdfbf365b] (on Tor 0.3.0.0-alpha-dev 8b75261b6dc341de)
```
I've since restarted Tor to use git master, will update the ticket accordingly. Perhaps the above traceback is enough to identify the issue anyway.Tor: 0.3.0.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/21007guard: circuit_send_next_onion_skin(): Bug: 3-hop circuit <ptr> with purpose ...2020-06-13T15:04:35ZDavid Gouletdgoulet@torproject.orgguard: circuit_send_next_onion_skin(): Bug: 3-hop circuit <ptr> with purpose 18 has no guard stateGot 7 of those in rapid succession just after self test was done.
```
16:43:58 [WARN] circuit_send_next_onion_skin(): Bug: 3-hop circuit <ptr> with purpose 18 has no guard state (on Tor 0.3.0.0-alpha-dev 4ec9751c144465f6)
```
At comm...Got 7 of those in rapid succession just after self test was done.
```
16:43:58 [WARN] circuit_send_next_onion_skin(): Bug: 3-hop circuit <ptr> with purpose 18 has no guard state (on Tor 0.3.0.0-alpha-dev 4ec9751c144465f6)
```
At commit `4ec9751c144465f6`Tor: 0.3.0.x-finalNick MathewsonNick Mathewsonhttps://gitlab.torproject.org/legacy/trac/-/issues/20711[warn] Cannot make an outgoing connection without a DirPort2020-06-13T15:03:33ZRoger Dingledine[warn] Cannot make an outgoing connection without a DirPortRunning my close-to-maint-0.2.9 branch as a relay, I get this complaint periodically:
```
Nov 18 02:36:03.747 [warn] Cannot make an outgoing connection without a DirPort.
Nov 18 02:36:03.848 [warn] Cannot make an outgoing connection with...Running my close-to-maint-0.2.9 branch as a relay, I get this complaint periodically:
```
Nov 18 02:36:03.747 [warn] Cannot make an outgoing connection without a DirPort.
Nov 18 02:36:03.848 [warn] Cannot make an outgoing connection without a DirPort.
Nov 18 02:37:03.659 [warn] Cannot make an outgoing connection without a DirPort.
```
I have set ORPort and I have not set DirPort, and also my relay can't find itself reachable (because it isn't).
The code indicates that I should get a stack-trace, but only at info-level, and I lost that log. I'll try to reproduce sometime -- or maybe somebody else will do it first. :)Tor: 0.3.0.x-finalhttps://gitlab.torproject.org/legacy/trac/-/issues/20458Integration tests should be run locally before committing code changes2020-06-13T15:02:19ZChelsea KomloIntegration tests should be run locally before committing code changesCurrently, it is easy to submit a patch for code changes without first running integration tests locally.
Two changes could help with this:
1. Adding this information to documentation for contributors
2. Adding a make task that runs all...Currently, it is easy to submit a patch for code changes without first running integration tests locally.
Two changes could help with this:
1. Adding this information to documentation for contributors
2. Adding a make task that runs all necessary tasks before contributing new code, which are:
`make check-spaces`
`make check`
`make test-network-all`
We should investigate how to handle:
- Someone not having have chutney
- Someone not having the necessary network connection for integration tests to succeed
- If chutney tests fail because of flakiness (race conditions for example) rather than legitimate failures.Tor: 0.3.1.x-finalChelsea KomloChelsea Komlo