From owner-freebsd-stable@FreeBSD.ORG Thu Jan 17 03:49:55 2013 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C1CDA5A7; Thu, 17 Jan 2013 03:49:55 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-wg0-f46.google.com (mail-wg0-f46.google.com [74.125.82.46]) by mx1.freebsd.org (Postfix) with ESMTP id F36067E9; Thu, 17 Jan 2013 03:49:54 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id dr13so1318842wgb.1 for ; Wed, 16 Jan 2013 19:49:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=TBE02La1pyJPbELoCqCtAXLJu0mZRVeUfdHJP/KrmQA=; b=khyp63ZYF2KnBLcEJngFlfeFRdLM5jHNRHQO07RZXk22+OI2K/j8E+dGC0pfTU4V0v 9vRO3A7GaBKefbI/s/yB5f74Du4JQA1X3kUynfcbpjIm4GXC88rhQx+wtC5C8xdgH6/H g6ah1dmy1qPRDoVdHgzyG8czNT0Ego9Pe1NUwEAhEyae1zCt12reuzYnXGI3lIIA3o85 aesh8bVOzDQlVWUoNNGK3JQqt9MJwybr1Gv8Xxlh7rjctCAc74QTtLOcMUszW68jfA39 +4A0mpF6iDI0nrJ8iQjSiyHHVx/WBEh6qalTjNpbr0gBCESR2R+w/bR/fSEuejbZZPmv iPFg== MIME-Version: 1.0 X-Received: by 10.180.93.133 with SMTP id cu5mr13300454wib.32.1358394588417; Wed, 16 Jan 2013 19:49:48 -0800 (PST) Received: by 10.216.172.197 with HTTP; Wed, 16 Jan 2013 19:49:48 -0800 (PST) In-Reply-To: <20130117001116.GD29437@lor.one-eyed-alien.net> References: <50F6D20A.6070306@FreeBSD.org> <20130117001116.GD29437@lor.one-eyed-alien.net> Date: Thu, 17 Jan 2013 05:49:48 +0200 Message-ID: Subject: Re: CLANG 3.2 breaks security/pam_ssh_agent_auth on stable/9 From: Kimmo Paasiala To: Brooks Davis Content-Type: text/plain; charset=UTF-8 Cc: freebsd-stable@freebsd.org, Dimitry Andric X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jan 2013 03:49:55 -0000 On Thu, Jan 17, 2013 at 2:11 AM, Brooks Davis wrote: > On Wed, Jan 16, 2013 at 08:01:00PM +0200, Kimmo Paasiala wrote: >> On Wed, Jan 16, 2013 at 6:15 PM, Dimitry Andric wrote: >> > On 2013-01-16 13:05, Kimmo Paasiala wrote: >> >> >> >> I just updated my stable/9 system after clang3.2 was added. My system >> >> is amd64, both world and kernel are compiled with clang3.2 and the >> >> default compiler is clang. I'm tracking the sources with GIT and the >> >> version I have corresponds to SVN revision r245451. >> >> >> >> Everything else seems to work but the pam authentication module >> >> security/pam_ssh_agent_auth segfaults immediately. >> > >> > ... >> > >> >> #0 0x0000000800ef2070 in strsvis () from /lib/libc.so.7 >> >> #1 0x0000000800ef2584 in strvis () from /lib/libc.so.7 >> >> #2 0x0000000800ef25e5 in strnvis () from /lib/libc.so.7 >> >> #3 0x0000000801c0e2e7 in do_log () from >> >> /usr/local/lib/pam_ssh_agent_auth.so >> >> #4 0x0000000801c0e4ff in logit () from >> >> /usr/local/lib/pam_ssh_agent_auth.so >> > >> > ... >> > >> >> The str*vis() calls suggest that it's something in the libc maybe? >> > >> > >> > Brooks merged the new strvis implementations in r245439, so you may have >> > run into a bug with them. I don't think this is caused specifically by >> > clang, at least not without more proof. :-) >> > >> > Can you try reverting to the revision just before r245439, rebuilding >> > and reinstalling at least libc, and see if the pam_ssh_agent_auth crash >> > goes away? >> >> I'm rebuilding world now. Took me some time to figure out how to >> revert the commits in git. I'll report back once finished. > > NetBSD and OpenBSD use different signatures for strnvis(). :( > pam_ssh_agent_auth assumes that if the system has one it is the OpenBSD > one but ours is the NetBSD one. The port will need to be patched to use > the openbsd version like it was doing or to swap the second and third > arguments when build on newer versions of FreeBSD. > > -- Brooks Doesn't the change to strnvis() break the ABI on FreeBSD 9.X? I thought you could always compile a binary on an earlier version of FreeBSD 9.X and trust it to work without recompiling on any later minor version of the same major version line. (dynamic link libraries that are from ports excluded of course) -Kimmo