Bug 2583971 (CVE-2026-125634) - CVE-2026-125634 samba: NULL dereference in AD DC validated DNS host name and SPN checks
Summary: CVE-2026-125634 samba: NULL dereference in AD DC validated DNS host name and ...
Keywords:
Status: NEW
Alias: CVE-2026-125634
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2583983 2583984 2583985
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-11-25 07:21 UTC by OSIDB Bzimport
Modified: 2026-11-25 13:10 UTC (History)
17 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2026-11-25 07:21:47 UTC
The acl_check_dns_host_name() function and the acl_validate_spn_value() function in source4/dsdb/samdb/ldb_modules/acl.c read samAccountName->length without testing that the pointer is NULL. dsdb_msg_get_single_value() in source4/dsdb/samdb/ldb_modules/util.c supplies that pointer.

On an LDAP modify, dsdb_msg_get_single_value() starts from the sAMAccountName stored on the object. A delete of sAMAccountName in the same request, or a replace with no values, makes the function return success and a NULL pointer. acl_modify() walks the attributes in the order the client sent them. A validated write of dNSHostName or servicePrincipalName is checked while that NULL pointer is already the account-name value, and before the write-property check on the sAMAccountName element. The acl module is loaded ahead of samldb and objectclass_attrs, which are the modules that reject removal of a mandatory sAMAccountName. On an add, the same helper returns NULL when the new object does not contain sAMAccountName. In acl_validate_spn_value(), the dnsHostName and original dnsHostName pointers are tested before use. The sAMAccountName pointer is not.

The process handling the LDAP request terminates. The AD DC restarts that LDAP process. Repeating the request crashes it again, so the directory service stays unavailable for as long as the requests continue. The stored object is left unchanged because the fault happens before the modify is committed.

The caller is an authenticated domain principal that can perform a validated write of dNSHostName or servicePrincipalName on a computer object. The default computer class security descriptor grants that self-write to Principal Self and Creator Owner. A domain-joined computer has this right on its own account. The same request deletes sAMAccountName or replaces it with no values. Write property on the object is not required. A caller who already has write property returns before the read.

The modify path is reachable on a Samba AD DC in the default configuration.

The unchecked read was added with the validated-write work for CVE-2022-32743. Joseph Sutton added the dNSHostName read in commit b95431ab2303eb258e37e88d8841f2fb79fc4af5 on 2022-06-01, and the servicePrincipalName read in commit e1c52ac05a9ff505d2e5eac2f1ece4e95844ee71 on 2022-06-07. dsdb_msg_get_single_value() was added in commit 49ac07e786df58b914ee85e2db773c0ba8d4e171 on 2022-06-07. Samba 4.17.0, released on 2022-09-13, is the first release that contains the code. The same read is absent from Samba 4.16.4, 4.15.9, and 4.14.14.

acl_check_spn() calls acl_validate_spn_value() for servicePrincipalName. acl_check_dns_host_name() has the same unchecked read for dNSHostName.


Note You need to log in before you can comment on or make changes to this bug.