Re: [ovs-dev] [PATCH] ovs-ofctl: Better validate OpenFlow message length in "ofp-parse-pcap".

2018-08-06 Thread Ben Pfaff
On Mon, Aug 06, 2018 at 08:52:12AM -0400, Aaron Conole wrote:
> Ben Pfaff  writes:
> 
> > Reported-by: Oscar Wilde 
> > Reported-at: 
> > https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047070.html
> > Signed-off-by: Ben Pfaff 
> > ---
> 
> Acked-by: Aaron Conole 

Thanks, applied to master and backported as far as branch-2.7.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH] ovs-ofctl: Better validate OpenFlow message length in "ofp-parse-pcap".

2018-08-06 Thread Aaron Conole
Ben Pfaff  writes:

> Reported-by: Oscar Wilde 
> Reported-at: 
> https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047070.html
> Signed-off-by: Ben Pfaff 
> ---

Acked-by: Aaron Conole 
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] ovs-ofctl: Better validate OpenFlow message length in "ofp-parse-pcap".

2018-07-31 Thread Ben Pfaff
Reported-by: Oscar Wilde 
Reported-at: 
https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047070.html
Signed-off-by: Ben Pfaff 
---
 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 Rmuralir...@gmail.com
 Nagi Reddy Jonnala  njonn...@brocade.com
 Niels van Adrichem  n.l.m.vanadric...@tudelft.nl
 Niklas Anderssonnanders...@nicira.com
+Oscar Wilde xdxiao...@gmail.com
 Pankaj Thakkar  thak...@nicira.com
 Pasi Kärkkäinen pa...@iki.fi
 Patrik Andersson R  patrik.r.anders...@ericsson.com
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
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev