aboutsummaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)Author
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 '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.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 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.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-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-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-06Do not try to shut down the event loop when it is not initialized.Nick Mathewson
Doing so caused us to crash in some unusual circumstances, such as using --verify-config to verify a configuration that failed during the options_act() stage. Fixes bug 32407; bugfix on 0.3.3.1-alpha.
2019-11-06Merge branch 'maint-0.4.0' into maint-0.4.1teor
2019-11-06Merge branch 'maint-0.3.5' into maint-0.4.0teor
2019-10-22Merge remote-tracking branch 'tor-github/pr/1303' into maint-0.4.1Nick Mathewson
2019-10-22Merge remote-tracking branch 'tor-github/pr/1302' into maint-0.4.1Nick Mathewson
2019-10-22Merge remote-tracking branch 'tor-github/pr/1346' into maint-0.4.1Nick Mathewson
2019-10-17Ensure that the exit callback is called if CreateProcessA() fails on Windows.Alexander Færøy
This patch fixes an issue where the exit handler is not called for the given process_t in case CreateProcessA() fails. This could, for example, happen if the user tries to execute a binary that does not exist. See: https://bugs.torproject.org/31810
2019-10-17Handle errors from execve() in the Unix process backend more gracefully.Alexander Færøy
This patch removes a call to tor_assert_unreached() after execve() failed. This assertion leads to the child process emitting a stack trace on its standard output, which makes the error harder for the user to demystify, since they think it is an internal error in Tor instead of "just" being a "no such file or directory" error. The process will now instead output "Error from child process: X" where X is the stringified version of the errno value. See: https://bugs.torproject.org/31810
2019-10-04tls: Log TLS read buffer length bugs onceteor
Rather than filling the logs with similar warnings. Fixes bug 31939; bugfix on 0.3.0.4-rc.
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-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-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-24backtrace: Add a missing check for HAVE_PTHREAD_H before using mutexesteor
Fixes bug 31614; bugfix on 0.2.5.2-alpha.
2019-09-24backtrace: Disable signal handlers in remove_bt_handler()teor
Fixes bug 31614; bugfix on 0.2.5.2-alpha.
2019-09-23Fix bug when %including folder with comment only files. #31408Daniel Pinto
When processing a %included folder, a bug caused the pointer to the last element of the options list to be set to NULL when processing a file with only comments or whitepace. This could cause options from other files on the same folder to be discarded depending on the lines after the affected %include.