[exim-dev] [Bug 2251] Segfault when LDAP lookup does not ret…

Pàgina inicial
Delete this message
Reply to this message
Autor: admin
Data:  
A: exim-dev
Assumpte: [exim-dev] [Bug 2251] Segfault when LDAP lookup does not return a result
https://bugs.exim.org/show_bug.cgi?id=2251

--- Comment #4 from Matthew Slowe <M.Slowe@???> ---
(In reply to Jeremy Harris from comment #3)
> Thanks. Was the debug output saved, from the run first noted above?
>
> Alternatively could you run an "exim -d-all+lookup -be" test for that
> expansion, where a "no result" is expected? This could be done with your
> patch present; I'm interested in the processing done just before the
> crash point, and there's some tracepoints there which would help.


I've done both the patched and original (epel) version (which segfaults) in
case they're useful to compare :-)

# ./exim-4.90.1-2.el7.x86_64 -d-all+lookup -be
Exim version 4.90_1 uid=0 gid=0 pid=24314 D=10000
Berkeley DB: Berkeley DB 5.3.21: (May 11, 2012)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc OpenSSL
Content_Scanning DKIM DNSSEC Event OCSP PRDR TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz
dbmnz dnsdb dsearch ldap ldapdn ldapm nis nis0 nisplus passwd sqlite
Authenticators: cram_md5 cyrus_sasl dovecot gsasl plaintext spa tls
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Compiler: GCC [4.8.5 20150623 (Red Hat 4.8.5-16)]
Library version: Glibc: Compile: 2.17
                        Runtime: 2.17
Library version: OpenSSL: Compile: OpenSSL 1.0.2k-fips  26 Jan 2017
                          Runtime: OpenSSL 1.0.2k-fips  26 Jan 2017
                                 : built on: reproducible build, date
unspecified
Library version: Cyrus SASL: Compile: 2.1.26
                             Runtime: 2.1.26 [Cyrus SASL]
Library version: GNU SASL: Compile: 1.8.0
                           Runtime: 1.8.0
Library version: PCRE: Compile: 8.32
                       Runtime: 8.32 2012-11-30
Couldn't open /usr/lib64/exim/4.90.1-2.el7/lookups: not loading lookup modules
LOG: MAIN
  Couldn't open /usr/lib64/exim/4.90.1-2.el7/lookups: not loading lookup
modules


Loaded 0 lookup modules
Total 18 lookups
Library version: SQLite: Compile: 3.7.17
                         Runtime: 3.7.17
WHITELIST_D_MACROS unset
TRUSTED_CONFIG_LIST: "/etc/exim/trusted-configs"
configuration file is /etc/exim/exim.conf
log selectors = 000005fc 0c67c402
trusted user
admin user
failed to load readline: libreadline.so: cannot open shared object file: No
such file or directory

> ${lookup ldap {user=\"binddn\" pass=\"password\" ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:${quote_ldap:someuser@???})(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))}{$value}fail}@???

search_open: ldap "NULL"
search_find: file="NULL"
key="user="binddn" pass="password"
ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:someuser%40kent.ac.uk)(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))"
partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=ldap key="user="binddn" pass="password"
ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:someuser%40kent.ac.uk)(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))"
database lookup required for user="binddn" pass="password"
ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:someuser%40kent.ac.uk)(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))
LDAP parameters: user=binddn pass=password size=0 time=0 connect=0
dereference=0 referrals=on
perform_ldap_search: ldap URL =
"ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:someuser%40kent.ac.uk)(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))"
server=localhost port=389 sizelimit=0 timelimit=0 tcplimit=0
after ldap_url_parse: host=localhost port=389
ldap_initialize with URL ldap://localhost:389/
initialized for LDAP (v3) server localhost:389
LDAP_OPT_X_TLS_TRY set due to ldap:// URI
binding with user=binddn password=password
Start search
LDAP result loop
LDAP entry loop
LDAP attr loop
LDAP value loop unikentmailid:
search ended by ldap_result yielding 101
ldap_parse_result: 0
ldap_parse_result yielded 0: Success
Segmentation fault


# exim -d-all+lookup -be
Exim version 4.90_1 uid=0 gid=0 pid=24357 D=10000
Berkeley DB: Berkeley DB 5.3.21: (May 11, 2012)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc OpenSSL
Content_Scanning DKIM DNSSEC Event OCSP PRDR TCP_Fast_Open
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmjz
dbmnz dnsdb dsearch ldap ldapdn ldapm nis nis0 nisplus passwd sqlite
Authenticators: cram_md5 cyrus_sasl dovecot gsasl plaintext spa tls
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Configure owner: 0:0
Size of off_t: 8
Compiler: GCC [4.8.5 20150623 (Red Hat 4.8.5-16)]
Library version: Glibc: Compile: 2.17
                        Runtime: 2.17
Library version: OpenSSL: Compile: OpenSSL 1.0.2k-fips  26 Jan 2017
                          Runtime: OpenSSL 1.0.2k-fips  26 Jan 2017
                                 : built on: reproducible build, date
unspecified
Library version: Cyrus SASL: Compile: 2.1.26
                             Runtime: 2.1.26 [Cyrus SASL]
Library version: GNU SASL: Compile: 1.8.0
                           Runtime: 1.8.0
Library version: PCRE: Compile: 8.32
                       Runtime: 8.32 2012-11-30
Loading lookup modules from /usr/lib64/exim/4.90.1-2_kent3.el7/lookups
Loaded 0 lookup modules
Total 18 lookups
Library version: SQLite: Compile: 3.7.17
                         Runtime: 3.7.17
WHITELIST_D_MACROS unset
TRUSTED_CONFIG_LIST: "/etc/exim/trusted-configs"
configuration file is /etc/exim/exim.conf
log selectors = 000005fc 0c67c402
trusted user
admin user
failed to load readline: libreadline.so: cannot open shared object file: No
such file or directory

> ${lookup ldap {user=\"binddn\" pass=\"password\" ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:${quote_ldap:someuser@???})(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))}{$value}fail}@???

search_open: ldap "NULL"
search_find: file="NULL"
key="user="binddn" pass="password"
ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:someuser%40kent.ac.uk)(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))"
partial=-1 affix=NULL starflags=0
LRU list:
internal_search_find: file="NULL"
type=ldap key="user="binddn" pass="password"
ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:someuser%40kent.ac.uk)(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))"
database lookup required for user="binddn" pass="password"
ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:someuser%40kent.ac.uk)(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))
LDAP parameters: user=binddn pass=password size=0 time=0 connect=0
dereference=0 referrals=on
perform_ldap_search: ldap URL =
"ldap:///o=kent.ac.uk,o=uni?unikentmailid?sub?(&(objectClass=mailRecipient)(!(inetUserStatus=deleted))(mailAlternateAddress=smtp:someuser%40kent.ac.uk)(!(&(unikentmailOptinActive=*)(!(unikentmailOptinChoice=*)))))"
server=localhost port=389 sizelimit=0 timelimit=0 tcplimit=0
after ldap_url_parse: host=localhost port=389
ldap_initialize with URL ldap://localhost:389/
initialized for LDAP (v3) server localhost:389
LDAP_OPT_X_TLS_TRY set due to ldap:// URI
binding with user=binddn password=password
Start search
LDAP result loop
LDAP entry loop
LDAP attr loop
LDAP value loop unikentmailid:
search ended by ldap_result yielding 101
ldap_parse_result: 0
ldap_parse_result yielded 0: Success
lookup failed
Failed: "lookup" failed and "fail" requested

--
You are receiving this mail because:
You are on the CC list for the bug.