REDHAT-BUG-2583971: Medium severity Samba Samba vulnerability

Published Nov 25, 2026
·
Updated

The aclcheckdnshostname() function and the aclvalidatespnvalue() function in source4/dsdb/samdb/ldbmodules/acl.c read samAccountName->length without testing that the pointer is NULL. dsdbmsggetsinglevalue() in source4/dsdb/samdb/ldbmodules/util.c supplies that pointer.

On an LDAP modify, dsdbmsggetsinglevalue() 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. aclmodify() 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 objectclassattrs, 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 aclvalidatespnvalue(), 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. dsdbmsggetsinglevalue() 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.

aclcheckspn() calls aclvalidatespnvalue() for servicePrincipalName. aclcheckdnshostname() has the same unchecked read for dNSHostName.

Affected Software

1 affected component
Samba Samba>=4.17.0

Event History

Nov 25, 2026
Data Sourced
via Red Hat·07:21 AM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What LDAP request pattern can trigger the failure?

An LDAP modify can delete sAMAccountName, or replace it with no values, and then include a validated write to dNSHostName or servicePrincipalName later in the client-supplied attribute order. The ACL code can dereference the now-NULL account-name value before the later validation rejects removal of the mandatory attribute.

2

Can an LDAP add operation also be affected?

Yes. On an add request, the helper returns a NULL account-name value when the new object does not contain sAMAccountName; the servicePrincipalName validation path does not test that pointer before using it.

3

Do downstream checks for mandatory sAMAccountName prevent the crash?

No. The ACL module runs before the samldb and objectclass_attrs modules that reject removal of a mandatory sAMAccountName, so the process can terminate before those checks are reached.

4

What is the observed impact when the issue is triggered?

The process handling the LDAP request terminates.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203