[tor-dev] Torsocks 2.x issue - Need eyes on that

Lunar lunar at torproject.org
Tue Oct 29 21:19:13 UTC 2013

David Goulet:
> Now the issue was detected with firefox which uses a custom malloc hook
> meaning that it handles its own memory allocation. This hook uses mmap()
> that firefox redefines to be a direct syscall(__NR_mmap, ...) and
> remember that this symbol is hijacked by torsocks.
> […]
> It's a bit of a catch 22 because torsocks is basically looking for the
> libc syscall symbol but then it gets call inside that lookup code
> path...

Wouldn't one way out be to also hook malloc to use a
static buffer until dlsym() is done? The code snippet in the following
answer is doing just that:

Lunar                                             <lunar at torproject.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20131029/1ab237cd/attachment.sig>

More information about the tor-dev mailing list