CVE-2026-56968
Description
GNU SASL before 2.2.4 lacks sanitization of a short challenge in _gsasl_ntlm_client_step in the NTLM client, which could result in memory disclosure via a crafted server.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected products
1Patches
Vulnerability mechanics
Root cause
"Missing length validation for short NTLM Type-2 challenges leaves heap memory uninitialized, which is then read and transmitted back to the attacker."
Attack vector
An attacker-controlled NTLM server sends a Type-2 (challenge) message shorter than the expected 1076-byte `tSmbNtlmAuthChallenge` struct. The client's `_gsasl_ntlm_client_step()` function [ref_id=1] accepts any input length up to the struct size, then copies only the received bytes via `memcpy`, leaving the remainder of the heap-allocated buffer uninitialized. The struct is passed to libntlm's `buildSmbNtlmAuthResponse()`, which reads target-name and target-info fields from the uninitialized tail. Those stale heap bytes are echoed back to the attacker inside the NTLM response, achieving a remote heap memory disclosure [CWE-908].
What the fix does
The advisory recommends replacing `malloc()` with `calloc()` to zero-initialize the entire struct, so that a short challenge cannot expose stale heap contents [ref_id=1]. It further suggests validating that the wire-declared target-name and target-info lengths and offsets stay within `input_len` before libntlm consumes them, preventing a malicious server from pointing those fields into the zeroed (or still-stale) tail. The patch does not show the exact diff, but the fix is described as a two-part change: zero the struct and add bounds checks.
Preconditions
- networkAttacker must operate a malicious NTLM server that the gsasl client connects to
- inputAttacker sends a Type-2 challenge message shorter than 1076 bytes (e.g., 16 bytes)
Generated on Jun 24, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4News mentions
0No linked articles in our index yet.