[Pkg-privacy-maintainers] Bug#895903: [torsocks] AAAA replies from Tor not handled

Łukasz Stelmach steelman at post.pl
Wed Jan 6 01:42:14 GMT 2021


On Tue, 17 Apr 2018 13:55:43 +0100 Kevin Steen <debian at kevinsteen.net> wrote:
>
> Tor now returns IPv6 addresses when hostnames are resolved, but
> torsocks cannot handle this case.
>
> To reproduce:
>      torsocks -d nc ipv6.test-ipv6.com 80
>

Without torsocks nc(1) can't perform this request too.

$ nc ipv6.test-ipv6.com 80
ipv6.test-ipv6.com: forward host lookup failed: Unknown host
$ host ipv6.test-ipv6.com
ipv6.test-ipv6.com has IPv6 address 2001:470:1:18::115

This is because nc appears to be using gethostbyname()

1609896026 DEBUG torsocks[27929]: [gethostbyname] Requesting ipv6.test-ipv6.com hostname (in tsocks_gethostbyname() at gethostbyname.c:68)

which can't handle AAAA records.

There is getaddrinfo(3) which is implemented in torsocks. Unfortunately
AF_INET6 appears not to be supported yet. If you look at
tsocks_tor_resolve() in src/lib/torsocks.c, you will find a stub [1].

[1] https://github.com/dgoulet/torsocks/blob/d4b0a84bdf2a1895c8ec3091dc2767fd9f8c2d66/src/lib/torsocks.c#L527
-- 
Kind regards,
Łukasz Stelmach
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-maintainers/attachments/20210106/c6f5b0e5/attachment.sig>


More information about the Pkg-privacy-maintainers mailing list