Headline
CVE-2022-32744: Samba - Security Announcement Archive
A flaw was found in Samba. The KDC accepts kpasswd requests encrypted with any key known to it. By encrypting forged kpasswd requests with its own key, a user can change other users’ passwords, enabling full domain takeover.
CVE-2022-32744.html:
=========================================================== == Subject: Samba AD users can forge password change requests for == any user. == == CVE ID#: CVE-2022-32744 == == Versions: Samba 4.3 and later == == Summary: The KDC accepts kpasswd requests encrypted with any == key known to it. By encrypting forged kpasswd requests == with its own key, a user can change the passwords of == other users, enabling full domain takeover. ===========================================================
=========== Description ===========
Tickets received by the kpasswd service were decrypted without specifying that only that service’s own keys should be tried. By setting the ticket’s server name to a principal associated with their own account, or by exploiting a fallback where known keys would be tried until a suitable one was found, an attacker could have the server accept tickets encrypted with any key, including their own.
A user could thus change the password of the Administrator account and gain total control over the domain. Full loss of confidentiality and integrity would be possible, as well as of availability by denying users access to their accounts.
In addition, the kpasswd service would accept tickets encrypted by the krbtgt key of an RODC, in spite of the fact that RODCs should not have been able to authorise password changes.
================== Patch Availability ==================
Patches addressing this issue have been posted to:
https://www.samba.org/samba/security/
Additionally, Samba 4.16.4, 4.15.9, and 4.14.14 have been issued as security releases to correct the defect. Samba administrators are advised to upgrade to these releases or apply the patch as soon as possible.
================== CVSSv3 calculation ==================
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (8.8)
========== Workaround ==========
kpasswd is not a critical protocol for the AD DC in most installations, it can be disabled by setting “kpasswd port = 0” in the smb.conf.
======= Credits =======
Initial report, patches, and this advisory by Joseph Sutton of Catalyst and the Samba Team.
========================================================== == Our Code, Our Bugs, Our Responsibility. == The Samba Team ==========================================================
Related news
Gentoo Linux Security Advisory 202309-6 - Multiple vulnerabilities have been discovered in Samba, the worst of which could result in root remote code execution. Versions greater than or equal to 4.18.4 are affected.
Ubuntu Security Notice 5542-1 - It was discovered that Samba did not handle MaxQueryDuration when being used in AD DC configurations, contrary to expectations. This issue only affected Ubuntu 20.04 LTS. Luke Howard discovered that Samba incorrectly handled certain restrictions associated with changing passwords. A remote attacker being requested to change passwords could possibly use this issue to escalate privileges.