[sslh] OpenBSD support (1.10 throws SEGV under OpenBSD 5.0)

Walter Haidinger walter.haidinger at gmx.at
Wed Jan 11 09:39:38 CET 2012


Am 11.01.2012 08:51, schrieb Yves Rutschle:
> I need to look at your problem in more detail and probably
> find a host that provides OpenBSD shell access to look into
> it, so that'll take a little while. I know for a fact that
> people have already used sslh on OpenBSD, I don't remember
> if I had feedback on 1.10.

Do you know http://devio.us/ ?
They provide free OpenBSD shell access. 
Should be sufficient for sslh compilation/testing.

They still run 4.7 though, so a quick installation in
a virtual machine would be the better option, I think.

You can send me patches to test on OpenBSD.
 
> What you can do is compile it all with -g and comment out
> the 'strip' command in the Makefile in order to keep the
> debugging symbols, then run sslh under gdb, something like:
> 
> LD_PRELOAD=/lib/libpthread.so.0 gdb --args  ./sslh-select -v -f -u nobody -p thelonious:443 --ssh localhost:22 --ssl localhost:443
> 
> then at the gdb prompt simply type "run".
> 
> This should tell you where the segfault happen, which can
> help if I'm inspired.

Thanks.  gdb output shows:

Program received signal SIGSEGV, Segmentation fault.
[Switching to process 32723, thread 0x82129000]
0x1c00173b in main_loop (listen_sockets=0x8a3d1b80, num_addr_listen=1) at sslh-fork.c:145
145             if (!(listener_pid[i] = fork())) {

Maybe an issue with OpenBSD malloc implementation,
which is more strict than usual? 
http://en.wikipedia.org/wiki/OpenBSD_security_features#Memory_protection

Also, the return value of the malloc() call to allocate
the listener_pid[] array is not checked (line 141 of sslh-fork.c).

Regards,
Walter




More information about the sslh mailing list