tor

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

commit 5d330997f690845fadbd71f71f26a2ea464cd1ab
parent 44facb83d5b8801ec53135fab8a1f610d468fcd1
Author: cypherpunks <cypherpunks@torproject.org>
Date:   Sat,  8 Feb 2020 20:10:40 +0000

dirparse: reject votes with malformed routerstatus entries

Diffstat:
Msrc/feature/dirparse/ns_parse.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/feature/dirparse/ns_parse.c b/src/feature/dirparse/ns_parse.c @@ -1432,6 +1432,7 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out, smartlist_add(ns->routerstatus_list, rs); } else { vote_routerstatus_free(rs); + goto err; // Malformed routerstatus, reject this vote. } } else { routerstatus_t *rs; @@ -1441,6 +1442,8 @@ networkstatus_parse_vote_from_string(const char *s, const char **eos_out, flav))) { /* Use exponential-backoff scheduling when downloading microdescs */ smartlist_add(ns->routerstatus_list, rs); + } else { + goto err; // Malformed routerstatus, reject this vote. } } }