The networkstatus_parse_vote_from_string function in routerparse.c in Tor before 0.2.2.38 does not properly handle an invalid flavor name, which allows remote attackers to cause a denial of service (out-of-bounds read and daemon crash) via a crafted (1) vote document or (2) consensus document.
https://trac.torproject.org/projects/tor/ticket/6530
https://lists.torproject.org/pipermail/tor-announce/2012-August/000086.html
https://gitweb.torproject.org/tor.git/commit/57e35ad3d91724882c345ac709666a551a977f0f
https://gitweb.torproject.org/tor.git/commit/55f635745afacefffdaafc72cc176ca7ab817546
http://security.gentoo.org/glsa/glsa-201301-03.xml
http://secunia.com/advisories/50583
http://openwall.com/lists/oss-security/2012/08/21/6
http://lists.opensuse.org/opensuse-updates/2012-08/msg00048.html