Bug 2585306 (CVE-2026-125627)

Summary: CVE-2026-125627 samba: samba4: NULL dereference in vlv_value_compare crashes the AD DC LDAP worker
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security <prodsec-ir-bot>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: akhatavk, aos-team-art-private, asdas, dpaolell, jdelft, jupierce, lgarciaa, mbiarnes, ppalepu, ppostler, prdhamdh, rhel-process-autobot, sghai, sidsharm, suppawar, vlaad, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A **NULL pointer dereference** flaw has been found in the vlv_value_compare() function in vlv_pagination.c of the Virtual List View module in the **Samba** package. The function uses the sort value from the search result with no check that the result still contains that attribute. A low-privileged network attacker or user who can search the directory sends a Virtual List View search by value, sorted on an attribute the matching entries do not have. The LDAP worker that handles the search exits, which disconnects the directory clients that were using that worker, and the directory service starts a replacement worker. Another search of the same kind crashes the worker that accepts it, and each further crash waits longer before that worker is replaced, so repeating the search keeps the LDAP service from staying available. The same crash follows a search sorted on an attribute the attacker is not allowed to read. The directory removes that attribute from the result, and the comparison uses the missing value.
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: 2585320, 2585321, 2585322    
Bug Blocks:    

Description OSIDB Bzimport 2026-11-27 05:06:06 UTC
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.