Vulnerability Note VU#922681

Portable SDK for UPnP Devices (libupnp) contains multiple buffer overflows in SSDP

Original Release date: 29 Jan 2013 | Last revised: 05 Apr 2013

Overview

The Portable SDK for UPnP Devices libupnp library contains multiple buffer overflow vulnerabilities. Devices that use libupnp may also accept UPnP queries over the WAN interface, therefore exposing the vulnerabilities to the internet.

Description

Universal Plug and Play (UPnP) is a set of network protocols designed to support automatic discovery and service configuration. The Portable SDK for UPnP Devices (libupnp) is an open source project that has its roots in the Linux SDK for UPnP Devices and software from Intel (Intel Tools for UPnP Technologies and later Developer Tools for UPnP Technologies). Intel no longer maintains or supports these tools. Many different vendors produce UPnP-enabled devices that use libupnp.

As part of a large scale security research project, Rapid7 investigated internet-connected UPnP devices and found, among other security issues, multiple buffer overflow vulnerabilities in the libupnp implementation of the Simple Service Discovery Protocol (SSDP). Rapid7's report summarizes these vulnerabilities:

    Portable SDK for UPnP Devices unique_service_name() Buffer Overflows

    The libupnp library is vulnerable to multiple stack-based buffer overflows when handling malicious SSDP requests. This library is used by tens of millions of deployed network devices, of which approximately twenty million are exposed directly to the internet. In addition to network devices, many streaming media and file sharing applications are also exposed to attack through this library.

    This advisory does not address historic or current vulnerabilities in the HTTP and SOAP processing code of libupnp.

    Affected Versions
    Versions 1.2 (Intel SDK) and 1.2.1a - 1.8.0 (Portable SDK) are affected by at least three remotely exploitable buffer overflows in the unique_service_name() function, which is called to process incoming SSDP requests on UDP port 1900. Additionally, versions prior to 1.6.17 are vulnerable to additional issues in the same function. Please see Appendix A for a review of the vulnerable code by version.

    Affected Vendors
    Hundreds of vendors have used the libupnp library in their products, many of which are acting as the home routers for consumer networks. Any application linking to libupnp is likely to be affected and a list of confirmed vendors and products is provided in Appendix B.
Additional details may be found in a paper and advisory from Rapid7.

Impact

A remote, unauthenticated attacker may be able to execute arbitrary code on the device or cause a denial of service.

Solution

Apply an Update

libupnp 1.6.18 has been released to address these vulnerabilities.

Restrict Access

Deploy firewall rules to block untrusted hosts from being able to access port 1900/udp.

Disable UPnP

Consider disabling UPnP on the device if it is not absolutely necessary.

Vendor Information (Learn More)

We attempted to notify more than 200 vendors identified by Rapid7 as running libupnp. The following list includes vendors who responded to our notification and vendors for whom we had existing security contact information.

VendorStatusDate NotifiedDate Updated
AxisAffected13 Dec 201205 Apr 2013
Cisco Systems, Inc.Affected13 Dec 201229 Jan 2013
D-Link Systems, Inc.Affected13 Dec 201231 Jan 2013
Fujitsu TechnologyAffected10 Jan 201329 Jan 2013
Huawei TechnologiesAffected13 Dec 201229 Jan 2013
ipitomyAffected08 Jan 201301 Feb 2013
LinksysAffected13 Dec 201229 Jan 2013
NEC CorporationAffected13 Dec 201229 Jan 2013
SiemensAffected13 Dec 201230 Jan 2013
Sony CorporationAffected13 Dec 201230 Jan 2013
SynologyAffected13 Dec 201228 Feb 2013
teldatNot Affected-05 Feb 2013
Ubiquiti NetworksNot Affected09 Jan 201329 Jan 2013
Yamaha CorporationNot Affected-01 Feb 2013
3com IncUnknown13 Dec 201229 Jan 2013
If you are a vendor and your product is affected, let us know.View More »

CVSS Metrics (Learn More)

Group Score Vector
Base 10.0 AV:N/AC:L/Au:N/C:C/I:C/A:C
Temporal 8.7 E:H/RL:OF/RC:C
Environmental 6.6 CDP:L/TD:M/CR:M/IR:M/AR:M

References

Credit

Thanks to HD Moore of Rapid7 for reporting this vulnerability, and Tod Beardsley for coordination support.

This document was written by Jared Allar.

Other Information

Feedback

If you have feedback, comments, or additional information about this vulnerability, please send us email.