Date: Fri, 8 Feb 2013 01:28:53 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Dimitry Andric <dim@FreeBSD.org> Cc: ports@FreeBSD.org, Brooks Davis <brooks@freebsd.org>, Bryan Drewery <bdrewery@FreeBSD.org>, Dewayne Geraghty <dewayne.geraghty@heuristicsystems.com.au> Subject: Re: openssh-portable segmentation faults Message-ID: <20130207232853.GO2522@kib.kiev.ua> In-Reply-To: <511435D8.8000900@FreeBSD.org> References: <67A39057348F4D1BA43004DB5F0E8DBB@white> <5113B343.303@FreeBSD.org> <CD64A9A7097A415CB05541C9032576D1@white> <511435D8.8000900@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--9NVRigxxFWKr+7wv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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): >=20 > http://lists.freebsd.org/pipermail/freebsd-stable/2013-January/071703.= html >=20 > 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. >=20 > 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. --9NVRigxxFWKr+7wv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRFDi0AAoJEJDCuSvBvK1BpsAP/03Dn8ifrlfBdLCxwt8ZWAWb g9pAWy43TQpdMuzqB4yvzzVtanS3yY1G1wKtaC07KUnY1sLD0toqMcVTaelqmbMF AJ0716a/2VqntrHuOWNp0yLrqCmigw3tFk1UjQTWdYqeFLjzY+jWK5A9ot/C5QFS DQwQtSpuOr6zPdxtogpwbxAXHAuOuiJkMBxhXfBIu9xhet9o1XZcBlDjT2HA+IXu 6zGJLURcB88joPUYYuauLtpjoX6JMUrvga1haPVxSghS4oXxEYdDWH9fgK/+L1l3 qwk+diSasMQr0Gw2ATqubUF/tV82DnZJLVAyf4ft3HsUjsUrOkU+WXglKxD/imj+ Zt7wvG1qGhhJq4dyuZVdVCGaO2RKZgxuW2cbC3Tm2Ows1/mj0q99WwQS7PLfwx/j ESUiuNz0QTT91bGCxrG0tRomrNDTWRMyHZQ0p1NhyUWWQDMpx/uDD8YTuBglaxjw qwsV/VFL6mvkooGNP5Nzr6xmYsm52bOVg3NwLuuCB6UPBWZNdoyaiVuXxKQWFY6z vquqDHl35kZPQpTxvoiEnTU6sVIR03auyfRurIu+fwKrSTdDec+TFtF0clSDODG/ HG2J6I4CJtHvuFEJI7ijBtmub3xbDK5PYjL+2IuUiyuFLoD6l4JxmD0aOzpPQWZt A0bn8/GTZqbgLjI+kVFK =JFy2 -----END PGP SIGNATURE----- --9NVRigxxFWKr+7wv--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130207232853.GO2522>