RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1212582 - smartd file descriptor leak when calling mailx binary (catched by SELinux)
Summary: smartd file descriptor leak when calling mailx binary (catched by SELinux)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: smartmontools
Version: 7.1
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: Jan Ščotka
URL:
Whiteboard:
Depends On:
Blocks: 1305230
TreeView+ depends on / blocked
 
Reported: 2015-04-16 17:28 UTC by Robert Scheck
Modified: 2019-12-16 04:43 UTC (History)
7 users (show)

Fixed In Version: smartmontools-6.2-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 04:24:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2348 0 normal SHIPPED_LIVE smartmontools bug fix update 2016-11-03 13:47:32 UTC

Description Robert Scheck 2015-04-16 17:28:24 UTC
Description of problem:
type=AVC msg=audit(1429126124.404:28485): avc:  denied  { read write } for  pid=34885 comm="mail" path="/dev/megaraid_sas_ioctl_node" dev="devtmpfs" ino=26517 scontext=system_u:system_r:system_mail_t:s0 tcontext=system_u:object_r:fixed_disk_device_t:s0 tclass=chr_file
type=SYSCALL msg=audit(1429126124.404:28485): arch=c000003e syscall=59 success=yes exit=0 a0=1ad2940 a1=1ad0580 a2=1ad1510 a3=7fff3db58490 items=0 ppid=34884 pid=34885 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="mail" exe="/usr/bin/mailx" subj=system_u:system_r:system_mail_t:s0 key=(null)

Above AVC denied happens if you have a Dell PERC controller (e.g. Dell PERC
H710 in a Dell PowerEdge R720). /etc/smartmontools/smartd.conf needs to be
configured accordingly. If you have SAS drives, use this:

  /dev/sda -d megaraid,0 -a -m root -W 5,5,5

Be sure that you replace the above "0" with the SAS ID your controller uses.
If you have SATA drives, use this:

  /dev/sdb -d sat+megaraid,2 -a -m root -W 5,5,5

Be sure that you replace the above "2" with the SATA ID your controller uses.

Run "systemctl restart smartd.service" - and the AVC denied above will show
up in the logs - the e-mail is however sent even this is denied (enforcing).
Note: I am aware, that "-W 5,5,5" is stupid nonsense, but it triggers really
an event ;-)

Version-Release number of selected component (if applicable):
smartmontools-6.2-4.el7.x86_64
selinux-policy-targeted-3.13.1-23.el7.noarch

How reproducible:
Everytime, see above.

Actual results:
smartd file descriptor leak when calling mailx binary (catched by SELinux)

Expected results:
No smartd file descriptor leak when calling mailx binary.

Additional info:
I guess this is a file descriptor leak, but I might be wrong. However this
is IMHO a bug in the smartd binary and not in the SELinux policy. If there
is need to workaround this in SELinux this should be dontaudit'ed.

Comment 1 Robert Scheck 2015-04-16 17:30:20 UTC
Cross-filed case #01432022 on the Red Hat customer portal.

Comment 4 Christian Franke 2015-04-26 19:14:25 UTC
Already fixed upstream:
http://www.smartmontools.org/changeset/4023
Fix will be included it upcoming smartmontools 6.4.

Comment 12 errata-xmlrpc 2016-11-04 04:24:56 UTC
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://rhn.redhat.com/errata/RHBA-2016-2348.html


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