Bug 2497697 (CVE-2026-14940)

Summary: CVE-2026-14940 389-ds-base: 389-ds-base: heap-buffer-overflow in DN normalization via quoted multivalued RDN
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: aadhikar, bsmejkal, jachapma, mreynolds, progier, rhel-process-autobot, snegrini, spichugi, tbordaz, vashirov, watson-tool-maintainers
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A heap-buffer-overflow flaw was found in 389 Directory Server (389-ds-base). When normalizing a Distinguished Name (DN) that contains a legacy-quoted value encoding a multivalued nested Relative Distinguished Name (RDN), the server can write past the end of a heap allocation while sorting RDN attribute-value pairs. An unauthenticated remote attacker can trigger this condition by sending an LDAP operation whose DN reaches the DN normalization routine, such as a search with a crafted base DN. This can corrupt heap memory and may cause denial of service.
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: 2497718    
Bug Blocks:    

Description OSIDB Bzimport 2026-07-07 12:35:41 UTC
Valid heap-buffer-overflow in slapi_dn_normalize_ext() -> sort_rdn_avs() ->
rdn_av_swap() (ldap/servers/slapd/dn.c). Triggered when a DN contains a legacy-quoted
value encoding a multivalued nested RDN. On closing quote, nested attribute-value
tracking is not finalized; a subsequent separator can leave stale pointers that
produce overlapping berval entries. In-place sorting then writes past the heap
allocation in rdn_av_swap().
Reachable pre-auth via any LDAP operation whose DN is normalized (search base DN
confirmed). Reproduced on RHEL 9.8 (389-ds-base-2.8.0-7.el9_8) with reporter PoC.
Production behavior (no ASAN/MALLOC_CHECK_): malformed DN often returns err=34
(Invalid DN syntax); server continues. With MALLOC_CHECK_=3: general protection
fault in libc, ns-slapd terminates.