aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
AgeCommit message (Collapse)Author
2016-12-20Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2016-12-18Fix parsing bug with unecognized token at EOSNick Mathewson
In get_token(), we could read one byte past the end of the region. This is only a big problem in the case where the region itself is (a) potentially hostile, and (b) not explicitly nul-terminated. This patch fixes the underlying bug, and also makes sure that the one remaining case of not-NUL-terminated potentially hostile data gets NUL-terminated. Fix for bug 21018, TROVE-2016-12-002, and CVE-2016-1254
2015-04-06Merge remote-tracking branch 'origin/maint-0.2.4' into maint-0.2.5Nick Mathewson
2015-04-06Handle empty/zero length encoded intro points more gracefully.Yawning Angel
In theory these should never the triggered as the only caller now validates the parameters before this routine gets called.
2014-09-02Fix a number of clang analyzer false-positivesNick Mathewson
Most of these are in somewhat non-obvious code where it is probably a good idea to initialize variables and add extra assertions anyway. Closes 13036. Patches from "teor".
2014-04-29Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2014-04-29Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
2014-04-29Stop leaking memory in error cases of md parsingNick Mathewson
When clearing a list of tokens, it's important to do token_clear() on them first, or else any keys they contain will leak. This didn't leak memory on any of the successful microdescriptor parsing paths, but it does leak on some failing paths when the failure happens during tokenization. Fixes bug 11618; bugfix on 0.2.2.6-alpha.
2014-04-14Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
2014-04-14Merge remote-tracking branch 'origin/maint-0.2.3' into maint-0.2.4Nick Mathewson
Conflicts: src/or/routerlist.h
2014-04-14Code to blacklist authority signing keysNick Mathewson
(I need a list of actual signing keys to blacklist.)
2014-03-31Merge remote-tracking branch 'public/bug11342'Nick Mathewson
2014-03-27Make dump_desc() use binary modeNick Mathewson
Otherwise, it could mung the thing that came over the net on windows, which would defeat the purpose of recording the unparseable thing. Fixes bug 11342; bugfix on 0.2.2.1-alpha.
2014-03-23Merge remote-tracking branch 'public/bug11275_024'Nick Mathewson
2014-03-23Stop leaking 'sig' at each call of router_append_dirobj_signature()Roger Dingledine
The refactoring in commit cb75519b (tor 0.2.4.13-alpha) introduced this leak.
2014-03-18Take out remaining V1 directory code.Karsten Loesing
2014-03-05Merge remote-tracking branch 'arma/ticket5528'Nick Mathewson
Conflicts: src/or/router.c src/test/test_dir.c
2014-02-15Remove a bunch of functions that were never called.Nick Mathewson
2014-02-03More fixes to rip out all of the v2 directory code.Karsten Loesing
(This was a squash commit, but I forgot to squash it. Sorry! --Nick)
2014-01-29Rip out all of the v2 directory code.Nick Mathewson
The remaining vestige is that we continue to publish the V2dir flag, and that, for the controller, we continue to emit v2 directory formats when requested.
2013-12-17Merge remote-tracking branch 'origin/maint-0.2.4'Nick Mathewson
Conflicts: src/or/microdesc.c Conflict because one change was on line adjacent to line where 01206893 got fixed.
2013-12-17Merge remote-tracking branch 'public/bug10409_023' into maint-0.2.4Nick Mathewson
2013-12-16Avoid free()ing from an mmap on corrupted microdesc cacheNick Mathewson
The 'body' field of a microdesc_t holds a strdup()'d value if the microdesc's saved_location field is SAVED_IN_JOURNAL or SAVED_NOWHERE, and holds a pointer to the middle of an mmap if the microdesc is SAVED_IN_CACHE. But we weren't setting that field until a while after we parsed the microdescriptor, which left an interval where microdesc_free() would try to free() the middle of the mmap(). This patch also includes a regression test. This is a fix for #10409; bugfix on 0.2.2.6-alpha.
2013-11-18Tweak #10162 documentation a bitNick Mathewson
2013-11-14Make the dir-key-crosscert element requiredNick Mathewson
In proposal 157, we added a cross-certification element for directory authority certificates. We implemented it in 0.2.1.9-alpha. All Tor directory authorities now generate it. Here, as planned, make it required, so that we can finally close proposal 157. The biggest change in the code is in the unit test data, where some old hardcoded certs that we made long ago have become no longer valid and now need to be replaced.
2013-04-18Merge branch 'less_charbuf_rebased' into maint-0.2.4Nick Mathewson
Conflicts: src/or/dirserv.c src/or/dirserv.h src/test/test_dir.c
2013-04-18Remove the now-unused router_get_networkstatus_v3_hashNick Mathewson
2013-04-18Fix a couple of documentation issues.Nick Mathewson
2013-04-18Refactor dirobj signature generationNick Mathewson
Now we can compute the hash and signature of a dirobj before concatenating the smartlist, and we don't need to play silly games with sigbuf and realloc any more.
2013-04-18Fix some wide linesNick Mathewson
2013-04-17Merge branch 'bug8037_squashed' into maint-0.2.4Nick Mathewson
2013-04-17Reject most directory documents with an internal NUL.Nick Mathewson
(Specifically, we reject all the ones that aren't NUL-terminated, since a NUL-terminated thing can't have a NUL in the middle.) Another fix for #8037.
2013-04-14Rename all fields which measure bw in kb to end with _kbNick Mathewson
2013-03-29Bug 8419: Apply the badexit fix from #2203 to validatio tooMike Perry
This was causing dirauths to emit flag weight validation warns if there was a sufficiently large amount of badexit bandwidth to make a difference in flag weight results.
2013-03-26Bug 7065: Use $ for idhex instead of =Mike Perry
2013-03-18Check for 0.2.4.8, not 0.2.4.7, to determine EXTEND2 supportNick Mathewson
Fixes bug 8464; bugfix on b2863739 in 0.2.4.8-alpha
2013-02-19Refactor storing of measured_bw versus Unmeasured=1.Nick Mathewson
This patch moves the measured_bw field and the has_measured_bw field into vote_routerstatus_t, since only votes have 'Measured=XX' set on their weight line. I also added a new bw_is_unmeasured flag to routerstatus_t to represent the Unmeasured=1 flag on a w line. Previously, I was using has_measured_bw for this, which was quite incorrect: has_measured_bw means that the measured_bw field is set, and it's probably a mistake to have it serve double duty as meaning that 'baandwidth' represents a measured value. While making this change,I also found a harmless but stupid bug in dirserv_read_measured_bandwidths: It assumes that it's getting a smartlist of routerstatus_t, when really it's getting a smartlist of vote_routerstatus_t. C's struct layout rules mean that we could never actually get an error because of that, but it's still quite incorrect. I fixed that, and in the process needed to add two more sorting and searching helpers. Finally, I made the Unmeasured=1 flag get parsed. We don't use it for anything yet, but someday we might. This isn't complete yet -- the new 2286 unit test doesn't build.
2013-02-19Tweak consensus method 17 based on arma's commentsNick Mathewson
Instead of capping whenever a router has fewer than 3 measurements, we cap whenever a router has fewer than 3 measurements *AND* there are at least 3 authorities publishing measured bandwidths. We also generate bandwidth lines with a new "Unmeasured=1" flag, meaning that we didn't have enough observations for a node to use measured bandwidth values in the authority's input, whether we capped it or not.
2013-02-09stop setting, or using, router->addressRoger Dingledine
resolves ticket 5528.
2013-02-01Rename and relocate the bw weight scale param getter.Mike Perry
It had nothing to do with circuit build times.
2013-02-01Rename log() to tor_log() for loggingNick Mathewson
This is meant to avoid conflict with the built-in log() function in math.h. It resolves ticket 7599. First reported by dhill. This was generated with the following perl script: #!/usr/bin/perl -w -i -p s/\blog\(LOG_(ERR|WARN|NOTICE|INFO|DEBUG)\s*,\s*/log_\L$1\(/g; s/\blog\(/tor_log\(/g;
2013-01-26Correctly copy microdescs/extrinfos with internal NUL bytesNick Mathewson
Fixes bug 8037; bugfix on 0.2.0.1-alpha; reported by cypherpunks.
2013-01-16Merge branch '024_msvc_squashed'Nick Mathewson
Conflicts: src/or/or.h srcwin32/orconfig.h
2013-01-16Fix an instance of snprintf; don't use _snprintf directlyNick Mathewson
2013-01-16Update the copyright date to 201.Nick Mathewson
2013-01-05Make the = at the end of ntor-onion-key optional.Nick Mathewson
Makes bug 7869 more easily fixable if we ever choose to do so.
2013-01-03Merge branch 'ntor-resquashed'Nick Mathewson
Conflicts: src/or/cpuworker.c src/or/or.h src/test/bench.c
2013-01-03Enable the ntor handshake on the client side.Nick Mathewson
"works for me"
2013-01-02Wrangle curve25519 onion keys: generate, store, load, publish, republishNick Mathewson
Here we try to handle curve25519 onion keys from generating them, loading and storing them, publishing them in our descriptors, putting them in microdescriptors, and so on. This commit is untested and probably buggy like whoa
2012-12-07Merge remote-tracking branch 'public/bug6887'Nick Mathewson