<Vulnerability name="CVE-2026-58216">
    <DocumentDistribution xml:lang="en">Copyright © 2012 Red Hat, Inc. All rights reserved.</DocumentDistribution>
    <ThreatSeverity>Moderate</ThreatSeverity>
    <PublicDate>2026-07-28T10:00:00</PublicDate>
    <Bugzilla id="2502721" url="https://bugzilla.redhat.com/show_bug.cgi?id=2502721" xml:lang="en:us">
samba: kpasswd service: kpasswd packet that contains malformed ASN.1 might cause the server to access 6 bytes of unallocated memory leading server to crash
    </Bugzilla>
    <CVSS3 status="draft">
        <CVSS3BaseScore>5.3</CVSS3BaseScore>
        <CVSS3ScoringVector>CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H</CVSS3ScoringVector>
    </CVSS3>
    <CWE>CWE-125</CWE>
    <Details xml:lang="en:us" source="Mitre">
An out-of-bounds read flaw was found in Samba's Kerberos Key Distribution Center's (KDC) password change (kpasswd) service. When processing malformed ASN.1-encoded Kerberos password change request, Samba server miscalculates the structure size and attempts to read up to six bytes beyond the end of the allocated buffer. While this out-of-bounds read typically results in a harmless decryption failure, if the read hits unmapped memory, it causes the KDC process to crash. An authenticated attacker can send a specially crafted kpasswd request containing malformed ASN.1 data to trigger the out-of-bounds read, which may cause the KDC process to terminate, resulting in a denial of service.
    </Details>
    <Details xml:lang="en:us" source="Red Hat">
An out-of-bounds read flaw was found in Samba's Kerberos Key Distribution Center's (KDC) password change (kpasswd) service. When processing malformed ASN.1-encoded Kerberos password change request, Samba server miscalculates the structure size and attempts to read up to six bytes beyond the end of the allocated buffer. While this out-of-bounds read typically results in a harmless decryption failure, if the read hits unmapped memory, it causes the KDC process to crash. An authenticated attacker can send a specially crafted kpasswd request containing malformed ASN.1 data to trigger the out-of-bounds read, which may cause the KDC process to terminate, resulting in a denial of service.
    </Details>
    <Statement xml:lang="en:us">
Red Hat Product Security has rated this vulnerability as having a Moderate security impact. 

Successful exploitation requires an authenticated attacker to craft a malformed ASN.1-encoded Kerberos password change request that precisely triggers the underlying parsing flaw, increasing the attack complexity. The Samba project also notes that the attack is unreliable in practice and an attacker may need to perform numerous kpasswd attempts before successfully causing the service to terminate.

```
Standard RHEL Server Deployments (Not Affected): Default Red Hat Enterprise Linux (RHEL) deployments are not affected. RHEL does not support the Samba Active Directory Domain Controller (AD DC) role or its integrated Kerberos Key Distribution Center (KDC), including the kpasswd service, where this vulnerability resides.

```

Samba AD DC Deployments (Affected): Deployments explicitly configured to operate as a Samba Active Directory Domain Controller (server role = active directory domain controller) are affected.
    </Statement>
    <Acknowledgement xml:lang="en:us">
Red Hat would like to thank Tristan Madani (@TristanInSec) (Talence Security) for reporting this issue.
    </Acknowledgement>
    <Mitigation xml:lang="en:us">
Administrators who do not require the Kerberos password change service may disable it by setting ```kpasswd port = 0``` in ```/etc/samba/smb.conf```. 

Where disabling the service is not practical, rate-limiting access to the kpasswd service may reduce the likelihood of successful exploitation until an updated package can be applied.

Note: Disabling kpasswd port will prevent domain users from changing their Kerberos passwords via the kpasswd protocol until patched.
    </Mitigation>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:10">
        <ProductName>Red Hat Enterprise Linux 10</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>samba</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:6">
        <ProductName>Red Hat Enterprise Linux 6</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>samba</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:6">
        <ProductName>Red Hat Enterprise Linux 6</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>samba4</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:7">
        <ProductName>Red Hat Enterprise Linux 7</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>samba</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:8">
        <ProductName>Red Hat Enterprise Linux 8</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>samba</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/o:redhat:enterprise_linux:9">
        <ProductName>Red Hat Enterprise Linux 9</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>samba</PackageName>
    </PackageState>
    <PackageState cpe="cpe:/a:redhat:openshift:4">
        <ProductName>Red Hat OpenShift Container Platform 4</ProductName>
        <FixState>Not affected</FixState>
        <PackageName>rhcos</PackageName>
    </PackageState>
    <References xml:lang="en:us">
https://www.cve.org/CVERecord?id=CVE-2026-58216
https://nvd.nist.gov/vuln/detail/CVE-2026-58216
https://bugzilla.samba.org/show_bug.cgi?id=16087
https://www.samba.org/samba/security/CVE-2026-58216.html
    </References>
</Vulnerability>