// For flags

CVE-2016-2123

Samba NDR Parsing ndr_pull_dnsp_name Heap-based Buffer Overflow Remote Code Execution Vulnerability

Severity Score

8.8
*CVSS v3.1

Exploit Likelihood

*EPSS

Affected Versions

*CPE

Public Exploits

0
*Multiple Sources

Exploited in Wild

-
*KEV

Decision

-
*SSVC
Descriptions

A flaw was found in samba versions 4.0.0 to 4.5.2. 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.

Se ha encontrado un error en Samba, de la versiĆ³n 4.0.0 a la 4.5.2. La rutina de Samba ndr_pull_dnsp_name contiene un problema de envoltorio de enteros que conduce a una sobrescritura de memoria controlada por el atacante. ndr_pull_dnsp_name analiza datos de la base de datos ldb Samba Active Directory. Cualquier usuario que pueda escribir en el atributo dnsRecord mediante LDAP puede desencadenar esta corrupciĆ³n de memoria. Por defecto, todos los usuarios LDAP autenticados pueden escribir en el atributo dnsRecord en nuevos objetos DNS. Esto provoca un escalado de privilegios remotos.

This vulnerability allows remote attackers to execute arbitrary code on vulnerable installations of Samba. Authentication is not required to exploit this vulnerability.
The specific flaw exists within the handling of NDR data. The issue results from the lack of proper validation of the length of user-supplied data prior to copying it to a heap-based buffer. An attacker can leverage this vulnerability to execute code under the context of current process.

*Credits: c4c1234757b4f1e468a29d480d78f21bFrederic Beslerc692f9f0933f03c265e4c9e2bcc3bb28
CVSS Scores
Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
Attack Vector
Network
Attack Complexity
Low
Authentication
Single
Confidentiality
Partial
Integrity
Partial
Availability
Partial
Attack Vector
Network
Attack Complexity
Medium
Authentication
None
Confidentiality
Partial
Integrity
Partial
Availability
Partial
* Common Vulnerability Scoring System
SSVC
  • Decision:-
Exploitation
-
Automatable
-
Tech. Impact
-
* Organization's Worst-case Scenario
Timeline
  • 2016-01-29 CVE Reserved
  • 2016-12-19 CVE Published
  • 2024-07-17 EPSS Updated
  • 2024-08-05 CVE Updated
  • ---------- Exploited in Wild
  • ---------- KEV Due Date
  • ---------- First Exploit
CWE
  • CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer
  • CWE-122: Heap-based Buffer Overflow
CAPEC
Affected Vendors, Products, and Versions
Vendor Product Version Other Status
Vendor Product Version Other Status <-- --> Vendor Product Version Other Status
Samba
Search vendor "Samba"
Samba
Search vendor "Samba" for product "Samba"
>= 4.0.0 <= 4.0.26
Search vendor "Samba" for product "Samba" and version " >= 4.0.0 <= 4.0.26"
-
Affected
Samba
Search vendor "Samba"
Samba
Search vendor "Samba" for product "Samba"
>= 4.1.0 <= 4.1.23
Search vendor "Samba" for product "Samba" and version " >= 4.1.0 <= 4.1.23"
-
Affected
Samba
Search vendor "Samba"
Samba
Search vendor "Samba" for product "Samba"
>= 4.2.0 <= 4.2.14
Search vendor "Samba" for product "Samba" and version " >= 4.2.0 <= 4.2.14"
-
Affected
Samba
Search vendor "Samba"
Samba
Search vendor "Samba" for product "Samba"
>= 4.3.0 < 4.3.13
Search vendor "Samba" for product "Samba" and version " >= 4.3.0 < 4.3.13"
-
Affected
Samba
Search vendor "Samba"
Samba
Search vendor "Samba" for product "Samba"
>= 4.4.0 < 4.4.8
Search vendor "Samba" for product "Samba" and version " >= 4.4.0 < 4.4.8"
-
Affected
Samba
Search vendor "Samba"
Samba
Search vendor "Samba" for product "Samba"
>= 4.5.0 < 4.5.3
Search vendor "Samba" for product "Samba" and version " >= 4.5.0 < 4.5.3"
-
Affected