Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41727 - -funroll-loops with openssh-3.7.1_p2-r1, openssl-0.9.7c-r1, pam_ldap-156, and nss_ldap-207-r1 causes
Summary: -funroll-loops with openssh-3.7.1_p2-r1, openssl-0.9.7c-r1, pam_ldap-156, and...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High critical
Assignee: Daniel Ahlberg (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-15 18:02 UTC by Stephen J. Butler
Modified: 2004-07-07 15:09 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen J. Butler 2004-02-15 18:02:08 UTC
After enabling LDAPS in /etc/ldap.conf, sshd crashes when a user tries to ssh in (syslog says "Feb 15 17:38:31 [sshd] Received signal 15; terminating."). Logins with the unencrypted LDAP work fine. I have the same LDAPS setup on 3 other machines, and they work fine. After recompiling multiple times, I realized my CFLAGS was different for the machine that was having problems. Removing the "-funroll-loops" and recompiling openssh, openssl, pam_ldap, and nss_ldap fixed the problem.

Reproducible: Always
Steps to Reproduce:
1. Compile openssh-3.7.1_p2-r1, openssl-0.9.7c-r1, pam_ldap-156, and nss_ldap-207-r1
2. Use the above config files.


Actual Results:  
SSH crashes when a user tries to login.

Expected Results:  
Authenticate the user.

This is the working configuration. The only difference is that "-funroll-loops"
has been removed from the CFLAGS.

--- make.conf
USE="-X -gtk2 -gtk -qt -kde -gnome apache2 -gpm ipv6 ldap pam ssl"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CXXFLAGS="${CFLAGS}"

-- ldap.conf
host ldap.local.blah
base dc=local,dc=blah
ldap_version 3
binddn cn=query,dc=local,dc=blah
bindpw apassword
rootbinddn cn=user-admin,dc=local,dc=blah
scope one
pam_filter objectClass=posixAccount
pam_login_attribute cn
pam_groupdn cn=machine,dc=local,dc=blah
pam_password exop
nss_base_passwd		ou=users,dc=local,dc=blah?one
nss_base_shadow		ou=users,dc=local,dc=blah?one
nss_base_group		ou=groups,dc=local,dc=blah?one
ssl start_tls
ssl on
tls_checkpeer yes
tls_cacertfile /etc/ssl/certs/ca.pem
tls_cacertdir /etc/ssl/certs

-- nsswitch.conf
passwd:      compat ldap
shadow:      compat ldap
group:       compat ldap
hosts:       files dns
networks:    files dns
services:    db files
protocols:   db files
rpc:         db files
ethers:      db files
netmasks:    files
netgroup:    files
bootparams:  files
automount:   files
aliases:     files

-- sshd_config
PermitRootLogin no
UsePAM yes
AllowTcpForwarding yes
X11Forwarding yes
UsePrivilegeSeparation yes
Subsystem	sftp	/usr/lib/misc/sftp-server

-- emerge info
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.24)
=================================================================
System uname: 2.4.24 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /opt/tomcat/conf /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 apm arts avi berkdb crypt cups encode foomaticdb gdbm gif imlib
ipv6 java jpeg ldap libg++ libwww mad mikmod motif mpeg mysql ncurses nls
oggvorbis opengl oss pam pdflib perl png python quicktime readline sdl slang
spell ssl svga tcpd truetype x86 xml2 xmms xv zlib"
Comment 1 Daniel Ahlberg (RETIRED) gentoo-dev 2004-02-20 11:38:13 UTC
I've updated the openssh ebuild, please re-emerge and check if it still crashes. If it still does we'll have to move on to the next package in line.
Comment 2 Geoffrey Giesemann 2004-06-15 01:25:19 UTC
I'm using the 3.8.1_p1-r1 ebuild for openssh and while the program compiles fine with -funroll-loops it suffers from several major runtime bugs such as:

-Unable to negotiate authentication for connections
-Unable to retrieve host keys (StrictHostKeyChecking acts like `yes' when set to `ask')

I should note that I'm not using LDAP at all.
Comment 3 Geoffrey Giesemann 2004-06-15 07:54:14 UTC
Hurr

-Unable to negotiate authentication connections 

isn't a openssh issue at all (see bug #53292)

My bad :(
Comment 4 Jeffrey Crawford 2004-07-07 15:09:21 UTC
I can confirm that this problem also shows up when using saslauthd -a pam. It looks like the problem went away after I recompiled pam and pam_ldap taking out -funroll-loops from CFLAGS.