CVE-2013-2053: Buffer Overflow

Published May 6, 2013
·
Updated

Buffer overflow in the atodn function in Openswan before 2.6.39, when Opportunistic Encryption is enabled and an RSA key is being used, allows remote attackers to cause a denial of service (pluto IKE daemon crash) and possibly execute arbitrary code via crafted DNS TXT records. NOTE: this might be the same vulnerability as CVE-2013-2052 and CVE-2013-2054.

Other sources

Paul Wouters reports:

An audit of code from The Libreswan Project revealed a remote buffer overflow in the atodn() function used by both libreswan, openswan, and older versions of strongswan and superfreeswan when called from atoid()

Vulnerable versions: Openswan versions 1.x to 2.6.38

Vulnerability information: When enabling Opportunistic Encryption ("OE") using oe=yes (default is 'no') the IKE daemon pluto requests DNS TXT records to obtain public RSA keys of itself and its peers. These records can contain an IPsec gateway specification containing an fully qualified hostname which is passed to a function atoid().

When X.509 support was added to FreeS/WAN, ASN.1 parsing was added to the function atoid() which converts an ASCII ID representation into an internal struct id representation using a static buffer via the function temporarycyclicbuffer()

While DNS TXT records cannot contain ASN.1 representations, the code mistakenly checked for such interpretation if the DNS TXT FQDN contained an '=' symbol. Since DNS TXT buffers can be larger than what the ASN.1 parsing code expected, parsing such a record can trigger a buffer overflow leading to remote execution of code, specifically when overflowing into the struct kernelops which is a table of function pointers.

Exploitation: This exploit can only be triggered when the ipsec.conf configuration file enables Opportunistic Encryption via the option 'oe=yes'. If this option is not present, it defaults to 'no'.

Configurations that enable "OE" without preconfiguring their own public RSA key in DNS will be under severe connectivity problems leaving the machine with 30 second delay for each outgoing connection - a deployment scenario that is extremely unlikely to appear in the wild.

In the unlikely event that machines are configured as such, this vulnerability can only be exploited by a remote attacker controlling the reverse DNS entry for the IP address of the targetted host. If the machine is properly configured for OE, an attacker only needs to trigger a connection to an IP address for which they control the reverse DNS zone where they can place the malicious DNS record.

Credits: This vulnerability was found by Florian Weimer of the Red Hat Product Security Team (https://access.redhat.com/security/team/)

Red Hat

Affected Software

38 affected components
Xelerance Openswan<=2.6.38
Xelerance Openswan=2.6.01
Xelerance Openswan=2.6.02
Xelerance Openswan=2.6.03
Xelerance Openswan=2.6.04
Xelerance Openswan=2.6.05
Xelerance Openswan=2.6.06
Xelerance Openswan=2.6.07
Xelerance Openswan=2.6.08
Xelerance Openswan=2.6.09
Xelerance Openswan=2.6.10
Xelerance Openswan=2.6.11
Xelerance Openswan=2.6.12
Xelerance Openswan=2.6.13
Xelerance Openswan=2.6.14
Xelerance Openswan=2.6.15
Xelerance Openswan=2.6.16
Xelerance Openswan=2.6.17
Xelerance Openswan=2.6.18
Xelerance Openswan=2.6.19
Xelerance Openswan=2.6.20
Xelerance Openswan=2.6.21
Xelerance Openswan=2.6.22
Xelerance Openswan=2.6.23
Xelerance Openswan=2.6.24
Xelerance Openswan=2.6.25
Xelerance Openswan=2.6.26
Xelerance Openswan=2.6.27
Xelerance Openswan=2.6.28
Xelerance Openswan=2.6.29
Xelerance Openswan=2.6.30
Xelerance Openswan=2.6.31
Xelerance Openswan=2.6.32
Xelerance Openswan=2.6.33
Xelerance Openswan=2.6.34
Xelerance Openswan=2.6.35
Xelerance Openswan=2.6.36
Xelerance Openswan=2.6.37

Event History

May 6, 2013
Data Sourced
via Red Hat·06:38 PM
DescriptionSeverityAffected Software
Jul 9, 2013
CVE Published
via MITRE·05:00 PM
Data Sourced
via MITRE·05: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-2013-2053?

CVE-2013-2053 has a high severity rating due to its potential to cause a denial of service and possibly allow remote code execution.

2

How do I fix CVE-2013-2053?

The recommended fix for CVE-2013-2053 is to upgrade Openswan to version 2.6.39 or later.

3

What versions of Openswan are affected by CVE-2013-2053?

CVE-2013-2053 affects all versions of Openswan prior to 2.6.39 when Opportunistic Encryption is enabled.

4

Can CVE-2013-2053 be exploited remotely?

Yes, CVE-2013-2053 can be exploited remotely through crafted DNS TXT records.

5

What are the potential risks associated with CVE-2013-2053?

The risks associated with CVE-2013-2053 include denial of service affecting the pluto IKE daemon and potential remote code execution.

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