summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-10-09Merge branch 'bug30344_squashed_035'Nick Mathewson
2019-10-09Stop libevent from reading data from closed connections.George Kadianakis
Code adapted from Rob's proposed patch in #30344. Also add a comment in connection_mark_for_close_internal_() on why we should not be adding extra code there without a very good reason.
2019-10-07Merge remote-tracking branch 'tor-github/pr/1317'Nick Mathewson
2019-10-07Merge branch 'ticket31548_035_01_squashed'Nick Mathewson
2019-10-07hs-v3: Make service pick the exact amount of intro pointsDavid Goulet
When encoding introduction points, we were not checking if that intro points had an established circuit. When botting up, the service will pick, by default, 3 + 2 intro points and the first 3 that establish, we use them and upload the descriptor. However, the intro point is removed from the service descriptor list only when the circuit has opened and we see that we have already enough intro points, it is then removed. But it is possible that the service establishes 3 intro points successfully before the other(s) have even opened yet. This lead to the service encoding extra intro points in the descriptor even though the circuit is not opened or might never establish (#31561). Fixes #31548 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-07Merge remote-tracking branch 'tor-github/pr/1379'Nick Mathewson
2019-10-07bump to 0.4.2.2-alpha-devNick Mathewson
2019-10-04Merge remote-tracking branch 'tor-github/pr/1392'teor
2019-10-03hs: ADD_ONION NEW:BEST now defaults to ED25519-V3David Goulet
From RSA1024 (v2) to v3 now. Closes #29669 Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-03Merge branch 'tor-github/pr/1377'George Kadianakis
2019-10-03Merge branch 'tor-github/pr/1276'George Kadianakis
2019-10-03Unit tests for dirserv_reject_tor_version().Nick Mathewson
2019-10-03Authorities reject relays running unsupported Tor release series.Nick Mathewson
Our minimum version is now 0.2.9.5-alpha. Series 0.3.0, 0.3.1, 0.3.2, 0.3.3, and 0.3.4 are now rejected. Also, extract this version-checking code into a new function, so we can test it. Closes ticket 31549. Also reject 0.3.5.0 through 0.3.5.6-rc as unstable.
2019-10-03bump to 0.4.2.2-alphaNick Mathewson
2019-10-03Merge remote-tracking branch 'tor-github/pr/1358'Nick Mathewson
2019-10-03Merge remote-tracking branch 'tor-github/pr/1382'Nick Mathewson
2019-10-03util/map_anon_nofork: Add a cast to avoid passing -48 to memsetNick Mathewson
This fixes coverity CID 1454593, and bug 31948. Bug not in any released version of Tor.
2019-10-03control/control: Refactor some error handling codeteor
Split some protocol error handling out of connection_control_process_inbuf(). This refactor reduces the size of a practracker exception. Closes 31840.
2019-10-02Merge remote-tracking branch 'tor-github/pr/1374'Nick Mathewson
2019-10-02Merge branch 'tor-github/pr/1385'David Goulet
2019-10-02Merge branch 'tor-github/pr/1344'David Goulet
2019-10-02Merge branch 'maint-0.4.1'Nick Mathewson
2019-10-02Merge branch 'maint-0.4.0' into maint-0.4.1Nick Mathewson
2019-10-02Merge branch 'maint-0.3.5' into maint-0.4.0Nick Mathewson
2019-10-02Merge branch 'maint-0.2.9' into maint-0.3.5Nick Mathewson
2019-10-02Update geoip and geoip6 to the October 1 2019 database.Karsten Loesing
2019-10-02log: fix a typo in the function comment for log_fn_()teor
Closes 31923.
2019-10-01Fix a crash bug in max_u16_in_sl()Nick Mathewson
The documentation for this function says that the smartlist can contain NULLs, but the code only handled NULLs if they were at the start of the list. We didn't notice this for a long time, because when Tor is run normally, the sequence of msg_id_t is densely packed, and so this list (mapping msg_id_t to channel_id_t) contains no NULL elements. We could only run into this bug: * when Tor was running in embedded mode, and starting more than once. * when Tor ran first with more pubsub messages enabled, and then later with fewer. * When the second run (the one with fewer enabled pubsub messages) had at least some messages enabled, and those messages were not the ones with numerically highest msg_id_t values. Fixes bug 31898; bugfix on 47de9c7b0a828de7fb8129413db70bc4e4ecac6d in 0.4.1.1-alpha.
2019-10-01Add a test for max_u16_in_sl().Nick Mathewson
This test does not currently pass, because of bug 31898.
2019-10-01Rename max_in_sl to max_in_u16_sl, and expose it as STATIC.Nick Mathewson
Since we want to make this function slightly more visible for testing purposes, it needs a better name.
2019-10-01Add comments to try to prevent recurrence of #31495.Nick Mathewson
There is a bad design choice in two of our configuration types, where the empty string encodes a value that is not the same as the default value. This design choice, plus an implementation mistake, meant that config_dup() did not preserve the value of routerset_t, and thereby caused bug #31495. This comment-only patch documents the two types with the problem, and suggests that implementors try to avoid it in the future. Closes ticket 31907.
2019-10-01Help users who try to use v2 client auth in v3 onions.George Kadianakis
2019-09-30err: Remove a duplicate header in backtrace.cteor
2019-09-30err: Always lock the backtrace buffer before it is usedteor
Fixes bug 31734; bugfix on 0.2.5.3-alpha.
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-09-30log: When initialising log domain masks, only set known log domainsteor
And add a runtime test that checks for unknown domains and flags. Fixes bug 31854; bugfix on 0.2.1.1-alpha.
2019-09-30log: Define count, boundary, and all macros for domains and flagsteor
And do static checks on those macro definitions. Part of 31854.
2019-09-30log: Remove duplicate code and an outdated commentteor
Preparation for 31854.
2019-09-30Merge branch 'tor-github/pr/1346'George Kadianakis
2019-09-30Merge branch 'tor-github/pr/1302'George Kadianakis
2019-09-30Merge branch 'tor-github/pr/1356'George Kadianakis
2019-09-30Merge branch 'tor-github/pr/1339'George Kadianakis
2019-09-30test: Avoid a map_anon_nofork test failure on SunOSteor
This test failure happened due to a signed/unsigned integer comparison. This bug occurred on SunOS, it may also occur on other systems that use signed char as the default. (And cast 1-byte integer constants to an unsigned integer.) Fixes bug 31897; bugfix on 0.4.1.1-alpha.
2019-09-26Run "make autostyle" with new "annotate_ifdef_directives"Nick Mathewson
2019-09-26Merge remote-tracking branch 'tor-github/pr/1308'Nick Mathewson
2019-09-26lock: Avoid some undefined behaviour when freeing mutexes.teor
Fixes bug 31736; bugfix on 0.0.7.
2019-09-26log: explain why it is safe to leave the log mutex initializedteor
The log mutex is dynamically initialized, guarded by log_mutex_initialized. We don't want to destroy it, because after it is destroyed, we won't see any more logs. If tor is re-initialized, log_mutex_initialized will still be 1. So we won't trigger any undefined behaviour by trying to re-initialize the log mutex. Part of 31736, but committed in this branch to avoid merge conflicts.
2019-09-26sandbox: Allow backtrace signals to be disabledteor
Part of 31614.
2019-09-26backtrace: avoid undefined behaviour on re-initialisationteor
cb_buf_mutex is statically initialised, so we can not destroy it when we are shutting down the err subsystem. If we destroy it, and then re-initialise tor, all our backtraces will fail. Part of 31736, but committed in this branch to avoid merge conflicts.
2019-09-25Merge remote-tracking branch 'tor-github/pr/1349'Nick Mathewson