====================================================================== == Subject: Samba NDR Parsing ndr_pull_dnsp_name Heap-based Buffer == Overflow Remote Code Execution Vulnerability == == CVE ID#: CVE-2016-2123 == ZDE ID#: ZDI-CAN-3995 == == Versions: Samba 4.0.0 to 4.5.2 == == Summary: Authenicated users can supply malicious dnsRecord attributes == on DNS objects and trigger a controlled memory corruption. == ====================================================================== =========== Description =========== The Samba routine ndr_pull_dnsp_name contains an integer wrap problem, leading to an attacker-controlled memory overwrite. ndr_pull_dnsp_name parses data from the Samba Active Directory ldb database. Any user who can write to the dnsRecord attribute over LDAP can trigger this memory corruption. By default, all authenticated LDAP users can write to the dnsRecord attribute on new DNS objects. This makes the defect a remote privilege escalation. ================== Patch Availability ================== A patch addressing this defect has been posted to https://www.samba.org/samba/security/ Additionally, Samba 4.5.3, 4.4.8 and 4.3.13 have been issued as security releases to correct the defect. Samba vendors and administrators running affected versions are advised to upgrade or apply the patch as soon as possible. ========== Workaround ========== It is possible to change the ntSecurityDescriptor on DNS zones, but this will impact on the expected behaviour of the AD Domain. ======= Credits ======= This vulnerability was detected and reported to the Samba developers by Trend Micro's Zero Day Initiative and Frederic Besler.