Bug 2585320

Summary: CVE-2026-125627 samba: NULL dereference in vlv_value_compare crashes the AD DC LDAP worker [fedora-44]
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: 44CC: abokovoy, anoopcs, asn, gdeschner, pfilipen, sbose, ssorce
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["0bebe34a-e510-4f9f-a321-f8783cc498b8"]}
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: 2585306    

Description TEJ RATHI 2026-11-27 05:43:25 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.

vlv_value_compare() in source4/dsdb/samdb/ldb_modules/vlv_pagination.c looks up the sort attribute with ldb_msg_find_element() and passes el->values[0] to the attribute comparison function. The element pointer is used with no check that the lookup found an element.

A greater-than-or-equal Virtual List View search, control type 1, reaches this function from vlv_results() through vlv_gt_eq_to_index(). The helper binary-searches the GUID list for that search. Each comparison looks the GUID up again and requests the sort attribute. server_sort keeps an entry that has no value for the sort attribute and places that entry after entries that have a value, so the GUID stays in the list. The comparison lookup finds no element when the attribute is absent. It also finds no element when aclread has marked the attribute inaccessible and ldb_msg_remove_inaccessible() has removed it, which is what happens when the caller cannot read the attribute. vlv_value_compare() then reads el->values[0]. This path is the same from samba 4.5.0 through samba 4.25.1 and on the current master branch.

The read faults the LDAP worker process. In the default prefork model that worker serves multiple client connections, and those connections end when the process exits. The prefork master starts a replacement worker. The first restart delay is 0. Each later exit of that worker adds the prefork backoff increment to the delay, up to the prefork maximum backoff. Those defaults are 10 seconds and 120 seconds. A caller who repeats the search can exit the LDAP workers and leave them stopped for that delay.

The caller is authenticated and can search at least one directory object. rootdse_filter_operations() permits an anonymous operation only for a base-scoped search of an empty DN, unless dSHeuristics turns that block off. The search uses a server-side sort control and a greater-than-or-equal Virtual List View control. At least one returned object lacks the sort attribute, or the caller cannot read it.

The flaw is reachable in the default configuration. The vlv module is in the default samba_dsdb module list. The acl search check defaults to enabled. The samba process model defaults to prefork.

Introduced in samba 4.5.0 by commit 79c58c2543790134ef8deb5307ec4b4ae069ea61 (Douglas Bagnall, 22 March 2016), when Virtual List View support was added. The unchecked use of el->values[0] has been in the function since that commit.

vlv_value_compare_rev() calls vlv_value_compare() and returns the negated comparison, so a reverse greater-than-or-equal search uses the same missing element.