summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/quagga/files/0001-bgpd-relax-ORF-capability-length-handling.patch
diff options
context:
space:
mode:
authorYue Tao <Yue.Tao@windriver.com>2014-06-15 22:24:44 -0400
committerJoe MacDonald <joe_macdonald@mentor.com>2014-06-15 23:21:56 -0400
commit26b31ad72899a68d93029f5cce4afa63c3b78a6b (patch)
treee0d1c162da0fd449b4887e7f3b8e1c77ff0f1cfd /meta-networking/recipes-protocols/quagga/files/0001-bgpd-relax-ORF-capability-length-handling.patch
parentd42a2e16056777615e6bcc126cdb92db3b4f9cdf (diff)
downloadmeta-openembedded-26b31ad72899a68d93029f5cce4afa63c3b78a6b.tar.gz
quagga: Security Advisory - CVE-2012-1820
The bgp_capability_orf function in bgpd in Quagga 0.99.20.1 and earlier allows remote attackers to cause a denial of service (assertion failure and daemon exit) by leveraging a BGP peering relationship and sending a malformed Outbound Route Filtering (ORF) capability TLV in an OPEN message. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-1820 Signed-off-by: Yue Tao <Yue.Tao@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-protocols/quagga/files/0001-bgpd-relax-ORF-capability-length-handling.patch')
-rw-r--r--meta-networking/recipes-protocols/quagga/files/0001-bgpd-relax-ORF-capability-length-handling.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/quagga/files/0001-bgpd-relax-ORF-capability-length-handling.patch b/meta-networking/recipes-protocols/quagga/files/0001-bgpd-relax-ORF-capability-length-handling.patch
new file mode 100644
index 0000000000..0ec02dc861
--- /dev/null
+++ b/meta-networking/recipes-protocols/quagga/files/0001-bgpd-relax-ORF-capability-length-handling.patch
@@ -0,0 +1,42 @@
1From 5e728e929942d39ce5a4ab3d01c33f7b688c4e3f Mon Sep 17 00:00:00 2001
2From: David Lamparter <equinox@opensourcerouting.org>
3Date: Wed, 23 Jan 2013 05:50:24 +0100
4Subject: [PATCH] bgpd: relax ORF capability length handling
5
6Upstream-Status: Backport
7
8commit fe9bb64... "bgpd: CVE-2012-1820, DoS in bgp_capability_orf()"
9made the length test in bgp_capability_orf_entry() stricter and is now
10causing us to refuse (with CEASE) ORF capabilites carrying any excess
11data. This does not conform to the robustness principle as laid out by
12RFC1122 ("be liberal in what you accept").
13
14Even worse, RFC5291 is quite unclear on how to use the ORF capability
15with multiple AFI/SAFIs. It can be interpreted as either "use one
16instance, stuff everything in" but also as "use multiple instances".
17So, if not for applying robustness, we end up clearing sessions from
18implementations going by the former interpretation. (or if anyone dares
19add a byte of padding...)
20
21Cc: Denis Ovsienko <infrastation@yandex.ru>
22Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
23---
24 bgpd/bgp_open.c | 2 +-
25 1 files changed, 1 insertions(+), 1 deletions(-)
26
27diff --git a/bgpd/bgp_open.c b/bgpd/bgp_open.c
28index af711cc..7bf3501 100644
29--- a/bgpd/bgp_open.c
30+++ b/bgpd/bgp_open.c
31@@ -230,7 +230,7 @@ bgp_capability_orf_entry (struct peer *peer, struct capability_header *hdr)
32 }
33
34 /* validate number field */
35- if (sizeof (struct capability_orf_entry) + (entry.num * 2) != hdr->length)
36+ if (sizeof (struct capability_orf_entry) + (entry.num * 2) > hdr->length)
37 {
38 zlog_info ("%s ORF Capability entry length error,"
39 " Cap length %u, num %u",
40--
411.7.5.4
42