Openssh: heap out-of-bounds read in red hat enterprise linux versions of openssh gssapi indicator cleanup due to missing null sentinel termination
Description
A flaw was found in OpenSSH. This vulnerability, a heap out-of-bounds read, occurs during the cleanup of GSSAPI (Generic Security Service Application Programming Interface) indicators when a trailing NULL termination is missing in the auth-indicators array. A remote attacker, under specific configurations involving GSSAPI authentication and a Kerberos environment, could exploit this to cause the SSH authentication path to crash or abort. This leads to a denial of service (DoS), impacting the availability of the SSH service.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1Patches
Vulnerability mechanics
Root cause
"Missing trailing NULL sentinel in the GSSAPI auth-indicators array allows sentinel-based consumers to read past the allocated pointer array."
Attack vector
An attacker with network access to an SSH server built with GSSAPI support can trigger the bug when `GSSAPIAuthentication yes` is configured and the Kerberos environment provides a ticket containing at least one authenticated `auth-indicators` value [ref_id=1]. The attacker must then cause execution to reach a sentinel-based consumer, either by making `ssh_gssapi_userok()` return false (e.g., through principal-to-local-user authorization failure) or by configuring `GSSAPIIndicators` so that `ssh_gssapi_check_indicators()` iterates the list [ref_id=1]. The out-of-bounds read may crash or abort the SSH authentication path, leading to a denial of service.
Affected code
The vulnerability is in `gss-serv.c` (`ssh_gssapi_getindicators()`) where the `client->indicators` array is grown without a guaranteed trailing `NULL` sentinel. Sentinel-based consumers in `gss-serv.c` (`ssh_gssapi_userok()`) and `gss-serv-krb5.c` (`ssh_gssapi_check_indicators()`) iterate until `NULL`, which can read past the allocated pointer array.
What the fix does
The proposed fix ensures that after indicator collection, a dedicated trailing `NULL` slot is appended to the `client->indicators` array by calling `xrecallocarray()` to grow the array by one element [ref_id=1]. Previously the code relied on `recallocarray()` zeroing the newly added region, but that region was immediately overwritten with a string pointer, leaving no sentinel. The fix guarantees that sentinel-based consumers in `ssh_gssapi_userok()` and `ssh_gssapi_check_indicators()` will always find a `NULL` terminator within the allocated bounds.
Preconditions
- configOpenSSH built with GSSAPI support
- configGSSAPIAuthentication set to yes (non-default)
- inputKerberos ticket containing at least one authenticated auth-indicators value
- inputExecution reaches a sentinel-based consumer (ssh_gssapi_userok() failure or GSSAPIIndicators matching)
- networkNetwork access to the SSH server
Generated on Jun 23, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2- access.redhat.com/security/cve/CVE-2026-55654mitrevdb-entryx_refsource_REDHAT
- bugzilla.redhat.com/show_bug.cgimitreissue-trackingx_refsource_REDHAT
News mentions
0No linked articles in our index yet.