REDHAT-BUG-2572590: Medium severity vulnerability
A flaw was found in SSSD. The rsapubkeytossh() function in src/util/cert/libcrypto/cert.c converts the RSA modulus and public exponent from an X.509 certificate into fixed-size stack buffers using BNbn2bin(), without checking BNnumbytes() against the destination sizes. The exponent buffer is 8 bytes and the modulus buffer is 2048 bytes in the reviewed configuration. RSA components exceeding those sizes can overwrite stack memory, causing the SSH responder to crash and potentially corrupting process state. The LDAP userCertificate;binary to SSH authorized-key lookup path requires an attacker-influenced certificate and sshusecertificatekeys=true. Certificate validation must succeed unless verification is explicitly disabled. The maintainer confirmed the 64-bit exponent buffer limit, the absence of prior SSSD key-size validation, and the feasibility of dynamic allocation; they consider this CVE-worthy because appropriately issued valid certificates may reach the conversion. No end-to-end arbitrary-code-execution exploit is established. Source report: PSIRTSUPT-25890, finding H-06.
Affected Software
Event History
Frequently Asked Questions
What configuration must be enabled for the vulnerable code path to be reachable?
The LDAP userCertificate;binary-to-SSH-authorized-key lookup path must be in use, with ssh_use_certificate_keys=true. The issue is reached when SSSD converts an RSA public key from an X.509 certificate for SSH key handling.
What does an attacker need to provide for exploitation?
An attacker needs an attacker-influenced X.509 certificate containing RSA components larger than the fixed destination buffers. Certificate validation must also succeed, unless certificate verification has been explicitly disabled.
What is the practical impact currently established?
Oversized RSA exponents or moduli can overwrite stack memory in the SSH responder, causing it to crash and potentially corrupting process state. An end-to-end arbitrary-code-execution exploit has not been established.
How can administrators assess whether they may be exposed?
Review whether SSSD is configured to obtain SSH authorized keys from LDAP userCertificate;binary attributes and whether ssh_use_certificate_keys=true is set. Exposure also depends on certificates reaching this lookup path and having RSA components exceeding the fixed buffer sizes.