You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openvswitch/openvswitch-CVE-2017-9263.p...

32 lines
994 B

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;
}
}