[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #28861 [Core Tor/Torsocks]: torsocks: Unsupported syscall number 217



#28861: torsocks: Unsupported syscall number 217
------------------------------------+------------------------------
 Reporter:  ilf                     |          Owner:  dgoulet
     Type:  defect                  |         Status:  assigned
 Priority:  Medium                  |      Milestone:
Component:  Core Tor/Torsocks       |        Version:  Tor: 0.3.4.9
 Severity:  Normal                  |     Resolution:
 Keywords:  torsocks, syscall, 217  |  Actual Points:
Parent ID:                          |         Points:
 Reviewer:                          |        Sponsor:
------------------------------------+------------------------------

Comment (by onirony):

 I'm working on a seccomp based torsocks that should eliminate issues of
 this sort. Syscalls in torsocks are explicitly whitelisted and
 getdents/getdents64 are not on the whitelist. getdents seems very harmless
 to me and I think it should be whitelisted.

 @ilf, in the meantime here is a patched torsocks that can run getdents and
 getdents64 (the syscall it's rejecting in your error message):
 https://github.com/seisvelas/torsocks/tree/getdent_fix

 The getdents code I used to test my patch is just the example from the
 Linux man page and can be found here: http://man7.org/linux/man-
 pages/man2/getdents.2.html#EXAMPLE

 When I compiled that getdents example code and attempted to run it through
 standard torsocks this happened:


 {{{
 hc01@HC01:~$ /usr/bin/torsocks ./a.out
 [Dec 19 16:31:02] WARNING torsocks[16567]: [syscall] Unsupported syscall
 number 78.
 Denying the call (in tsocks_syscall() at syscall.c:465)
 getdents: Function not implemented
 }}}


 Then, using my patched torsocks:

 {{{
 hc01@HC01:~$ torsocks ./a.out
 --------------- nread=1008 ---------------
 i-node#  file type  d_reclen  d_off   d_name
 23068679  directory    32 22651653883364612  .cache
 23069803  directory    32 72324196525406672  .compiz
 ...
 }}}

 When I modified the code to use getdents64, I received the same error from
 torsocks. With my patch it ran properly. I'm going to bother David Goulet
 and set this ticket to 'needs review' to see if my patch is safe and can
 be accepted!

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28861#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs