Trac issueshttps://gitlab.torproject.org/legacy/trac/-/issues2020-06-13T16:10:11Zhttps://gitlab.torproject.org/legacy/trac/-/issues/34199torsocks irssi weird bug2020-06-13T16:10:11ZTractorsocks irssi weird bugDepending on the arguments to torsocks the output varies even though it shouldn't
case-1: torsocks irssi
`/connect oftc` gives following error
Irssi: Unable to connect server irc.oftc.net port 6697 [Interrupted system call]
case 2: tor...Depending on the arguments to torsocks the output varies even though it shouldn't
case-1: torsocks irssi
`/connect oftc` gives following error
Irssi: Unable to connect server irc.oftc.net port 6697 [Interrupted system call]
case 2: torsocks -d irssi
`/connect oftc` works as expected
I don't think there should be difference in output just because logging is enabled. This just might be the "torsocks uncertainty principle". I think we are onto something. Below I've attached the log dumped on the terminal.
1589343629 DEBUG torsocks[22051]: Logging subsytem initialized. Level 5, file (null), time 1 (in init_logging() at torsocks.c:303)
1589343629 DEBUG torsocks[22051]: Config file not provided by TORSOCKS_CONF_FILE. Using default /etc/torsocks.conf (in config_file_read() at config-file.c:543)
1589343629 DEBUG torsocks[22051]: Config file setting tor address to 127.0.0.1 (in conf_file_set_tor_address() at config-file.c:298)
1589343629 DEBUG torsocks[22051]: Config file setting tor port to 9050 (in conf_file_set_tor_port() at config-file.c:254)
1589343629 DEBUG torsocks[22051]: [config] Onion address range set to 127.42.42.0/24 (in set_onion_info() at config-file.c:108)
1589343629 DEBUG torsocks[22051]: Config file /etc/torsocks.conf opened and parsed. (in config_file_read() at config-file.c:572)
1589343629 DEBUG torsocks[22051]: [fclose] Close caught for fd 3 (in tsocks_fclose() at fclose.c:45)
1589343629 DEBUG torsocks[22051]: [onion] Pool init with subnet 127.42.42.0 and mask 24 (in onion_pool_init() at onion.c:104)
1589343629 DEBUG torsocks[22051]: [onion] Pool initialized with base 0, max_pos 255 and size 8 (in onion_pool_init() at onion.c:132)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 3 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 3 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 3 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
1589343629 DEBUG torsocks[22051]: [close] Close caught for fd 5 (in tsocks_close() at close.c:33)
**Trac**:
**Username**: crabhttps://gitlab.torproject.org/legacy/trac/-/issues/33552Unsupported syscall number 229 on Debian on torsocks 2.3.02020-06-13T16:10:11ZTracUnsupported syscall number 229 on Debian on torsocks 2.3.0arch is x64.
Versions:
Tor 0.4.2.6 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1d, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.3.8.
I'm testing Interactive Brokers' TWS software on Tails OS (just for fun, I see it's not a use...arch is x64.
Versions:
Tor 0.4.2.6 running on Linux with Libevent 2.1.8-stable, OpenSSL 1.1.1d, Zlib 1.2.11, Liblzma 5.2.4, and Libzstd 1.3.8.
I'm testing Interactive Brokers' TWS software on Tails OS (just for fun, I see it's not a use case, however, I hope this can help), but I've met a problem launching it:
1583671114 WARNING torsocks[25196]: [syscall] Unsupported syscall number 229. Denying the call (in tsocks_syscall() at syscall.c:605)
1583671115 ERROR torsocks[25196]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:677)
The application show an error message: Update Failed. Check log file for details: /home/amnesia/Jts/.intall4j/updater.log (see below).
----
Steps to reproduce:
1. Launch Tails 4.3.
2. Download tws-latest-linux-x64.sh or tws-stable-linux-x64.sh from [the official website](https://www.interactivebrokers.com/en/index.php?f=14099#tws-software).
3. Run the installer: for example,
```
./tws-stable-linux-x64.sh
```
4. After the installation, launch the application: from the installer or from Terminal:
```
torify "/home/amnesia/Jts/tws" -J-DjtsConfigDir="/home/amnesia/Jts" %U
```
or
```
. torsocks on
"/home/amnesia/Jts/tws" -J-DjtsConfigDir="/home/amnesia/Jts" %U
```
5. You get:
```
1583672301 WARNING torsocks[26808]: [syscall] Unsupported syscall number 229. Denying the call (in tsocks_syscall() at syscall.c:605)
1583672301 ERROR torsocks[26808]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:677)
1583672301 ERROR torsocks[26808]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:677)
1583672302 ERROR torsocks[26808]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:677)
1583672379 PERROR torsocks[26808]: socks5 libc connect: Invalid argument (in socks5_connect() at socks5.c:202)
```
----
See the log (Jts/.intall4j/updater.log):
```
[INFO] com.install4j.runtime.beans.actions.control.SetVariableAction [ID 4839]: Execute action
Property script: com.install4j.script.I4jScript_Internal_62
Property variableName: updateDescriptorUrl
Property failIfNull: true
Property onlyIfUndefined: false
Property responseFileVariable: false
Property rollbackSupported: false
Variable changed: updateDescriptorUrl=https://download2.interactivebrokers.com/installers/tws/stable/tws-stable-linux-x64.xml[class java.lang.String]
Execute action successful after 3 ms
[INFO] com.install4j.runtime.beans.actions.update.CheckForUpdateAction [ID 479]: Execute action
Property connectTimeout: 10000
Property connectionFailureScript: null
Property readTimeout: 20000
Property requestHeaders: []
Property url: https://download2.interactivebrokers.com/installers/tws/stable/tws-stable-linux-x64.xml
Property variable: updateDescriptor
Property acceptAllCertificates: false
Property askForProxy: true
Property rollbackSupported: false
Property showError: true
[ERROR] com.install4j.runtime.beans.actions.update.CheckForUpdateAction [ID 479]: could not download file
java.net.ConnectException: Invalid argument (connect failed)
java.net.ConnectException: Invalid argument (connect failed)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:673)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:463)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:558)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:367)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1156)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1040)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1038)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivilegedWithCombiner(AccessController.java:782)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1037)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:162)
at com.install4j.runtime.installer.helper.content.HttpRequestHandler.getURLConnection(HttpRequestHandler.java:288)
at com.install4j.runtime.installer.helper.content.HttpRequestHandler.connect(HttpRequestHandler.java:135)
at com.install4j.runtime.installer.helper.content.Downloader.connect(Downloader.java:155)
at com.install4j.runtime.installer.helper.content.Downloader.connect(Downloader.java:24)
at com.install4j.runtime.installer.helper.content.HttpRequestHandler.connect(HttpRequestHandler.java:128)
at com.install4j.runtime.installer.helper.content.Downloader.connect(Downloader.java:150)
at com.install4j.runtime.beans.actions.update.CheckForUpdateAction.execute(CheckForUpdateAction.java:35)
at com.install4j.runtime.beans.actions.SystemInstallOrUninstallAction.install(SystemInstallOrUninstallAction.java:29)
at com.install4j.runtime.installer.ContextImpl$9.executeAction(ContextImpl.java:1727)
at com.install4j.runtime.installer.ContextImpl$9.fetchValue(ContextImpl.java:1718)
at com.install4j.runtime.installer.ContextImpl$9.fetchValue(ContextImpl.java:1715)
at com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(FetchObjectAction.java:14)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionDirect(HelperCommunication.java:271)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionInt(HelperCommunication.java:246)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionChecked(HelperCommunication.java:184)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.fetchObjectChecked(HelperCommunication.java:167)
at com.install4j.runtime.installer.ContextImpl.performActionIntStatic(ContextImpl.java:1715)
at com.install4j.runtime.installer.InstallerContextImpl.performActionInt(InstallerContextImpl.java:159)
at com.install4j.runtime.installer.ContextImpl.performAction(ContextImpl.java:1143)
at com.install4j.runtime.installer.controller.Controller.executeAction(Controller.java:398)
at com.install4j.runtime.installer.controller.Controller.executeActions(Controller.java:364)
at com.install4j.runtime.installer.controller.Controller.handleCommand(Controller.java:221)
at com.install4j.runtime.installer.controller.Controller.handleStartup(Controller.java:142)
at com.install4j.runtime.installer.controller.Controller.start(Controller.java:98)
at com.install4j.runtime.installer.Application.runApplication(Application.java:91)
at com.install4j.runtime.installer.Application.main(Application.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:85)
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:66)
at install4j.App3118837495Id443.main(Unknown Source)
Execute action not successful after 10500 ms
[INFO] Canceled
```
**Trac**:
**Username**: secureyourselfhttps://gitlab.torproject.org/legacy/trac/-/issues/33096on x64: torsocks --shell: [syscall] Unsupported syscall number 1572020-06-13T16:10:10ZTracon x64: torsocks --shell: [syscall] Unsupported syscall number 157Following the update at https://stackoverflow.com/questions/46634215/torsocks-and-unsupported-syscalls
arch is x64.
torsocks --shell warns
[syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:61...Following the update at https://stackoverflow.com/questions/46634215/torsocks-and-unsupported-syscalls
arch is x64.
torsocks --shell warns
[syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:615)
grep 157 arch/x86/entry/syscalls/syscall*tbl
syscall_32.!tbl:157 i386 sched_getscheduler sys_sched_getscheduler !__ia32_sys_sched_getscheduler
syscall_64.!tbl:157 common prctl !__x64_sys_prctl
**Trac**:
**Username**: tu8367https://gitlab.torproject.org/legacy/trac/-/issues/32953torsocks: Unsupported syscall 157 (prctl)2020-06-13T16:10:10ZTractorsocks: Unsupported syscall 157 (prctl)== Overview
I run `. torsocks on` by default and recently ran into this nuissance:
```
$ ls
1579062527 WARNING torsocks[29826]: [syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:568)
15790625...== Overview
I run `. torsocks on` by default and recently ran into this nuissance:
```
$ ls
1579062527 WARNING torsocks[29826]: [syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:568)
1579062527 WARNING torsocks[29826]: [syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:568)
1579062527 WARNING torsocks[29826]: [syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:568)
1579062527 WARNING torsocks[29826]: [syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:568)
1579062527 WARNING torsocks[29826]: [syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:568)
1579062527 WARNING torsocks[29826]: [syscall] Unsupported syscall number 157. Denying the call (in tsocks_syscall() at syscall.c:568)
foo/ bar.baz
```
== Version Info
```
$ lsb_release --all
LSB Version: 1.0
Distributor ID: VoidLinux
Description: Void Linux
Release: rolling
Codename: void
$ uname --all
Linux lang 5.4.8_1 #1 SMP PREEMPT Sun Jan 5 18:00:07 UTC 2020 x86_64 GNU/Linux
$ torsocks --version
Torsocks 2.3.0
$ ls --version
ls (GNU coreutils) 8.31
...
$ xbps-query -p pkgver libcap # see below for explanation
libcap-2.30_1
```
== Sleuthing the Cause
Grepping the linux kernel syscall table
```
$ cd path/to/kernel/git/repo/
$ grep 157 arch/x86/entry/syscalls/syscall_64.tbl
157 common prctl __x64_sys_prctl
```
So it looks like coreutils' ls is (eventually) calling prctl; indeed
```
$ strace -e prctl ls
prctl(PR_CAPBSET_READ, CAP_MAC_OVERRIDE) = 1
prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, 0x28 /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, CAP_BLOCK_SUSPEND) = 1
prctl(PR_CAPBSET_READ, 0x26 /* CAP_??? */) = -1 EINVAL (Invalid argument)
prctl(PR_CAPBSET_READ, CAP_AUDIT_READ) = 1
foo/ bar.baz
```
which correspondings nicely with the six warnings from above. The issue appeared quite recently on my machine; however, both the torsocks and coreutils I am running are not particularly new and have been running on my system for a while. Doing a little spelunking:
```
$ ldd /usr/bin/ls
linux-vdso.so.1 (0x00007ffcfb53d000)
/usr/lib/torsocks/libtorsocks.so (0x00007f1e5509e000)
libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f1e5507f000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f1e54ebc000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f1e54eb7000)
/lib/ld-linux-x86-64.so.2 (0x00007f1e550dc000)
```
libcap looks the most suspicious, and indeed, on my system it is the only library that has been recently updated:
```
$ xilog libcap-2.30
libcap-2.30_1 : 2020-01-07 09:13 JST
```
So we can be reasonably confident that a recent libcap update unearthed this potential regression.
== Comments
The security implications of `prctl` are beyond my expertise, but given that it manages capabilities, I am guessing this would not be a trivial patch. Is there any hope this could be fixed or mitigated?
**Trac**:
**Username**: eirizuhaexhttps://gitlab.torproject.org/legacy/trac/-/issues/32599ERROR: ld.so: object '/usr/lib/torsocks/libtorsocks.so' from LD_PRELOAD canno...2020-06-13T16:10:09ZTracERROR: ld.so: object '/usr/lib/torsocks/libtorsocks.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.When I run the command torsocks playonlinux, playonlinux open successfully, but when I open a game in playonlinux I get these error messages :
"ERROR: ld.so: object '/usr/lib/torsocks/libtorsocks.so' from LD_PRELOAD cannot be preloaded (...When I run the command torsocks playonlinux, playonlinux open successfully, but when I open a game in playonlinux I get these error messages :
"ERROR: ld.so: object '/usr/lib/torsocks/libtorsocks.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/usr/lib/torsocks/libtorsocks.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
1574671114 WARNING torsocks[2613]: [syscall] Unsupported syscall number 158. Denying the call (in tsocks_syscall() at syscall.c:568)
1574671122 WARNING torsocks[2626]: [syscall] Unsupported syscall number 158. Denying the call (in tsocks_syscall() at syscall.c:568)
ERROR: ld.so: object '/usr/lib/torsocks/libtorsocks.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
1574671129 WARNING torsocks[2611]: [syscall] Unsupported syscall number 234. Denying the call (in tsocks_syscall() at syscall.c:568)
1574671129 WARNING torsocks[2611]: [syscall] Unsupported syscall number 200. Denying the call (in tsocks_syscall() at syscall.c:568)"
**Trac**:
**Username**: avasvasafwfhttps://gitlab.torproject.org/legacy/trac/-/issues/32577torsocks is not fully capable of performing required downloads2020-06-13T16:10:09ZTractorsocks is not fully capable of performing required downloadsii torsocks 2.3.0-2 amd64 use SOCKS-friendly applications with Tor
using Debian 10.1.0 live
When I try to shield the necessary downloads of my coreboot firmware source compilation I get the following three types of ...ii torsocks 2.3.0-2 amd64 use SOCKS-friendly applications with Tor
using Debian 10.1.0 live
When I try to shield the necessary downloads of my coreboot firmware source compilation I get the following three types of errors:
1574449473 WARNING torsocks[13517]: [syscall] Unsupported syscall number 332. Denying the call (in tsocks_syscall() at syscall.c:605)
1574449473 WARNING torsocks[13517]: [syscall] Unsupported syscall number 293. Denying the call (in tsocks_syscall() at syscall.c:605)
1574449410 WARNING torsocks[13244]: [syscall] Unsupported syscall number 326. Denying the call (in tsocks_syscall() at syscall.c:605)
The download always hangs in some other position and I have given up to do a secure download for the darp5 firmware. This means that I will have no coreboot firmware since the main installation on my darp5 (downloads and compilation work well there) is bugged with a rootkit as detectable by https://www.elstel.org/debcheckroot/. I can not use the compilation results of a bugged machine.
model: System76 Darter Pro 5
git repository: https://github.com/system76/firmware-open
commands to execute:
torsocks git clone https://github.com/system76/firmware-open
cd firmware-open
git checkout whl-u
torsocks git submodule update --init --recursive --checkout
vim scripts/build.sh # remove +nightly from installer
torsocks scripts/deps.sh
source ?.rustup/env? - look for this command in build.sh
torsocks scripts/build.sh darp5
**Trac**:
**Username**: estellnbhttps://gitlab.torproject.org/legacy/trac/-/issues/32491Build fails with uClibc (and maybe some other non-standard libc's) sometimes2020-06-13T16:10:08ZTracBuild fails with uClibc (and maybe some other non-standard libc's) sometimesIn torsocks' configure.ac, libc_name is determined by means of ldd /usr/bin/yes which is then grepped for libc.
On a uClibc system I use, ldd /usr/bin/yes yields two entries, namely
libc.so.0 => ...
ld64-uClibc.so.0 => ...
The resulti...In torsocks' configure.ac, libc_name is determined by means of ldd /usr/bin/yes which is then grepped for libc.
On a uClibc system I use, ldd /usr/bin/yes yields two entries, namely
libc.so.0 => ...
ld64-uClibc.so.0 => ...
The resulting string begins with quotation mark, ends with quotation mark and contains newline character.
At some point during the configuration process (I have not figured out when exactly), the aforementioned string is trimmed erroneously. In my case, the first line is left out and the second one is discarded. The remaining chunk, with the opening quotation mark but without the closing one, ends up in another configuration file, producing a line like
SOME_VARIABLE="libc.so.0
without the closing quotation mark. Build cannot proceed from there.
The libc determination process thus needs to be improved.
My hotfix was to change
grep 'libc\.'
to
grep '\slibc\.'
but I can't suggest the proper solution as I'm not experienced with shell scripts. I will perform a test if provided with (a link to) a relevant standalone patch for torsocks-2.2.0 or torsocks-2.3.0.
**Trac**:
**Username**: akaterhttps://gitlab.torproject.org/legacy/trac/-/issues/31365Tor Proxy2020-06-13T16:10:08ZTracTor ProxyI am trying to use a tor proxy on mac to force all of my internet traffic through the tor network. I have followed every guide I could find online, but none of them work. when I go to https://check.torproject.org/ in when not in the tor ...I am trying to use a tor proxy on mac to force all of my internet traffic through the tor network. I have followed every guide I could find online, but none of them work. when I go to https://check.torproject.org/ in when not in the tor browser it still says I'm not connected to tor. I there a way that I can force all of my internet traffic through tor, or is it a lost cause?
**Trac**:
**Username**: EliteNoobhttps://gitlab.torproject.org/legacy/trac/-/issues/30729Possible memory leak in torsocks 2.2.02020-06-13T16:10:08ZTracPossible memory leak in torsocks 2.2.0valgrind found a possible memory leak in torsocks 2.2.0:
```
==29922== 79 bytes in 8 blocks are definitely lost in loss record 17 of 68
==29922== at 0x483579F: malloc (vg_replace_malloc.c:309)
==29922== by 0x569344A: strdup (strdu...valgrind found a possible memory leak in torsocks 2.2.0:
```
==29922== 79 bytes in 8 blocks are definitely lost in loss record 17 of 68
==29922== at 0x483579F: malloc (vg_replace_malloc.c:309)
==29922== by 0x569344A: strdup (strdup.c:42)
==29922== by 0x484D82A: utils_tokenize_ignore_comments (utils.c:146)
==29922== by 0x484CF88: parse_config_line (config-file.c:134)
==29922== by 0x484CF88: parse_config_file (config-file.c:218)
==29922== by 0x484D423: config_file_read (config-file.c:567)
==29922== by 0x484797E: init_config (torsocks.c:163)
==29922== by 0x484797E: tsocks_init (torsocks.c:328)
==29922== by 0x484DFA5: tsocks_once (compat.c:94)
==29922== by 0x400F259: call_init.part.0 (dl-init.c:72)
==29922== by 0x400F358: call_init (dl-init.c:30)
==29922== by 0x400F358: _dl_init (dl-init.c:119)
==29922== by 0x40010C9: ??? (in /lib64/ld-2.29.so)
```
**Trac**:
**Username**: adYpchttps://gitlab.torproject.org/legacy/trac/-/issues/30658Unsupported syscalls (292/dup3, 293/pipe2, 332/statx)2020-06-13T16:10:07ZTracUnsupported syscalls (292/dup3, 293/pipe2, 332/statx)I've been playing around with an torified environment via `. torsocks on`. Running a vanilla vim, torsocks complains about the mentioned syscalls:
```
$ vim -u NONE
1559028872 WARNING torsocks[6802]: [syscall] Unsupported syscall number...I've been playing around with an torified environment via `. torsocks on`. Running a vanilla vim, torsocks complains about the mentioned syscalls:
```
$ vim -u NONE
1559028872 WARNING torsocks[6802]: [syscall] Unsupported syscall number 293. Denying the call (in tsocks_syscall() at syscall.c:568)
1559028872 WARNING torsocks[6802]: [syscall] Unsupported syscall number 332. Denying the call (in tsocks_syscall() at syscall.c:568)
1559028873 WARNING torsocks[6802]: [syscall] Unsupported syscall number 292. Denying the call (in tsocks_syscall() at syscall.c:568)
```
Peeking in the linux kernel source tree, these naively look safe to me:
```
$ egrep '^(293|332|292)' arch/x86/entry/syscalls/syscall_64.tbl
292 common dup3 __x64_sys_dup3
293 common pipe2 __x64_sys_pipe2
332 common statx __x64_sys_statx
```
Does adding these to the whitelist seem reasonable?
=== Version Info
```
$ torsocks --version
Torsocks 2.3.0
$ lsb_release --all
LSB Version: 1.0
Distributor ID: VoidLinux
Description: Void Linux
Release: rolling
Codename: void
$ uname -a
Linux lang 5.0.17_1 #1 SMP PREEMPT Fri May 17 08:23:10 UTC 2019 x86_64 GNU/Linux
```
=== Notes
This is my first ticket here, so if I've commited some _faux pas_ please forgive me. Cheers!
**Trac**:
**Username**: eirizuhaexhttps://gitlab.torproject.org/legacy/trac/-/issues/29769[syscall] Unsupported syscall number 316. Denying the call (in tsocks_syscall...2020-06-13T16:10:07ZTrac[syscall] Unsupported syscall number 316. Denying the call (in tsocks_syscall() at syscall.c:615)[syscall] Unsupported syscall number 316. Denying the call (in tsocks_syscall() at syscall.c:615)
Platform is Linux x86_64, torsocks 2.3.0.
Creating a child to save entering the background.
https://filippo.io/linux-syscall-table/ doesn...[syscall] Unsupported syscall number 316. Denying the call (in tsocks_syscall() at syscall.c:615)
Platform is Linux x86_64, torsocks 2.3.0.
Creating a child to save entering the background.
https://filippo.io/linux-syscall-table/ doesn't have a #316 entry. How was #217 resolved to getdents64, #39 to getpid, and so on?
How could I avoid over striking #316 and the 2 other?
**Trac**:
**Username**: tu8367https://gitlab.torproject.org/legacy/trac/-/issues/29659WARNING torsocks[6254]: [syscall] Unsupported syscall number 39. Denying the ...2020-06-13T16:10:06ZTracWARNING torsocks[6254]: [syscall] Unsupported syscall number 39. Denying the call (in tsocks_syscall() at syscall.c:605)Following the suggestion to make a ticket at https://stackoverflow.com/questions/46634215/torsocks-and-unsupported-syscalls, which is about a non related issue:
The below warning is with torsocks 2.3.0:
WARNING torsocks[6254]: [syscall...Following the suggestion to make a ticket at https://stackoverflow.com/questions/46634215/torsocks-and-unsupported-syscalls, which is about a non related issue:
The below warning is with torsocks 2.3.0:
WARNING torsocks[6254]: [syscall] Unsupported syscall number 39. Denying the call (in tsocks_syscall() at syscall.c:605)
**Trac**:
**Username**: tu8367https://gitlab.torproject.org/legacy/trac/-/issues/29311Unsupported syscall number 427 and 180 on OS X on torsocks 2.2.02020-06-13T16:10:05ZTracUnsupported syscall number 427 and 180 on OS X on torsocks 2.2.0
OS X syscalls:
https://opensource.apple.com/source/xnu/xnu-1504.3.12/bsd/kern/syscalls.master
427 AUE_FSGETPATH ALL { user_ssize_t fsgetpath(user_addr_t buf, size_t bufsize, user_addr_t fsid, uint64_t objid) NO_SYSCALL_STUB; } { priv...
OS X syscalls:
https://opensource.apple.com/source/xnu/xnu-1504.3.12/bsd/kern/syscalls.master
427 AUE_FSGETPATH ALL { user_ssize_t fsgetpath(user_addr_t buf, size_t bufsize, user_addr_t fsid, uint64_t objid) NO_SYSCALL_STUB; } { private fsgetpath (File Manager SPI) }
180 AUE_KDEBUGTRACE ALL { int kdebug_trace(int code, int arg1, int arg2, int arg3, int arg4, int arg5) NO_SYSCALL_STUB; }
These syscalls are needed for some GUI apps.
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 180. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 180. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142743 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142744 WARNING torsocks[10364]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142744 WARNING torsocks[10364]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142744 WARNING torsocks[10365]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142744 WARNING torsocks[10365]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142744 WARNING torsocks[10365]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142745 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
1549142745 WARNING torsocks[10363]: [syscall] Unsupported syscall number 427. Denying the call (in tsocks_syscall() at syscall.c:488)
I have not tested on torsocks 2.3.0 as it doesn't build on OS X - see issue #28538
**Trac**:
**Username**: akhttps://gitlab.torproject.org/legacy/trac/-/issues/29236After updating tor to 8.0.5, socks5 started to not work2020-06-13T16:10:05ZTracAfter updating tor to 8.0.5, socks5 started to not workI usually use socks5 in Adium messenger, but when i updated tor to new version Adium start to give the error - Error: Connection failed
In tor logs i found those -
1/30/19, 20:16:31.821 [WARN] Fetching socks handshake failed. Closing.
...I usually use socks5 in Adium messenger, but when i updated tor to new version Adium start to give the error - Error: Connection failed
In tor logs i found those -
1/30/19, 20:16:31.821 [WARN] Fetching socks handshake failed. Closing.
1/30/19, 20:16:31.821 [WARN] socks5: parsing failed - invalid user/pass authentication message.
1/30/19, 20:16:31.821 [WARN] Fetching socks handshake failed. Closing.
1/30/19, 20:16:37.680 [WARN] socks5: parsing failed - invalid user/pass authentication message.
1/30/19, 20:16:37.680 [WARN] Fetching socks handshake failed. Closing.
1/30/19, 20:16:37.680 [WARN] socks5: parsing failed - invalid user/pass authentication message.
I never had this before, all have worked perfectly. Immediately after the update, everything stopped working. I tried all, i installed tor/messenger and updated os, but nothing helped.
Help!
**Trac**:
**Username**: bugiguimanDavid Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.orghttps://gitlab.torproject.org/legacy/trac/-/issues/29092Unsupported syscall number 220 (getdents64)2020-06-13T16:10:04ZtraumschuleUnsupported syscall number 220 (getdents64)Using torsocks with the patch from #28861 reportbug shows this warning:
> WARNING torsocks[7469]: [syscall] Unsupported syscall number 220. Denying the call (in tsocks_syscall() at syscall.c:568)
According to the [syscall table](https:...Using torsocks with the patch from #28861 reportbug shows this warning:
> WARNING torsocks[7469]: [syscall] Unsupported syscall number 220. Denying the call (in tsocks_syscall() at syscall.c:568)
According to the [syscall table](https://sources.debian.org/src/linux/4.9.130-2/arch/x86/entry/syscalls/syscall_32.tbl/#L229) this is
> 220 i386 getdents64 sys_getdents64 compat_sys_getdents64
I assume it wouldn't leak information over the internet, but not sure.David Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.orghttps://gitlab.torproject.org/legacy/trac/-/issues/29000Let torsocks run from source directory2020-06-13T16:10:04ZtraumschuleLet torsocks run from source directoryI don't know how complicated it is to implement, it can be handy to run torsocks from source to test patches.
src/bin/torsocks is not executable and before running 'make install' it returns:
```
$ sh src/bin/torsocks --version
ERROR: /u...I don't know how complicated it is to implement, it can be handy to run torsocks from source to test patches.
src/bin/torsocks is not executable and before running 'make install' it returns:
```
$ sh src/bin/torsocks --version
ERROR: /usr/local/lib/torsocks/libtorsocks.so does not exist! Try re-installing torsocks.
```https://gitlab.torproject.org/legacy/trac/-/issues/28999Mention dependencies in INSTALL2020-06-13T16:10:03ZtraumschuleMention dependencies in INSTALLRequirements are listed in README.md but not INSTALL.
```
Requirements
-----------------
- autoconf
- automake
- libtool
- gcc
```Requirements are listed in README.md but not INSTALL.
```
Requirements
-----------------
- autoconf
- automake
- libtool
- gcc
```https://gitlab.torproject.org/legacy/trac/-/issues/28998torsocks popcon: [syscall] Unsupported syscall number 2882020-06-13T16:10:03Ztraumschuletorsocks popcon: [syscall] Unsupported syscall number 288With torsocks 2.3 popcon gives:
```
# torsocks /etc/cron.daily/popularity-contest --crond
1546700136 WARNING torsocks[6199]: [syscall] Unsupported syscall number 288. Denying the call (in tsocks_syscall() at syscall....With torsocks 2.3 popcon gives:
```
# torsocks /etc/cron.daily/popularity-contest --crond
1546700136 WARNING torsocks[6199]: [syscall] Unsupported syscall number 288. Denying the call (in tsocks_syscall() at syscall.c:568
# torsocks --version
Torsocks 2.3.0
# uname -rmvo
4.9.0-8-686-pae #1 SMP Debian 4.9.130-2 (2018-10-27) i686 GNU/Linux
```
I assume the report is sent nevertheless because it is not reproducible calling it a second time.
This confirms that the [former warnings for syscall 250 and 204](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=801224) are gone.
https://sources.debian.org/src/linux/4.9.130-2/arch/x86/entry/syscalls/syscall_32.tbl/#L297
> 288 i386 keyctl sys_keyctl compat_sys_keyctlhttps://gitlab.torproject.org/legacy/trac/-/issues/28861torsocks: Unsupported syscall number 2172020-06-13T16:10:02ZTractorsocks: Unsupported syscall number 217% torsocks --version
Torsocks 2.3.0
% torsocks mutt
<quit>
1544962729 WARNING torsocks[21365]: [syscall] Unsupported syscall number 217. Denying the call (in tsocks_syscall() at syscall.c:568)
1544962729 WARNING torsocks[21367]: [syscal...% torsocks --version
Torsocks 2.3.0
% torsocks mutt
<quit>
1544962729 WARNING torsocks[21365]: [syscall] Unsupported syscall number 217. Denying the call (in tsocks_syscall() at syscall.c:568)
1544962729 WARNING torsocks[21367]: [syscall] Unsupported syscall number 217. Denying the call (in tsocks_syscall() at syscall.c:568)
1544962729 WARNING torsocks[21369]: [syscall] Unsupported syscall number 217. Denying the call (in tsocks_syscall() at syscall.c:568)
1544962729 WARNING torsocks[21371]: [syscall] Unsupported syscall number 217. Denying the call (in tsocks_syscall() at syscall.c:568)
1544962729 WARNING torsocks[21373]: [syscall] Unsupported syscall number 217. Denying the call (in tsocks_syscall() at syscall.c:568)
https://gitweb.torproject.org/torsocks.git/tree/src/lib/syscall.c#n567
**Trac**:
**Username**: ilfDavid Gouletdgoulet@torproject.orgDavid Gouletdgoulet@torproject.orghttps://gitlab.torproject.org/legacy/trac/-/issues/28688torsocks: Unsupported syscall errors in version 2.3.02020-06-13T16:10:01Zyurivict271torsocks: Unsupported syscall errors in version 2.3.0Copied from the downstream bug report:
```
After upgrading to torsocks-2.3.0, I get an error when using torify:
$ torify git clone https://github.com/freebsd/poudriere.git
1543787510 WARNING torsocks[25796]: [syscall] Unsupported syscal...Copied from the downstream bug report:
```
After upgrading to torsocks-2.3.0, I get an error when using torify:
$ torify git clone https://github.com/freebsd/poudriere.git
1543787510 WARNING torsocks[25796]: [syscall] Unsupported syscall number 20. Denying the call (in tsocks_syscall() at syscall.c:568)
Cloning into 'poudriere'...
1543787510 WARNING torsocks[25796]: [syscall] Unsupported syscall number 2. Denying the call (in tsocks_syscall() at syscall.c:568)
error: cannot fork() for git-remote-https: Function not implemented
The same command works with torsocks 2.2.0.
syscall number 2 is fork. There have been some changes to syscall.c which may cause this issue.
```