[Tor-BSD] OpenBSD ftp core dumps with torsocks
mmcco at mykolab.com
Fri Dec 4 14:04:11 EST 2015
Michael McConville wrote:
> George Rosamond wrote:
> > With a recent snapshot on amd64, ftp(1) is core dumping when used over
> > torsocks with:
> > ftp(7769): syscall 33 "getpw"
> > ftp is fine when *not* used over torsocks.
> > Can someone else try it out and let me know if others experience this
> > too?
> Same here.
> Strange thing is, this is when fetching via HTTP. The only getpw*()
> calls I see in the code are for determining FTP usernames.
> I don't have time to debug more at the moment, but building ftp with the
> -g flag and running it in GDB should find the offending line.
My backtrace below.
Basically, it looks like torsocks is causing its function to be executed
within the ftp process, which tries to use pwd privs. This seems like an
issue with torsocks, really - I can't think of any way for OpenBSD to
work around this.
#0 0x000013ed0dc5581a in access () at <stdin>:2
#1 0x000013ed0dc244b0 in __initdb (shadow=1) at /usr/src/lib/libc/gen/getpwent.c:930
#2 0x000013ed0dc255e8 in getpwuid_internal (uid=1000, pw=0x13ed0e07bfc0, buf=0x13ed0e07c020 "mike", buflen=1024, pwretp=0x7f7ffffd2e40, shadow=1)
#3 0x000013ed0dc256d6 in getpwuid (uid=Variable "uid" is not available.
) at /usr/src/lib/libc/gen/getpwent.c:848
#4 0x000013ed5708b709 in handle_request () from /usr/local/lib/torsocks/libtorsocks.so.0.0
#5 0x000013ed57087410 in torsocks_connect_guts () from /usr/local/lib/torsocks/libtorsocks.so.0.0
#6 0x000013eacef0fda1 in url_get (origline=0x13ecfb414300 "http://example.com/index.html", proxyenv=0x0, outfile=0x0)
#7 0x000013eacef11785 in auto_fetch (argc=1, argv=0x7f7ffffd3dc0, outfile=0x0) at /usr/src/usr.bin/ftp/fetch.c:1107
#8 0x000013eacef1a9c4 in main (argc=1, argv=0x7f7ffffd3dc0) at /usr/src/usr.bin/ftp/main.c:467
Current language: auto; currently asm
More information about the Tor-BSD