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

David Goulet dgoulet at ev0ke.net
Thu Oct 31 14:28:18 UTC 2013


On 30 Oct (23:07:18), Lunar wrote:
> David Goulet:
> > Ok, I manage to make it work with Firefox.
> 
> Yeah! :)
> 
> > However, and a BIG however, this is a special fix for specific case
> > where memory allocation is handle by the application AND syscall() is
> > used. It will not cover the broader issue of using other syscall within
> > a malloc hook for instance.
> > 
> > After two days, I only see that solution for now as a "working fix" for
> > application that use syscall() directly for their memory allocation.
> > 
> > Thoughts?
> 
> As long as the case is detected and we print a nice error message
> instead of deadlocking, I think it'll be good enough. That's why I
> suggested that patch (actually broken, it needs better #if/#else).

Yah agree. For that, I'll simply check if the libc symbol pointer of
syscall() is NULL and if so we are in a lookup loop and stop right there
instead of dead locking.

I'll push that fix soon for the mmap/munmap() with a BIG FAT comment
explaining why and this special use case (malloc hook + direct syscall()
in the hook).

Cheers!
David

> 
> -- 
> Lunar                                             <lunar at torproject.org>



> _______________________________________________
> tor-dev mailing list
> tor-dev at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: Digital signature
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20131031/ff3d5381/attachment.sig>


More information about the tor-dev mailing list