Bug 2019672 (CVE-2020-25717)

Summary: CVE-2020-25717 samba: Active Directory (AD) domain user could become root on domain members
Product: [Other] Security Response Reporter: Huzaifa S. Sidhpurwala <huzaifas>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: abokovoy, anoopcs, asn, cn, dkarpele, ftrivino, gdeschner, hvyas, iboukris, ipa-maint, jarrpa, jcholast, jhrozek, jstephen, lmohanty, madam, mhjacks, michal.skrivanek, mperina, mvanderw, nobody, pfilipen, puebele, pvoborni, rcritten, rhs-smb, sbonazzo, sbose, security-response-team, ssorce, twoerner
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: samba 4.15.2, samba 4.14.10, samba 4.13.14 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the way Samba maps domain users to local users. An authenticated attacker could use this flaw to cause possible privilege escalation.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-29 13:09:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2019673, 2019674, 2019675, 2020165, 2021168, 2021169, 2021171, 2021716, 2021720, 2021783, 2021784, 2027186, 2048285    
Bug Blocks: 1976705, 2022016    

Description Huzaifa S. Sidhpurwala 2021-11-03 04:21:43 UTC
As per upstream advisory:

Windows Active Directory domains have, but default, a feature to allow users to create computer accounts, controlled by ms-DS-MachineAccountQuota.

Likewise, some (presumably trusted) users have the right to create new users or computers in Active Directory Domains, both Samba and Windows based.

When Samba, as an AD Domain member accepts a Kerberos ticket, it must map the information found therein to a local user.  This is done via
the name in the Kerberos PAC, or the name in the ticket (if there is no PAC).

Samba will attempt to find a user "DOMAIN\user" before falling back to just "user".

If the DOMAIN\user lookup can be made to fail, then a privilege escallation is possible.

Comment 4 Huzaifa S. Sidhpurwala 2021-11-10 02:51:55 UTC
Created samba tracking bugs for this issue:

Affects: fedora-all [bug 2021716]

Comment 7 Huzaifa S. Sidhpurwala 2021-11-29 04:40:08 UTC
Created freeipa tracking bugs for this issue:

Affects: fedora-all [bug 2027186]

Comment 9 errata-xmlrpc 2021-11-29 12:36:11 UTC
This issue has been addressed in the following products:

  Red Hat Gluster Storage 3.5 for RHEL 7

Via RHSA-2021:4844 https://access.redhat.com/errata/RHSA-2021:4844

Comment 10 errata-xmlrpc 2021-11-29 12:36:20 UTC
This issue has been addressed in the following products:

  Red Hat Gluster Storage 3.5 for RHEL 8

Via RHSA-2021:4843 https://access.redhat.com/errata/RHSA-2021:4843

Comment 11 Product Security DevOps Team 2021-11-29 13:09:41 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2020-25717

Comment 13 Tomas Hoger 2021-12-01 18:29:28 UTC
Upstream advisory:
https://www.samba.org/samba/security/CVE-2020-25717.html

Comment 14 errata-xmlrpc 2021-12-13 08:45:28 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:5082 https://access.redhat.com/errata/RHSA-2021:5082

Comment 15 errata-xmlrpc 2021-12-16 17:12:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2021:5192 https://access.redhat.com/errata/RHSA-2021:5192

Comment 16 errata-xmlrpc 2022-01-04 08:21:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

Via RHSA-2022:0008 https://access.redhat.com/errata/RHSA-2022:0008

Comment 17 errata-xmlrpc 2022-01-11 16:27:35 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2022:0074 https://access.redhat.com/errata/RHSA-2022:0074

Comment 18 errata-xmlrpc 2022-01-12 14:38:14 UTC
This issue has been addressed in the following products:

  Red Hat Virtualization 4 for Red Hat Enterprise Linux 8

Via RHSA-2022:0133 https://access.redhat.com/errata/RHSA-2022:0133

Comment 20 errata-xmlrpc 2022-02-07 10:46:20 UTC
This issue has been addressed in the following products:

  Red Hat Virtualization 4 for Red Hat Enterprise Linux 7

Via RHSA-2022:0443 https://access.redhat.com/errata/RHSA-2022:0443