Reported-by: Oscar Wilde <[email protected]>
Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047070.html
Signed-off-by: Ben Pfaff <[email protected]>
---
 AUTHORS.rst           | 1 +
 utilities/ovs-ofctl.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/AUTHORS.rst b/AUTHORS.rst
index 6ba9bf7c3644..a5c93d9183fb 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -538,6 +538,7 @@ Murali R                        [email protected]
 Nagi Reddy Jonnala              [email protected]
 Niels van Adrichem              [email protected]
 Niklas Andersson                [email protected]
+Oscar Wilde                     [email protected]
 Pankaj Thakkar                  [email protected]
 Pasi Kärkkäinen                 [email protected]
 Patrik Andersson R              [email protected]
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 6acbbf140d4f..8d14a9b59f71 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -2781,7 +2781,8 @@ ofctl_ofp_parse_pcap(struct ovs_cmdl_context *ctx)
 
                     oh = dp_packet_data(payload);
                     length = ntohs(oh->length);
-                    if (dp_packet_size(payload) < length) {
+                    if (dp_packet_size(payload) < length
+                        || length < sizeof *oh) {
                         break;
                     }
 
-- 
2.16.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to