aboutsummaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
2020-05-06Use __attribute__((fallthrough)) rather than magic GCC comments.Nick Mathewson
GCC added an implicit-fallthrough warning a while back, where it would complain if you had a nontrivial "case:" block that didn't end with break, return, or something like that. Clang recently added the same thing. GCC, however, would let you annotate a fall-through as intended by any of various magic "/* fall through */" comments. Clang, however, only seems to like "__attribute__((fallthrough))". Fortunately, GCC accepts that too. A previous commit in this branch defined a FALLTHROUGH macro to do the right thing if GNUC is defined; here we replace all of our "fall through" comments with uses of that macro. This is an automated commit, made with the following perl one-liner: #!/usr/bin/perl -i -p s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i; (In order to avoid conflicts, I'm applying this script separately to each maint branch. This is the 0.4.2 version.)
2020-05-06Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-05-06Merge branch 'bug34078_prelim_035' into bug34078_prelim_041Nick Mathewson
2020-05-06Remove an incorrect "Fall through" comment.Nick Mathewson
2020-05-06address.c: add a single (harmless) missing break;Nick Mathewson
2020-05-06Add a fallthrough macro.Nick Mathewson
This macro defers to __attribute__((fallthrough)) on GCC (and clang). Previously we had been using GCC's magic /* fallthrough */ comments, but clang very sensibly doesn't accept those. Since not all compiler recognize it, we only define it when our configure script detects that it works. Part of a fix for 34078.
2020-03-18Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-03-18Merge branch 'maint-0.3.5' into maint-0.4.1Nick Mathewson
2020-03-18Port rsa_private_key_too_long() to work on OpenSSL 1.1.0.Nick Mathewson
2020-03-17Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-03-17Merge branch 'trove_2020_002_041' into maint-0.4.1Nick Mathewson
2020-03-17Merge branch 'trove_2020_002_035' into maint-0.3.5Nick Mathewson
2020-03-17Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-03-17Merge branch 'maint-0.3.5' into maint-0.4.1Nick Mathewson
2020-03-17Trivial bugfixes found during TROVE investigation.George Kadianakis
2020-03-17Merge branch 'trove_2020_002_035' into trove_2020_002_041Nick Mathewson
2020-03-17Use >= consistently with max_bits.Nick Mathewson
2020-03-17Extract key length check into a new function, and check more fields.Nick Mathewson
In the openssl that I have, it should be safe to only check the size of n. But if I'm wrong, or if other openssls work differently, we should check whether any of the fields are too large. Issue spotted by Teor.
2020-03-14Merge branch 'trove_2020_002_035' into trove_2020_002_041Nick Mathewson
2020-03-14Fix memory leak in crypto_pk_asn1_decode_private.Nick Mathewson
(Deep, deep thanks to Taylor for reminding me to test this!)
2020-03-14Revise TROVE-2020-002 fix to work on older OpenSSL versions.Nick Mathewson
Although OpenSSL before 1.1.1 is no longer supported, it's possible that somebody is still using it with 0.3.5, so we probably shouldn't break it with this fix.
2020-03-13Merge branch 'maint-0.3.5' into maint-0.4.1Nick Mathewson
2020-03-13Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-03-13Merge remote-tracking branch 'tor-github/pr/1693/head' into maint-0.3.5Nick Mathewson
2020-02-05Merge branch 'trove_2020_002_035' into trove_2020_002_041Nick Mathewson
Resolved Conflicts: src/feature/dirparse/parsecommon.c
2020-02-05When parsing, reject >1024-bit RSA private keys sooner.Nick Mathewson
Private-key validation is fairly expensive for long keys in openssl, so we need to avoid it sooner.
2020-01-30Merge branch 'maint-0.4.1' into maint-0.4.2teor
2020-01-30Merge branch 'maint-0.4.0' into maint-0.4.1teor
2020-01-30Merge branch 'maint-0.3.5' into maint-0.4.0teor
2020-01-30Merge remote-tracking branch 'tor-github/pr/1614' into maint-0.3.5teor
2020-01-29Change BUG() messages in buf_flush_to_tls() to IF_BUG_ONCE()Nick Mathewson
We introduced these BUG() checks in b0ddaac07428a06 to prevent a recurrence of bug 23690. But there's a report of the BUG() message getting triggered and filling up the disk. Let's change it to IF_BUG_ONCE(). Fixes bug 33093; bugfix on 0.3.2.2-alpha.
2020-01-16Merge branch 'maint-0.4.0' into maint-0.4.1teor
2020-01-16Merge branch 'maint-0.3.5' into maint-0.4.0teor
2020-01-16Merge remote-tracking branch 'tor-github/pr/1513' into maint-0.3.5teor
2020-01-06Merge remote-tracking branch 'tor-github/pr/1612' into maint-0.4.2Nick Mathewson
2020-01-06Merge branch 'maint-0.4.1' into maint-0.4.2Nick Mathewson
2020-01-05Fix sandbox crash during reload of logging configurationPeter Gerber
Allow calls to dup() which was introduced in commit a22fbab986. From a security perspective, I don't think this should impact the security of the sandbox significantly. As far as I can tell, there is nothing an adversary can do with a duplicated FD that can't be done with the original.
2019-12-17Correct how we use libseccompPeter Gerber
This fixes a startup crash with libseccomp v2.4.0 if Sandbox is set to 1.
2019-12-16Fix formatting in tor_assertf() message in struct_check_magic().Nick Mathewson
Closes 32771; bugfix on 0.4.2.1-alpha.
2019-12-16Merge branch 'bug32765_041' into bug32771_042Nick Mathewson
2019-12-16Use CHECK_PRINTF() for printf-like functions in util_bug.hNick Mathewson
2019-12-05Merge branch 'maint-0.4.0' into maint-0.4.1teor
2019-12-05Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-12-05Merge remote-tracking branch 'tor-github/pr/1424' into maint-0.4.0teor
2019-12-05Merge remote-tracking branch 'tor-github/pr/1277' into maint-0.3.5teor
2019-11-25Merge branch 'maint-0.4.0' into maint-0.4.1teor
2019-11-25Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-11-25Merge remote-tracking branch 'tor-github/pr/1394' into maint-0.3.5teor
2019-11-12config: Log the option name when skipping an obsolete optionteor
This is a basic fix for 0.4.2 only. The fix for 0.4.3 and later is in 32404. Fixes bug 32295; bugfix on 0.4.2.1-alpha.
2019-11-07Merge remote-tracking branch 'tor-github/pr/1513' into maint-0.4.2teor