tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit b33f69abb54d06b324301977e87171d5902a39bf
parent b4890e753459bb1aeb1c258e98fdb2c598bb1369
Author: David Goulet <dgoulet@torproject.org>
Date:   Thu, 14 Apr 2022 09:34:49 -0400

Merge branch 'maint-0.4.5' into maint-0.4.6

Diffstat:
Achanges/bug40472 | 6++++++
Msrc/feature/dircommon/consdiff.c | 2+-
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/changes/bug40472 b/changes/bug40472 @@ -0,0 +1,6 @@ + o Minor bugfixes (performance, DoS): + - Fix one case of a not-especially viable denial-of-service attack found + by OSS-Fuzz in our consensus-diff parsing code. This attack causes a + lot small of memory allocations and then immediately frees them: this + is only slow when running with all the sanitizers enabled. Fixes one + case of bug 40472; bugfix on 0.3.1.1-alpha. diff --git a/src/feature/dircommon/consdiff.c b/src/feature/dircommon/consdiff.c @@ -1128,7 +1128,7 @@ consdiff_get_digests(const smartlist_t *diff, { const cdline_t *line2 = smartlist_get(diff, 1); char *h = tor_memdup_nulterm(line2->s, line2->len); - smartlist_split_string(hash_words, h, " ", 0, 0); + smartlist_split_string(hash_words, h, " ", 0, 4); tor_free(h); }