Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-77101

In RHEL9 SELinux prevents Postfix tlsproxy from accessing TCP sockets (TLS handshake failure)

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: Generate New Ti...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • rhel-9.7
    • rhel-9.5.z
    • selinux-policy
    • None
    • selinux-policy-38.1.64-1.el9
    • No
    • Low
    • 1
    • rhel-security-selinux
    • ssg_core_services
    • 26
    • 2
    • QE ack
    • False
    • False
    • Hide

      None

      Show
      None
    • No
    • SELINUX 250827: 11
    • Hide

      The reproducer does not trigger SELinux denials. The TLS handshake operation succeeds.

      Show
      The reproducer does not trigger SELinux denials. The TLS handshake operation succeeds.
    • Pass
    • Automated
    • Release Note Not Required
    • x86_64
    • None

      What were you trying to do that didn't work?

      Trying to send emails using Postfix with TLS enabled while SELinux is in enforcing mode. The tlsproxy process fails to perform TLS handshakes with remote SMTP peers due to SELinux denials, resulting in deferred emails.
      What is the impact of this issue to you?

      This issue prevents Postfix from successfully sending emails via TLS when SELinux is in enforcing mode.

      Please provide the package NVR for which the bug is seen:

      RHEL 9:
      postfix-3.5.25-1.el9.x86_64
      selinux-policy-targeted-38.1.45-3.el9_5.noarch
      How reproducible is this bug?:

      This bug is 100% reproducible on RHEL 8.10 and RHEL 9.5 when SELinux is in enforcing mode and Postfix is configured to use TLS.

      Steps to reproduce

      Install Postfix on RHEL 8.10 or RHEL 9.5.
      Enable SELinux in enforcing mode
      Configure Postfix to use TLS for outbound connections.

      Postfix Configuration
      smtp_tls_connection_reuse = yes

      Postfix Master Configuration
      ==========================================================================

      service type private unpriv chroot wakeup maxproc command + args
      (yes) (yes) (no) (never) (100)
      ==========================================================================
      smtp inet n - n - - smtpd
      tlsproxy unix - - n - 0 tlsproxy

      Attempt to send an email using Postfix.
      Observed the following errors in the logs:
      TLS handshake failed for service=smtp.
      Cannot start TLS: handshake failure.

      Expected results

      Postfix should be able to perform TLS handshakes and send emails without SELinux denials when correctly configured.

      Actual results

      Postfix fails to perform TLS handshakes due to SELinux denials, resulting in emails being deferred with the following error:

      Cannot start TLS: handshake failure.
      SELinux logs show denials for tlsproxy attempting to perform read and write operations on TCP sockets labeled with the postfix_smtp_t context.

              rhn-support-zpytela Zdenek Pytela
              rhn-support-gpayelka Ganesh Payelkar
              Zdenek Pytela Zdenek Pytela
              Milos Malik Milos Malik
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: