==================================================================== CERT-Renater Note d'Information No. 2012/VULN155 ____________________________________________________________________ DATE : 26/03/2012 HARDWARE PLATFORM(S): / OPERATING SYSTEM(S) : Systems running Quagga versions prior to 0.99.20.1. ====================================================================== http://www.kb.cert.org/vuls/id/551715 ______________________________________________________________________ Vulnerability Note VU#551715 Quagga contains multiple vulnerabilities Overview Quagga, a routing software suite, contains multiple vulnerabilities that result in a denial-of-service condition. I. Description Quagga 0.99.20 and previous versions are susceptible to various denial-of-service conditions. The Quagga advisories state the following: CVE-2012-0249: Error in OSPF parsing LS-Update messages Can Cause a Crash of Quagga ospfd The ospfd implementation of OSPF in Quagga allows a remote attacker (on a local network segment with OSPF enabled) to cause a denial of service (daemon aborts due to an assert) with a malformed OSPF LS-Update message. Program Impacted: Quagga (ospfd) Description: OSPFv2 implementation in Quagga version 0.99.20 and before does not perform a proper length check for a received LS-Update OSPF packet. A received packet, which has actually less bytes, than it is declared in its header, causes a buffer overflow, which immediately leads to a crash of OSPF protocol process and subsequent disruption of IPv4 routing. Like many other OSPF cases, exploiting this vulnerability requires an ability to form an OSPF adjacency with the attacked OSPF router and initiate a database exchange process with it. Usual OSPF security precautions (including MD5 authentication) may lower the risk of such event. Upgrading to a patched version of Quagga is recommended regardless of any other measures taken. CVE-2012-0250: Error in OSPF parsing Network-LSA messages Can Cause a Crash of Quagga ospfd The ospfd implementation of OSPF in Quagga allows a remote attacker (on a local network segment with OSPF enabled) to cause a denial of service (daemon crash) with a malformed OSPF Network-LSA message. Program Impacted: Quagga (ospfd) Description: OSPFv2 implementation in Quagga version 0.99.20 and before does not perform a proper length check of the Network-LSA structures contained in an LS-Update OSPF packet. When an otherwise correct LS-Update OSPF packet contains a Network-LSA structure, which has its "Length" header field set to value bigger than the actual number of bytes in the buffer, a buffer overflow happens. This immediately leads to a crash of OSPF protocol process and subsequent disruption of IPv4 routing. Like many other OSPF cases, exploiting this vulnerability requires an ability to form an OSPF adjacency with the attacked OSPF router and initiate a database exchange process with it. Usual OSPF security precautions (including MD5 authentication) may lower the risk of such event. Upgrading to a patched version of Quagga is recommended regardless of any other measures taken. CVE-2012-0255: Error in BGP OPEN Message parsing Can Cause a Crash of Quagga bgpd The bgpd implementation of BGP in Quagga up to (and including) 0.99.20 allows remote attackers to cause a denial of service (daemon aborts due to an assert) via BGP Open message with an invalid AS4 capability. Program Impacted: Quagga (bgpd) Description: BGP implementation in Quagga version 0.99.20 and before contains an error in processing malformed AS4 capability in the BGP OPEN message which leads to a abort (daemon aborts due to an assert) of the BGP protocol process and subsequent disruption of IP routing. When an OPEN with a malformed AS4 capability message is detected, the code fails to flush the message buffers for the peer. When the peer next connects and sends a message, the code will attempt to parse the stale, half-consumed data in the message buffer as it were a fresh BGP message. This leads to an assert and exit of the BGP daemon in the BGP OPEN message parsing code. The vulnerability is not restricted to BGP neighbors with 4-byte AS but can only be done from any configured peers (or sources spoofing the IP of a configured peer). The potential exists for this condition to be intentionally triggered, resulting in effective denial of service by crashing the BGPd. Usual BGP security precautions (including BGP MD5 authentication) may lower the risk of such event. II. Impact A remote attacker may be able to cause a denial-of-service condition. III. Solution Apply an Update Upgrade to Quagga 0.99.20.1 either through the GIT master version or by applying a patch. For CVE-2012-0255, the following workaround exists: Shutdown sessions to any peers you can not trust, or where you can not ensure the security of the control-plane. Vendor Information Vendor Status Date Notified Date Updated Conectiva Inc. Unknown 2012-03-13 2012-03-13 Cray Inc. Unknown 2012-03-13 2012-03-13 Debian GNU/Linux Unknown 2012-03-13 2012-03-13 Engarde Secure Linux Unknown 2012-03-13 2012-03-13 Fedora Project Unknown 2012-03-13 2012-03-13 FreeBSD Project Unknown 2012-03-20 2012-03-20 Gentoo Linux Unknown 2012-03-13 2012-03-13 Google Unknown 2012-03-13 2012-03-13 Hewlett-Packard Company Not Affected 2012-03-13 2012-03-15 IBM Corporation (zseries) Unknown 2012-03-13 2012-03-13 IBM eServer Unknown 2012-03-13 2012-03-13 Infoblox Unknown 2012-03-13 2012-03-13 Mandriva S. A. Unknown 2012-03-13 2012-03-13 MontaVista Software, Inc. Unknown 2012-03-13 2012-03-13 NetBSD Unknown 2012-03-20 2012-03-20 Novell, Inc. Unknown 2012-03-13 2012-03-13 OpenBSD Unknown 2012-03-20 2012-03-20 Openwall GNU/*/Linux Unknown 2012-03-13 2012-03-13 Quagga Affected 2012-03-07 2012-03-21 Red Hat, Inc. Unknown 2012-03-13 2012-03-13 SafeNet Unknown 2012-03-13 2012-03-13 Slackware Linux Inc. Unknown 2012-03-13 2012-03-13 Sun Microsystems, Inc. Unknown 2012-03-13 2012-03-13 SUSE Linux Unknown 2012-03-13 2012-03-13 The SCO Group Unknown 2012-03-13 2012-03-13 Turbolinux Unknown 2012-03-13 2012-03-13 Ubuntu Unknown 2012-03-13 2012-03-13 References http://www.nongnu.org/quagga/ https://bugzilla.quagga.net/show_bug.cgi?id=705 Credit Thanks to Martin Winter at OpenSourceRouting.org for reporting these vulnerabilities, MU Dynamics for their sponsorship of the protocol fuzzer which uncovered these issues, and Denis Ovsienko for fixing the issues. This document was written by Jared Allar. Other Information Date Public: 2012-03-23 Date First Published: 2012-03-23 Date Last Updated: 2012-03-23 CERT Advisory: CVE-ID(s): CVE-2012-0249 CVE-2012-0250 CVE-2012-0255 NVD-ID(s): CVE-2012-0249 CVE-2012-0250 CVE-2012-0255 US-CERT Technical Alerts: Severity Metric: 1,50 Document Revision: 29 If you have feedback, comments, or additional information about this vulnerability, please send us email. ====================================================================== ========================================================= Serveur de référence du CERT-Renater https://services.renater.fr/ssi/ ========================================================= + CERT-RENATER | tel : 01-53-94-20-44 + + 23 - 25 Rue Daviel | fax : 01-53-94-20-41 + + 75013 Paris | email: certsvp@renater.fr + =========================================================