openssh-portable segmentation faults

Konstantin Belousov kostikbel at gmail.com
Thu Feb 7 23:28:58 UTC 2013


On Fri, Feb 08, 2013 at 12:16:40AM +0100, Dimitry Andric wrote:
> This is exactly the same problem as reported in this thread about
> the security/pam_ssh_agent_auth port (rather long, beware):
> 
>    http://lists.freebsd.org/pipermail/freebsd-stable/2013-January/071703.html
> 
> Executive summary: we recently imported a strnvis() implementation from
> NetBSD, which has differently ordered arguments from the strnvis()
> implementation in OpenBSD.  When OpenSSH calls it with arguments ordered
> in the way OpenBSD expects, the function segfaults.
> 
> I guess a similar approach as take in the above thread should be taken,
> e.g. rename the function in the port to openbsd_strnvis(), and have the
> port call that.  Or use macro trickery to swap the arguments... :)

I suggest taking a reverse approach, and rename our libc function to
e.g. NetBSD_strnvis(). This way, at least linking binaries would
result in the build-time failure. For shared libraries, we also get
some semi-helpful message from rtld which would allow to identify
the problem without obtaining the backtrace. Anyway, the porter will
see the issue cleanly.

This should be done before merging the libc changes to stable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130208/7233302f/attachment.sig>


More information about the freebsd-ports mailing list