CVE-2012-4559: Double Free

Published Oct 30, 2012
·
Updated

Florian Weimer of the Red Hat Product Security Team reported several instances of code in libssh where a heap region is deallocated twice, first in the main path and then on the error path. This could crash the process using libssh, or possible allow for the execution of arbitrary code.

The identified affected variables are:

agent.c:agentsigndata(): request channels.c:channelrequest(): req auth.c:sshuserauthpubkey(): user, service, method, algo, pkstr sftp.c:sftpparseattr3(): longname, name sftp.c:sftpmkdir(): buffer, path keyfiles.c:trypublickeyfromfile(): pubkey

sftp.c:sftpmkdir() has been corrected via the following git commit:

http://git.libssh.org/projects/libssh.git/commit/?h=v0-5&id=4d8420f3282ed07fc99fc5e930c17df27ef1e9b2

Other sources

Multiple double free vulnerabilities in the (1) agentsigndata function in agent.c, (2) channelrequest function in channels.c, (3) sshuserauthpubkey function in auth.c, (4) sftpparseattr3 function in sftp.c, and (5) trypublickeyfromfile function in keyfiles.c in libssh before 0.5.3 allow remote attackers to cause a denial of service (crash) and possibly execute arbitrary code via unspecified vectors.

MITRE

Affected Software

7 affected componentsFixes available
redhat/libssh<0.5.3
0.5.3
libssh libssh<=0.5.2
libssh libssh=0.4.7
libssh libssh=0.4.8
libssh libssh=0.5.0
libssh libssh=0.5.0-rc1
libssh libssh=0.5.1

Event History

Nov 30, 2012
CVE Published
via MITRE·10:00 PM
Data Sourced
via MITRE·10:00 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2012-4559?

CVE-2012-4559 has been classified with a critical severity due to the potential for arbitrary code execution or process crashes.

2

How do I fix CVE-2012-4559?

To fix CVE-2012-4559, upgrade libssh to version 0.5.4 or higher, which contains the necessary security patches.

3

Which versions of libssh are affected by CVE-2012-4559?

Versions of libssh prior to 0.5.4, including 0.5.3 and earlier, are affected by CVE-2012-4559.

4

What are the potential risks of CVE-2012-4559?

The potential risks of CVE-2012-4559 include application crashes or the execution of arbitrary code, compromising system integrity.

5

Is my system vulnerable to CVE-2012-4559?

If you are using libssh version 0.5.3 or earlier, your system is vulnerable to CVE-2012-4559.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203