Kimmo Paasiala
2013-Jan-16 12:05 UTC
CLANG 3.2 breaks security/pam_ssh_agent_auth on stable/9
Hello list. 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. The version I had was compiled in a releng/9.1 jail using poudriere with clang as the default compiler. I recompiled the port with the new clang3.2 compiler but no difference. Here is the backtrace from gdb when I run su(1) as root with the suitable settings to force the use of the plugin: (gdb) run Starting program: /usr/bin/su (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x0000000800ef2070 in strsvis () from /lib/libc.so.7 (gdb) bt #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 #5 0x0000000801c116f4 in pam_user_key_allowed2 () from /usr/local/lib/pam_ssh_agent_auth.so #6 0x0000000801c11f1e in pam_user_key_allowed () from /usr/local/lib/pam_ssh_agent_auth.so #7 0x0000000801c11a18 in userauth_pubkey_from_id () from /usr/local/lib/pam_ssh_agent_auth.so #8 0x0000000801c118fa in find_authorized_keys () from /usr/local/lib/pam_ssh_agent_auth.so #9 0x0000000801c122e5 in pam_sm_authenticate () from /usr/local/lib/pam_ssh_agent_auth.so #10 0x0000000800a343e0 in openpam_dispatch () from /usr/lib/libpam.so.5 #11 0x0000000800a33946 in pam_authenticate () from /usr/lib/libpam.so.5 #12 0x00000000004020b8 in ?? () #13 0x0000000000401c61 in ?? () #14 0x000000080061f000 in ?? () #15 0x0000000000000000 in ?? () The str*vis() calls suggest that it's something in the libc maybe? Regards, Kimmo Paasiala
Dimitry Andric
2013-Jan-16 16:15 UTC
CLANG 3.2 breaks security/pam_ssh_agent_auth on stable/9
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?