sendmail queue runner dies due to an assertion violation in libldap
Environment
- Red Hat Enterprise Linux (RHEL) 6.3
- sendmail-8.14.4-8.el6.x86_64
- openldap-2.4.23-26.el6.x86_64
Issue
Sendmail
's queue runner may die when running its mail queue. The seems to happen when connecting to mail relays that don't respond or take to long to respond to ESMTP
commands.
This leads to a situation where the mail queue runner is no longer running and the queued mails no longer sent.
Here is a trace of a sendmail
queue runner executed by hand on a mail queue containing one mail for which the issue happens.
# /usr/lib/sendmail -v
...
250 Requested mail action okay, completed
>>> DATA
MAILER-DAEMON... aliased to root@example.com
./q5QC4MdE005993 example.com.: client DATA 354: ../../../libraries/libldap/error.c:255: ldap_parse_result: Assertion `r != ((void *)0)' failed.
Abandon
As you can see sendmail
's execution ends after a assertion violation in the ldap_parse_result
function (libldap
).
For your information example.com
doesn't respond to the DATA
command and the connection gets closed after a few minutes.
Sendmail
opened a connection to our LDAP
server at the begining of the SMTP
transaction. This LDAP
connection may have timed out before the SMTP
connection.
It may be sendmail
's fault not taking care of ldap_search
's return code before calling ldap_parse_result
. Anyway, ldap_parse_result
should not trigger an assertion that terminates the caller but should instead return an error code.
Resolution
Update sendmail
to version sendmail-8.14.4-9.el6
released with Advisory RHBA-2015:1299-3 or newer.
Root Cause
The sendmail
queue runner could previously terminate unexpectedly under
certain circumstances. Consequently, sendmail
stopped processing the mail queue.
This update introduces a fix that prevents the source code from triggering an
assertion in the OpenLDAP
code when the connection to an LDAP
server is lost
while making a query. As a result, the assertion no longer causes the queue
runner to terminate, and sendmail
continues processing the mail queue as
expected.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments