Nick Mathewson [Mon, 3 Aug 2020 15:25:37 +0000 (11:25 -0400)]
Remove channel_is_canonical_is_reliable()
This function once served to let circuits continue to be built over
version-1 link connections. But such connections are long-obsolete,
and it's time to remove this check.
Nick Mathewson [Thu, 30 Jul 2020 18:24:25 +0000 (14:24 -0400)]
Fix a bug in buf_move_all() when the input buffer is empty.
We found this in #40076, after we started using buf_move_all() in
more places. Fixes bug #40076; bugfix on 0.3.3.1-alpha. As far as
I know, the crash only affects master, but I think this warrants a
backport, "just in case".
Daniel Pinto [Tue, 28 Jul 2020 23:34:08 +0000 (00:34 +0100)]
Fix startup crash with seccomp sandbox enabled #40072
Fix crash introduced in #40020. On startup, tor calls
check_private_dir on the data and key directories. This function
uses open instead of opendir on the received directory. Data and
key directoryes are only opened here, so the seccomp rule added
should be for open instead of opendir, despite the fact that they
are directories.
Nick Mathewson [Wed, 22 Jul 2020 19:20:41 +0000 (15:20 -0400)]
Treat all extorport connections with un-set addresses as remote
Without this fix, if an PT forgets to send a USERADDR command, that
results in a connection getting treated as local for the purposes of
rate-limiting.
If the PT _does_ use USERADDR, we still believe it.
Nick Mathewson [Wed, 22 Jul 2020 18:45:03 +0000 (14:45 -0400)]
Adjust the rules for warning about too many connections.
Previously we tolerated up to 1.5 connections for every relay we
were connected to, and didn't warn if we had fewer than 5
connections total.
Now we tolerate up to 1.5 connections per relay, and up to 4
connections per authority, and we don't warn at all when we have
fewer than 25 connections total.
Fixes bug 33880, which seems to have been provoked by our #17592
change in 0.3.5.
Daniel Pinto [Wed, 1 Jul 2020 19:30:04 +0000 (20:30 +0100)]
Fix seccomp sandbox rules for openat #27315
The need for casting negative syscall arguments depends on the
glibc version. This affects the rules for the openat syscall which
uses the constant AT_FDCWD that is defined as a negative number.
This commit adds logic to only apply the cast when necessary, on
glibc versions from 2.27 onwards.
Daniel Pinto [Wed, 1 Jul 2020 22:51:39 +0000 (23:51 +0100)]
Fix seccomp sandbox rules for opening directories #40020
Different versions of glibc use either open or openat for the
opendir function. This commit adds logic to use the correct rule
for each glibc version, namely:
- Until 2.14 open is used
- From 2.15 to to 2.21 openat is used
- From 2.22 to 2.26 open is used
- From 2.27 onwards openat is used
Daniel Pinto [Wed, 1 Jul 2020 19:30:04 +0000 (20:30 +0100)]
Fix seccomp sandbox rules for openat #27315
The need for casting negative syscall arguments depends on the
glibc version. This affects the rules for the openat syscall which
uses the constant AT_FDCWD that is defined as a negative number.
This commit adds logic to only apply the cast when necessary, on
glibc versions from 2.27 onwards.
Nick Mathewson [Fri, 17 Jul 2020 13:31:32 +0000 (09:31 -0400)]
Use gitlab-friendly URLs when formatting changelogs as HTML
Our old https://bugs.torproject.org/nnnn URLs only work for bugs
numbered before 40000. Newer gitlab bugs need to have specific
projects mentioned.
This patch assumes that bugs are in tpo/core/tor by default, but
allows us to refer to several other projects by saying
e.g. "chutney#40002" if we want.
Nick Mathewson [Mon, 13 Jul 2020 13:24:26 +0000 (09:24 -0400)]
Remove check-cocci from check-local target.
check-cocci is still a good idea -- perhaps as a cron job? But
doing it as part of our regular tests has just been confusing,
especially to volunteers who shouldn't have to become coccinelle
experts in order to get their patches through our CI.