Bug 2376219 (CVE-2025-5987) - CVE-2025-5987 libssh: Invalid return code for chacha20 poly1305 with OpenSSL backend
Summary: CVE-2025-5987 libssh: Invalid return code for chacha20 poly1305 with OpenSSL ...
Keywords:
Status: NEW
Alias: CVE-2025-5987
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2376226 2376229 2376223 2376224 2376225 2376227 2376228
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-07-03 21:58 UTC by OSIDB Bzimport
Modified: 2025-07-07 13:44 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-07-03 21:58:14 UTC
If there is an error in initializing ChaCha20 cipher with OpenSSL, an invalid error code is returned. This can happen if there is an heap exhaustion.  This error is not correctly detected and could allow libssh to use partially
initialized cipher context. This is caused by the mismatch of return value meaning from OpenSSL and libssh, where OpenSSL error (rv=0) aliases with SSH_OK (0) and is returned directly from the function chacha20_poly1305_set_key(). This will likely cause error somewhere down the road.


Note You need to log in before you can comment on or make changes to this bug.