Bug 2583983

Summary: CVE-2026-125634 samba: samba: NULL dereference in AD DC validated DNS host name and SPN checks [fedora-43]
Product: [Fedora] Fedora Reporter: TEJ RATHI <trathi>
Component: sambaAssignee: Guenther Deschner <gdeschner>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 43CC: abokovoy, anoopcs, asn, gdeschner, pfilipen, sbose, ssorce
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["1eeb9ae6-4c4e-4a7f-abc9-d51aaa572823"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:    
Bug Blocks: 2583971    

Description TEJ RATHI 2026-11-25 08:18:48 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

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.