Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
We currently have these types or certificates:
# seinfo -xa cert_type
Type Attributes: 1
attribute cert_type;
cert_t
dovecot_cert_t
fwupd_cert_t
home_cert_t (not in rhel8)
ipa_cert_t (in ipa-selinux)
pki_tomcat_cert_t
slapd_cert_t
Hi Renaud,
please can you reproduce the scenario again and attach here full AVC's messages in permissive mode?
Steps to enable full auditing and permissive SELinux mode:
1) Open the /etc/audit/rules.d/audit.rules file in an editor.
2) Remove the following line if it exists:
-a task,never
3) Add the following line to the end of the file:
-w /etc/shadow -p w
4) Restart the audit daemon:
# service auditd restart
5) Open the /etc/selinux/config file in an editor.
change line
SELINUX=enforcing
to
SELINUX=permissive
6) Re-run your scenario
7) Collect AVC denials:
# ausearch -i -m avc,user_avc,selinux_err,user_selinux_err -ts today
Thank you,
Patrik
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 (selinux-policy bug fix and enhancement update), 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-2022:1995
Description of problem: When configuring smtpd to use certs stored in dovecot's certs directory, the following AVCs are seen: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- type=PROCTITLE msg=audit(01/19/2022 17:27:01.181:7173515) : proctitle=smtpd -n smtps -t inet -u -o stress= -o syslog_name=postfix/smtps -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes -o type=SYSCALL msg=audit(01/19/2022 17:27:01.181:7173515) : arch=x86_64 syscall=openat success=no exit=EACCES(Permission denied) a0=0xffffff9c a1=0x56000dcbef00 a2=O_RDONLY a3=0x0 items=0 ppid=1870242 pid=1914640 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=smtpd exe=/usr/libexec/postfix/smtpd subj=system_u:system_r:postfix_smtpd_t:s0 key=(null) type=AVC msg=audit(01/19/2022 17:27:01.181:7173515) : avc: denied { search } for pid=1914640 comm=smtpd name=dovecot dev="dm-0" ino=67970523 scontext=system_u:system_r:postfix_smtpd_t:s0 tcontext=system_u:object_r:dovecot_cert_t:s0 tclass=dir permissive=0 ... -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- audit2allow shows: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- #============= postfix_smtpd_t ============== allow postfix_smtpd_t dovecot_cert_t:dir search; allow postfix_smtpd_t dovecot_cert_t:file getattr; -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- This happens because postfix policy only have this: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- miscfiles_read_generic_certs(postfix_domain) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- which ends up reading cert_t stuff only. I think it's harmless to allow postfix from reading all kind of certs, something like this: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- miscfiles_read_all_certs(postfix_domain) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Version-Release number of selected component (if applicable): selinux-policy-3.14.3-80.el8_5.2.noarch How reproducible: Always Steps to Reproduce: 1. Configure postfix for TLS usage and store certs in dovecot dir /etc/postfix/main.cf: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- smtpd_tls_cert_file = /etc/pki/dovecot/certs/some.cert smtpd_tls_key_file = /etc/pki/dovecot/certs/some.key -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Actual results: AVCs above. Expected results: No AVC Additional info: If allowing all certs is too much from security perspective, then an attribute for "mailer certs" should be created instead. For now dovecot_cert_t registered through "miscfiles_cert_type(dovecot_cert_t)"