parent
a9eef0f974
commit
39d67d1035
@ -0,0 +1,31 @@
|
||||
From ebeef5b165fff88eff987628b5d849a6bffd017b Mon Sep 17 00:00:00 2001
|
||||
From: Ben Pfaff <blp@ovn.org>
|
||||
Date: Fri, 26 May 2017 13:22:26 -0700
|
||||
Subject: [PATCH] ofp-print: Don't abort on unknown reason in role status
|
||||
message.
|
||||
|
||||
A buggy or malicious switch could send a role status message with a bad
|
||||
reason code, which if printed by OVS would cause it to abort. This fixes
|
||||
the problem.
|
||||
|
||||
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
|
||||
Signed-off-by: Ben Pfaff <blp@ovn.org>
|
||||
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
|
||||
---
|
||||
lib/ofp-print.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/ofp-print.c b/lib/ofp-print.c
|
||||
index c03af61c3f..796039e728 100644
|
||||
--- a/lib/ofp-print.c
|
||||
+++ b/lib/ofp-print.c
|
||||
@@ -2098,7 +2098,8 @@ ofp_print_role_status_message(struct ds *string, const struct ofp_header *oh)
|
||||
break;
|
||||
case OFPCRR_N_REASONS:
|
||||
default:
|
||||
- OVS_NOT_REACHED();
|
||||
+ ds_put_cstr(string, "(unknown)");
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 050f90662dde1da1ee3cdd209a9b65196a808811 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Pfaff <blp@ovn.org>
|
||||
Date: Fri, 26 May 2017 12:59:06 -0700
|
||||
Subject: [PATCH] ofp-util: Check length of buckets in
|
||||
ofputil_pull_ofp15_group_mod().
|
||||
|
||||
This code blindly read forward for the number of bytes specified by the
|
||||
message without checking that it was in range.
|
||||
|
||||
This bug is part of OpenFlow 1.5 support. Open vSwitch does not enable
|
||||
OpenFlow 1.5 support by default.
|
||||
|
||||
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
|
||||
Signed-off-by: Ben Pfaff <blp@ovn.org>
|
||||
Acked-by: Yi-Hung Wei <yihung.wei@gmail.com>
|
||||
---
|
||||
lib/ofp-util.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/lib/ofp-util.c b/lib/ofp-util.c
|
||||
index 92c17f4837..39ab8362d0 100644
|
||||
--- a/lib/ofp-util.c
|
||||
+++ b/lib/ofp-util.c
|
||||
@@ -9418,6 +9418,9 @@ ofputil_pull_ofp15_group_mod(struct ofpbuf *msg, enum ofp_version ofp_version,
|
||||
}
|
||||
|
||||
bucket_list_len = ntohs(ogm->bucket_array_len);
|
||||
+ if (bucket_list_len > msg->size) {
|
||||
+ return OFPERR_OFPBRC_BAD_LEN;
|
||||
+ }
|
||||
error = ofputil_pull_ofp15_buckets(msg, bucket_list_len, ofp_version,
|
||||
gm->type, &gm->buckets);
|
||||
if (error) {
|
Loading…
Reference in new issue