Message ID | 20180810193040.18352-1-blp@ovn.org |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] ofp-port: Fix null dereference parsing Intel custom statistics. | expand |
> On Aug 10, 2018, at 12:30 PM, Ben Pfaff <blp@ovn.org> wrote: > > Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9788 > Fixes: 7333c3b1ce02 ("ofp-port: Fix buffer overread parsing Intel custom statistics.") > Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org. --Justin
On Fri, Aug 17, 2018 at 04:49:38PM -0700, Justin Pettit wrote: > > > On Aug 10, 2018, at 12:30 PM, Ben Pfaff <blp@ovn.org> wrote: > > > > Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9788 > > Fixes: 7333c3b1ce02 ("ofp-port: Fix buffer overread parsing Intel custom statistics.") > > Signed-off-by: Ben Pfaff <blp@ovn.org> > > Acked-by: Justin Pettit <jpettit@ovn.org. Thanks, pushed to master and branch-2.10.
diff --git a/lib/ofp-port.c b/lib/ofp-port.c index 2c812f8ecfa3..8d882a14b4df 100644 --- a/lib/ofp-port.c +++ b/lib/ofp-port.c @@ -1616,7 +1616,7 @@ parse_intel_port_custom_property(struct ofpbuf *payload, /* Counter name. */ uint8_t *name_len = ofpbuf_try_pull(payload, sizeof *name_len); - char *name = ofpbuf_try_pull(payload, *name_len); + char *name = name_len ? ofpbuf_try_pull(payload, *name_len) : NULL; if (!name_len || !name) { return OFPERR_OFPBPC_BAD_LEN; }
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9788 Fixes: 7333c3b1ce02 ("ofp-port: Fix buffer overread parsing Intel custom statistics.") Signed-off-by: Ben Pfaff <blp@ovn.org> --- lib/ofp-port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)