Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186728 - app-admin/sudo segfaults with USE="ldap"
Summary: app-admin/sudo segfaults with USE="ldap"
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Gentoo LDAP project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-26 20:41 UTC by Michael Hanselmann (hansmi) (RETIRED)
Modified: 2009-04-08 17:40 UTC (History)
4 users (show)

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 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2007-07-26 20:41:43 UTC
I've a somewhat special problem with app-admin/sudo compiled with USE="ldap": it segfaults after retrieving the first LDAP entry, but only when compiled with a hardened gcc. It doesn't segfault when using the vanilla gcc profile or when I enter a wrong password in ldap.conf.sudo, therefore causing authentication to fail. gdb isn't exactly helpful on binaries compiled with a hardened gcc, therefore I can't give a backtrace. If you need more information, please let me know.

# sudo
LDAP Config Summary
===================
uri          ldap://127.0.0.1
ldap_version 3
sudoers_base ou=sudoers,dc=example,dc=com
binddn       cn=sudoers,ou=meta,dc=example,dc=com
bindpw       password
bind_timelimit  5
timelimit    5
ssl          (no)
===================
ldap_set_option(LDAP_OPT_TIMELIMIT,0x05)
setting bind_timelimit to 5
ldap_initialize(ld,ldap://127.0.0.1)
ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,0x03)
ldap_bind() ok
found:cn=defaults,ou=sudoers,dc=example,dc=com
Segmentation fault

# emerge --info
Portage 2.1.2.9 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.5-r3, 2.6.21.5 x86_64)
=================================================================
System uname: 2.6.21.5 x86_64 Dual-Core AMD Opteron(tm) Processor 2216 HE
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-mtune=k8 -O2 -pipe -fforce-addr"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-mtune=k8 -O2 -pipe -fforce-addr"
Comment 1 Polarina 2007-07-27 17:28:33 UTC
Exchanging memory and processors with me should fix this. :P
Comment 2 Michael Hanselmann (hansmi) (RETIRED) gentoo-dev 2007-08-25 21:47:20 UTC
Ping, any progress on this? I want to use sudo with LDAP support for backups.
Comment 3 Markus Ullmann (RETIRED) gentoo-dev 2008-04-21 20:47:22 UTC
works fine on my box

Portage 2.1.5_rc5 (hardened/x86/2.6, gcc-3.4.6, glibc-2.7-r2, 2.6.20-hardened i686)
=================================================================
System uname: 2.6.20-hardened i686 Intel(R) Pentium(R) 4 CPU 2.66GHz
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-08 17:40:53 UTC
Please reopen if this is still a problem with 1.7.1_rc1 or later.