Why is this necessary?
When you use Tor, it's setup as a SOCKS4 or 5 proxy but not SOCKS4a. This means DNS requests are resolved using the normal method of /etc/resolv.conf. This exposes you because your ISP (or whoever is in /etc/resolv.conf) can view your plaintext DNS queries.
Example scenario
In the case of using Firefox through Tor, it means all of the actual transfers (pages, images, video, etc) are anonymized through Tor but your ISP can see every site you visit by looking at what DNS names you request.
While they can only assume you are visiting these sites because the actual traffic is encrypted, it's best to not let anyone see what you are doing for privacy concerns.
For instance, if you request some site
google.com 
without dsocks but with Tor, you will get the HTML back encrypted but to lookup the IP of google.com, programs use /etc/resolv.conf to ask someone what the IP is. Using logs of
google.com 
and your ISP's DNS server and traffic logs, it may be possible for them to determine whether you accessed that site or just looked the name up (not 100% but possibly a correlation).
This tutorial is designed to prevent such information leaks.
https://trac.torproject.org/projects/tor/wiki/doc/... 
quindi SOCKS4 e SOCKS5 portano a una vulnerabilità ma non SOCKS4a ?