As per upstream advisory: S4U2Self is an extension to Kerberos used in Active Directory to allow a service to request a kerberos ticket to itself from the Kerberos Key Distribution Center (KDC) for a non-Kerberos authenticated user (principal in Kerboros parlance). This is useful to allow internal code paths to be standardized around Kerberos. S4U2Proxy (constrained-delegation) is an extension of this mechanism allowing this impersonation to a second service over the network. It allows a privileged server that obtained a S4U2Self ticket to itself to then assert the identity of that principal to a second service and present itself as that principal to get services from the second service. There is a flaw in Samba's AD DC in the Heimdal KDC. When the Heimdal KDC checks the checksum that is placed on the S4U2Self packet by the server to protect the requested principal against modification, it does not confirm that the checksum algorithm that protects the user name (principal) in the request is keyed. This allows a man-in-the-middle attacker who can intercept the request to the KDC to modify the packet by replacing the user name (principal) in the request with any desired user name (principal) that exists in the KDC and replace the checksum protecting that name with a CRC32 checksum (which requires no prior knowledge to compute). This would allow a S4U2Self ticket requested on behalf of user name (principal) user to any service to be changed to a S4U2Self ticket with a user name (principal) of Administrator. This ticket would then contain the PAC of the modified user name (principal).
Acknowledgments: Name: Isaac Boukris and Andrew Bartlett (Samba Team and Catalyst)
Upstream bug: https://bugzilla.samba.org/show_bug.cgi?id=13685
Doing unembargo: This issue has been made public today(14/05/2019). https://www.samba.org/samba/history/security.html https://www.samba.org/samba/security/CVE-2018-16860.html
Created heimdal tracking bugs for this issue: Affects: fedora-all [bug 1709680] Created samba tracking bugs for this issue: Affects: fedora-all [bug 1709679]
Created heimdal tracking bugs for this issue: Affects: epel-all [bug 1709681]
External References: https://www.samba.org/samba/security/CVE-2018-16860.html
Hello - could someone explain why this is "NOTABUG" on RHEL and there is not a new Samba release being developed at RH to address this? There is no explanation in this ticket/issue or at any of the links in this ticket/issue. The official Red Hat statement (https://access.redhat.com/security/cve/cve-2018-16860) on this CVE is similarly vague and just says "RHEL 7 not affected". Our security compliance team requires more information from us, ideally, than "RH says its Samba is not affected. No reason why." I told them that RHEL Samba links to MIT Kerberos not Heimdal and that *might* be the reasoning for it not being a bug in RHEL, but admitted I was just guessing... Any further info would be very much appreciated.
Jeff, we are not shipping a Heimdal KDC for or with Samba at all in any Red Hat product. We do build Samba's AD DC components only in Fedora and even there in Fedora we use a MIT Kerberos KDC, not the Heimdal KDC which is coming along with the Samba tarballs. Thus a flaw in the S4U2SELF implementation in a Heimdal KDC does not affect us at all.