aboutsummaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
2013-11-07Improved circuit queue out-of-memory handlerNick Mathewson
Previously, when we ran low on memory, we'd close whichever circuits had the most queued cells. Now, we close those that have the *oldest* queued cells, on the theory that those are most responsible for us running low on memory, and that those are the least likely to actually drain on their own if we wait a little longer. Based on analysis from a forthcoming paper by Jansen, Tschorsch, Johnson, and Scheuermann. Fixes bug 9093.
2013-09-18Fix an assert when disabling ORPort with accounting disabled.Nick Mathewson
The problem was that the server_identity_key_is_set() function could return true under conditions where we don't really have an identity key -- specifically, where we used to have one, but we stopped being a server. This is a fix for 6979; bugfix on 0.2.2.18-alpha where we added that assertion to get_server_identity_key().
2013-09-04use !cbt_disabled in place of LearnCBT to avoid needless circsNick Mathewson
This would make us do testing circuits "even when cbt is disabled by consensus, or when we're a directory authority, or when we've failed to write cbt history to our state file lately." (Roger's words.) This is a fix for 9671 and an improvement in our fix for 5049. The original misbehavior was in 0.2.2.14-alpha; the incomplete fix was in 0.2.3.17-beta.
2013-08-25Merge remote-tracking branch 'public/bug9546_023_v2' into maint-0.2.3Nick Mathewson
2013-08-22Replace return with continue in update_consensus_networkstatus_downloadsNick Mathewson
Fix for bug 9564; bugfix on 0.2.3.14-alpha.
2013-08-21Make bridges send AUTH_CHALLENGE cellsNick Mathewson
The spec requires them to do so, and not doing so creates a situation where they can't send-test because relays won't extend to them because of the other part of bug 9546. Fixes bug 9546; bugfix on 0.2.3.6-alpha.
2013-08-21Send NETINFO on receiving a NETINFO if we have not yet sent one.Nick Mathewson
(Backport to Tor 0.2.3) Relays previously, when initiating a connection, would only send a NETINFO after sending an AUTHENTICATE. But bridges, when receiving a connection, would never send AUTH_CHALLENGE. So relays wouldn't AUTHENTICATE, and wouldn't NETINFO, and then bridges would be surprised to be receiving CREATE cells on a non-open circuit. Fixes bug 9546.
2013-06-18Fix some problems with the bug9002 fix.Nick Mathewson
Fixes bug 9090; bug not in any released Tor.
2013-06-18Merge branch 'bug9063_redux_023_squashed' into maint-0.2.3Nick Mathewson
2013-06-18Implement a real OOM-killer for too-long circuit queues.Nick Mathewson
This implements "algorithm 1" from my discussion of bug #9072: on OOM, find the circuits with the longest queues, and kill them. It's also a fix for #9063 -- without the side-effects of bug #9072. The memory bounds aren't perfect here, and you need to be sure to allow some slack for the rest of Tor's usage. This isn't a perfect fix; the rest of the solutions I describe on codeable.
2013-06-16Limit hidden service descriptors to at most 10 guard nodes.Nick Mathewson
Fixes bug 9002; bugfix on 0.1.1.11-alpha (which introduced guard nodes), or on 0.0.6pre1 (which introduced hidden services).
2013-06-15Disable middle relay queue overfill detection code due to possible guard ↵Andrea Shepard
discovery attack
2013-06-14Increase the limit so leaky pipe might workNick Mathewson
2013-06-13Don't queue more cells as a middle relay than the spec allows to be in flightAndrea Shepard
2013-06-10Fix (Open?)BSD fast-connect bug with optimistic data.Nick Mathewson
There's an assertion failure that can occur if a connection has optimistic data waiting, and then the connect() call returns 0 on the first attempt (rather than -1 and EINPROGRESS). That latter behavior from connect() appears to be an (Open?)BSDism when dealing with remote addresses in some cases. (At least, I've only seen it reported with the BSDs under libevent, even when the address was 127.0.0.1. And we've only seen this problem in Tor with OpenBSD.) Fixes bug 9017; bugfix on 0.2.3.1-alpha, which first introduced optimistic data. (Although you could also argue that the commented-out connection_start_writing in 155c9b80 back in 2002 is the real source of the issue.)
2013-05-09Don't run off the end of the array-of-freelistsNick Mathewson
This is a fix for bug 8844, where eugenis correctly notes that there's a sentinel value at the end of the list-of-freelists that's never actually checked. It's a bug since the first version of the chunked buffer code back in 0.2.0.16-alpha. This would probably be a crash bug if it ever happens, but nobody's ever reported something like this, so I'm unsure whether it can occur. It would require write_to_buf, write_to_buf_zlib, read_to_buf, or read_to_buf_tls to get an input size of more than 32K. Still, it's a good idea to fix this kind of thing!
2013-04-12Avoid busy-looping on WANTREAD within connection_handle_writeNick Mathewson
Fix for bug 5650. Also, if we get a WANTREAD while reading while writing, make sure we're reading.
2013-02-12oops; add a missing semicolonNick Mathewson
(Cherry-picked from fc35ee4910326dc1ae718482b30e57666a71df85)
2013-02-11Check whether ei is non-NULL before altering it.Nick Mathewson
This fixes a crash bug if we fail to generate an extrainfo descriptor. Fixes bug 8208; bugfix on 0.2.3.16-alpha.
2013-01-14Reject create/begin/etc cells with {circ,stream}ID 0.Nick Mathewson
Otherwise, it's possible to create streams or circuits with these bogus IDs, leading to orphaned circuits or streams, or to ones that can cause bandwidth DOS problems. Fixes bug 7889; bugfix on all released Tors.
2012-11-12use a more logical operatorRoger Dingledine
Fix a harmless bug when opting against publishing a relay descriptor because DisableNetwork is set. Fixes bug 7464; bugfix on 0.2.3.9-alpha.
2012-11-08Add and use and unlikely-to-be-eliminated memwipe()Nick Mathewson
Apparently some compilers like to eliminate memset() operations on data that's about to go out-of-scope. I've gone with the safest possible replacement, which might be a bit slow. I don't think this is critical path in any way that will affect performance, but if it is, we can work on that in 0.2.4. Fixes bug 7352.
2012-10-23Fix a remotely triggerable assertion failure (CVE-2012-2250)Nick Mathewson
If we completed the handshake for the v2 link protocol but wound up negotiating the wong protocol version, we'd become so confused about what part of the handshake we were in that we'd promptly die with an assertion. This is a fix for CVE-2012-2250; it's a bugfix on 0.2.3.6-alpha. All servers running that version or later should really upgrade. Bug and fix from "some guy from France." I tweaked his code slightly to make it log the IP of the offending node.
2012-10-23Let 0.2.3 clients exit to internal addresses if they wantRoger Dingledine
Clients now consider the ClientRejectInternalAddresses config option when using a microdescriptor consensus stanza to decide whether an exit relay would allow exiting to an internal address. Fixes bug 7190; bugfix on 0.2.3.1-alpha.
2012-10-23Fix parse_short_policy (bug 7192.)Nick Mathewson
Our implementation of parse_short_policy was screwed up: it would ignore the last character of every short policy. Obviously, that's broken. This patch fixes the busted behavior, and adds a bunch of unit tests to make sure the rest of that function is okay. Fixes bug 7192; fix on 0.2.3.1-alpha.
2012-10-22add a unit test to expose bug 7192Roger Dingledine
2012-10-19Merge branch 'block_renegotiate_023' into maint-0.2.3Nick Mathewson
2012-10-19Don't serve or accept v2 HS descs over a DirPortRobert Ransom
(changes file tweaked by nickm)
2012-10-17Discard extraneous renegotiation attempts in the v3 link protocolNick Mathewson
Failure to do so left us open to a remotely triggerable assertion failure. Fixes CVE-2012-2249; bugfix on 0.2.3.6-alpha. Reported by "some guy from France".
2012-10-09Don't call fmt_addr() twice in a parameter list.George Kadianakis
2012-10-04Merge remote-tracking branch 'arma/bug7037' into maint-0.2.3Nick Mathewson
2012-10-03Refuse extra create cells with reason "resource limit"Roger Dingledine
In the past we had used reason "internal", which is more vague than it needs to be. Resolves bug 7037.
2012-10-03properly free the return values of rate_limit_log()Roger Dingledine
resolves bug 7022.
2012-09-22add faravahar as our ninth v3 dir authRoger Dingledine
2012-09-18Whitespace fixesNick Mathewson
2012-09-17Bug 6866: Convert pathbias asserts into log messages.Mike Perry
Asserts were hit by Tor2Web mode.
2012-09-13Avoid undefined behaviour when parsing HS protocol versionsRobert Ransom
Fixes bug 6827; bugfix on c58675ca728f12b42f65e5b8964ae695c2e0ec2d (when the v2 HS desc parser was implemented). Found by asn.
2012-09-12Merge remote-tracking branch 'public/bug6341_a_v2' into maint-0.2.3Nick Mathewson
2012-09-11Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3Nick Mathewson
Conflicts: src/test/test_util.c
2012-09-11Fix assertion failure in tor_timegm.Nick Mathewson
Fixes bug 6811.
2012-09-10Avoid segfault when reading state file from ancient torNick Mathewson
If s_values is null in rep_hist_load_bwhist_state_section, we would call smartlist_len() on it, and die. Fixes bug 6801.
2012-09-05Avoid segfault if EntryGuardPathBias precedes EntryGuardNick Mathewson
Fix for bug 6774; bugfix on 0.2.3.17-beta.
2012-09-04Merge remote-tracking branch 'arma/bug6743' into maint-0.2.3Nick Mathewson
2012-09-03fix whitespace and trivial typoRoger Dingledine
2012-09-01Make begindir_cutoff the same as general_cutoffRoger Dingledine
Allow one-hop directory fetching circuits the full "circuit build timeout" period, rather than just half of it, before failing them and marking the relay down. This fix should help reduce cases where clients declare relays (or worse, bridges) unreachable because the TLS handshake takes a few seconds to complete. Fixes bug 6743 (one piece of bug 3443); bugfix on 0.2.2.2-alpha, where we changed the timeout from a static 30 seconds.
2012-08-27Quiet "Set buildtimeout to low val" warnings: make them infoNick Mathewson
Fix for #6251
2012-08-27Downgrade path-bias warning messages to INFO for now.Nick Mathewson
We've had over two months to fix them, and didn't. Now we need 0.2.3.x stable. Yes, it would be cool to get this working in 0.2.3.x, but not at the expense of delaying every other feature that _does_ work in 0.2.3.x. We can do a real fix in 0.2.4.
2012-08-27Merge branch 'bug6710_023' into maint-0.2.3Nick Mathewson
2012-08-27Merge remote-tracking branch 'origin/maint-0.2.2' into maint-0.2.3Nick Mathewson
Conflicts: src/or/policies.c
2012-08-27Do not assert when comparing a null address/port against a policyNick Mathewson
This can create a remote crash opportunity for/against directory authorities.