REDHAT-BUG-2459970: Medium severity MIT krb5 vulnerability
An integer underflow vulnerability was found in MIT krb5 in the berval2tldata() function in plugins/kdb/ldap/libkdbldap/ldapprincipal2.c. The function performs an unsigned subtraction (bvlen - 2) without a prior bounds check. When bvlen is 0 or 1, the subtraction wraps to a large value which is then truncated to uint16t, yielding 0xFFFE (65534) or 0xFFFF (65535). The subsequent malloc succeeds and memcpy reads up to 65534 bytes from a 0-1 byte buffer, resulting in a heap out-of-bounds read.
The attack vector involves a malicious or compromised LDAP KDB backend returning a krbExtraData attribute with bvlen < 2, triggering the underflow when the KDC or kadmind reads principal data.
Upstream fix: https://github.com/krb5/krb5/commit/2a5fd83 MIT ticket: https://krbdev.mit.edu/rt/Ticket/Display.html?id=9206
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
MIT krb5to a version that resolves this vulnerability.Patch 2a5fd83
Event History
Frequently Asked Questions
What is the severity of REDHAT-BUG-2459970?
The severity of REDHAT-BUG-2459970 is classified as medium with a score of 4.
What is the impact of the vulnerability REDHAT-BUG-2459970?
The vulnerability REDHAT-BUG-2459970 can cause an integer underflow due to unsigned subtraction without bounds checking.
How do I fix REDHAT-BUG-2459970?
To fix REDHAT-BUG-2459970, ensure that proper bounds checking is implemented in the berval2tl_data() function.
Which software is affected by REDHAT-BUG-2459970?
The software affected by REDHAT-BUG-2459970 is MIT krb5.
What causes the REDHAT-BUG-2459970 vulnerability?
The REDHAT-BUG-2459970 vulnerability is caused by an unsigned subtraction operation in the berval2tl_data() function that lacks prior bounds validation.