Samba AD bug 15515: a nested-group check can return nothing, and Cairn reads it as "not a member" (sessions end, devices paused) #990

Closed
opened 2026-10-24 16:13:10 +00:00 by Cordy · 2 comments
Owner

Found in the #985 research (research-985-5 §7a).

Upstream. Samba bug 15515 (open, reported on 4.18.5): after the CVE-2023-0614 fix, (memberOf:1.2.840.113556.1.4.1941:=...) returns no results with Success when a restrictive ACL sits in the nesting chain, or fails with LDAP_OPERATIONS_ERROR ... Indexed and full searches both failed!. VERIFIED (bugzilla).

Cairn (INFERRED from code). inChainWorks (ldap.go:800-865) probes one direct member and caches inChainOK for the process lifetime. On Samba with a restricted OU in a chain, the probe passes, then a deeper membership returns zero entries. admitted (ldap.go:925-940) treats that as a verdict "not a member": sessions end and devices are paused. The mass-miss guard only helps when many people go at once. The operations-error form already becomes an outage (safe).

Plan.

  1. Docs now: on Samba the service account must be able to read every group and OU in the nesting chain (bug 15515). Part of the #985 docs corrections.
  2. Code hardening (S): before a "no" verdict with nested groups on, run the direct-member query; if it says "yes" while the nested query said "no", treat it as an outage, not a verdict.

Live test. Samba 4.20+, group A contains B contains user; deny the service account read on B's OU; run Cairn's re-check and the ldapsearch from directory-ldap-ad.md:405-416.

Found in the #985 research (research-985-5 §7a). **Upstream.** Samba bug 15515 (open, reported on 4.18.5): after the CVE-2023-0614 fix, `(memberOf:1.2.840.113556.1.4.1941:=...)` returns **no results with Success** when a restrictive ACL sits in the nesting chain, or fails with `LDAP_OPERATIONS_ERROR ... Indexed and full searches both failed!`. VERIFIED (bugzilla). **Cairn (INFERRED from code).** `inChainWorks` (`ldap.go:800-865`) probes one direct member and caches `inChainOK` for the process lifetime. On Samba with a restricted OU in a chain, the probe passes, then a deeper membership returns zero entries. `admitted` (`ldap.go:925-940`) treats that as a verdict "not a member": sessions end and devices are paused. The mass-miss guard only helps when many people go at once. The operations-error form already becomes an outage (safe). **Plan.** 1. Docs now: on Samba the service account must be able to read every group and OU in the nesting chain (bug 15515). Part of the #985 docs corrections. 2. Code hardening (S): before a "no" verdict with nested groups on, run the direct-member query; if it says "yes" while the nested query said "no", treat it as an outage, not a verdict. **Live test.** Samba 4.20+, group A contains B contains user; deny the service account read on B's OU; run Cairn's re-check and the `ldapsearch` from `directory-ldap-ad.md:405-416`.
Author
Owner

Decision (Nikola, 2026-10-24): docs caveat now, plus the code guard (a nested "no" with a direct "yes" is an outage, not a verdict). Lands with the #985 batch.

Decision (Nikola, 2026-10-24): docs caveat now, plus the code guard (a nested "no" with a direct "yes" is an outage, not a verdict). Lands with the #985 batch.
Author
Owner

Fixed in v0.6.354 (PR #1004). A nested-group "not a member" answer is first confirmed with the direct-member query. When the group lists the person directly, the result is treated as a directory outage (nobody removed), with an hourly WARN naming Samba bug 15515. The docs caveat is in directory-ldap-ad.md. The guard covers direct members only, and the docs say so. The live Samba test is still open. Closing.

Fixed in v0.6.354 (PR #1004). A nested-group "not a member" answer is first confirmed with the direct-member query. When the group lists the person directly, the result is treated as a directory outage (nobody removed), with an hourly WARN naming Samba bug 15515. The docs caveat is in directory-ldap-ad.md. The guard covers direct members only, and the docs say so. The live Samba test is still open. Closing.
Cordy closed this issue 2026-10-25 21:29:33 +00:00
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#990
No description provided.