Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1406887 - auditd validate_email uses incorrect/obsolete gethostbyname
auditd validate_email uses incorrect/obsolete gethostbyname
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: audit (Show other bugs)
7.3
Unspecified Linux
medium Severity medium
: rc
: ---
Assigned To: Steve Grubb
Ondrej Moriš
:
Depends On:
Blocks: 1476406
  Show dependency treegraph
 
Reported: 2016-12-21 13:29 EST by Scott Nicholas
Modified: 2018-04-10 08:20 EDT (History)
3 users (show)

See Also:
Fixed In Version: audit-2.7.8
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 08:18:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0760 None None None 2018-04-10 08:20 EDT

  None (edit)
Description Scott Nicholas 2016-12-21 13:29:57 EST
Description of problem:
auditd fails to start with:
 auditd[3156]: validate_email: failed looking up host for nsoc.health.mil

Version-Release number of selected component (if applicable):

# auditctl -v
auditctl version 2.6.5


How reproducible:
Setup auditd with a action_mail_acct to domain without A record

Steps to Reproduce:
1. "action_mail_acct = user@example.com" in /etc/audit/auditd.conf
2. start auditd

Actual results:
auditd fails to start

Expected results:
auditd starts

Additional info:
Comment 2 David Jones 2017-05-19 09:45:52 EDT
For me, auditd starts, but issues warning message when running aureport.
Comment 3 Steve Grubb 2017-06-22 23:11:16 EDT
Added option to disable domain name checking in upstream commit 95d8141.
Comment 4 Steve Grubb 2017-09-20 11:01:42 EDT
Built audit-2.7.8 to address this issue.
Comment 6 Ondrej Moriš 2017-11-30 13:38:49 EST
Successfully reproduced and verified on all supported architectures (x86_64, ppc64, ppc64le and s390x for RHEL and ppc64le and aarch64 for RHEL-ALT).

OLD (audit-2.7.6-3.el7)
=======================
* No verify-email option in config.
* action_mail_acct = a@redhat.xxxxx

# service auditd restart
# systemctl status auditd -f -n 100

...
Nov 30 15:58:15 XXX auditd[10800]: validate_email: failed looking up host for redhat.xxxxx

Auditd service running, only warning message.

NEW (audit-2.8.1-2.el7)
=======================
* verify-email = no
* action_mail_acct = a@redhat.xxxxx

# service auditd restart
# systemctl status auditd -f -n 100

Nov 30 16:03:06 XXX systemd[1]: Starting Security Auditing Service...
... 
<no warning message> 
...
Nov 30 16:03:06 XXX systemd[1]: Started Security Auditing Service.

Moreover I have verified that all setting of verify_email option (including default) work as expected.

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: verify_email unspecified (default = yes)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Non-existing domain
:: [   PASS   ] :: Command 'sed -i '/verify_email/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'sed -i '/action_mail_acct/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'action_mail_acct = a@redhat.xxxxx' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service auditd start && sleep 10' (Expected 0, got 0)
:: [   PASS   ] :: Command 'systemctl status auditd -f -n 100' (Expected 0, got 0)
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.1x5C4J1W' should contain 'validate_email: failed' 
:: [   PASS   ] :: Command 'service auditd stop && sleep 10' (Expected 0, got 0)
:: [   LOG    ] :: Existing domain
:: [   PASS   ] :: Command 'sed -i '/verify_email/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'sed -i '/action_mail_acct/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'action_mail_acct = a@redhat.com' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service auditd start && sleep 10' (Expected 0, got 0)
:: [   PASS   ] :: Command 'systemctl status auditd -f -n 100' (Expected 0, got 0)
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.oinwnm7i' should not contain 'validate_email: failed' 
:: [   PASS   ] :: Command 'service auditd stop && sleep 10' (Expected 0, got 0)
:: [   LOG    ] :: Duration: 42s
:: [   LOG    ] :: Assertions: 15 good, 0 bad
:: [   PASS   ] :: RESULT: verify_email unspecified (default = yes)

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: verify_email = no
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Non-existing domain
:: [   PASS   ] :: Command 'sed -i '/verify_email/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'sed -i '/action_mail_acct/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'verify_email = no' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'action_mail_acct = a@redhat.xxxxx' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service auditd start && sleep 10' (Expected 0, got 0)
:: [   PASS   ] :: Command 'systemctl status auditd -f -n 100' (Expected 0, got 0)
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.qpL7j0Zz' should not contain 'validate_email: failed' 
:: [   PASS   ] :: Command 'service auditd stop && sleep 10' (Expected 0, got 0)
:: [   LOG    ] :: Existing domain
:: [   PASS   ] :: Command 'sed -i '/verify_email/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'sed -i '/action_mail_acct/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'verify_email = no' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'action_mail_acct = a@redhat.com' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service auditd start && sleep 10' (Expected 0, got 0)
:: [   PASS   ] :: Command 'systemctl status auditd -f -n 100' (Expected 0, got 0)
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.NDyvVBDt' should not contain 'validate_email: failed' 
:: [   PASS   ] :: Command 'service auditd stop && sleep 10' (Expected 0, got 0)
:: [   LOG    ] :: Duration: 42s
:: [   LOG    ] :: Assertions: 16 good, 0 bad
:: [   PASS   ] :: RESULT: verify_email = no

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: verify_email = yes
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   LOG    ] :: Non-existing domain
:: [   PASS   ] :: Command 'sed -i '/verify_email/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'sed -i '/action_mail_acct/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'verify_email = yes' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'action_mail_acct = a@redhat.xxxxx' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service auditd start && sleep 10' (Expected 0, got 0)
:: [   PASS   ] :: Command 'systemctl status auditd -f -n 100' (Expected 0, got 0)
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.bBTyXsJK' should contain 'validate_email: failed' 
:: [   PASS   ] :: Command 'service auditd stop && sleep 10' (Expected 0, got 0)
:: [   LOG    ] :: Existing domain
:: [   PASS   ] :: Command 'sed -i '/verify_email/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'sed -i '/action_mail_acct/d' /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'verify_email = yes' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'echo 'action_mail_acct = a@redhat.com' >> /etc/audit/auditd.conf' (Expected 0, got 0)
:: [   PASS   ] :: Command 'service auditd start && sleep 10' (Expected 0, got 0)
:: [   PASS   ] :: Command 'systemctl status auditd -f -n 100' (Expected 0, got 0)
:: [   PASS   ] :: File '/var/tmp/rlRun_LOG.xsPOUOTU' should not contain 'validate_email: failed' 
:: [   PASS   ] :: Command 'service auditd stop && sleep 10' (Expected 0, got 0)
:: [   LOG    ] :: Duration: 42s
:: [   LOG    ] :: Assertions: 16 good, 0 bad
:: [   PASS   ] :: RESULT: verify_email = yes
Comment 9 errata-xmlrpc 2018-04-10 08:18:47 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0760

Note You need to log in before you can comment on or make changes to this bug.