On Tue, Oct 09, 2018 at 03:39:17PM -0700, Yifeng Sun wrote: > ofpbuf_put_hex doesn't know buf's length and only checks buf's content > to process. This is dangerous. This patch fixes it. > > Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10865 > Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10863 > Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10855 > Signed-off-by: Yifeng Sun <[email protected]> > --- > lib/odp-util.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/odp-util.c b/lib/odp-util.c > index 7705bb30ae21..d482d5bcf968 100644 > --- a/lib/odp-util.c > +++ b/lib/odp-util.c > @@ -2107,6 +2107,7 @@ parse_odp_push_nsh_action(const char *s, struct ofpbuf > *actions) > if (ovs_scan_len(s, &n, "md2=0x%511[0-9a-fA-F]", buf)) { > ofpbuf_use_stub(&b, metadata, > NSH_CTX_HDRS_MAX_LEN); > + buf[n - 6] = '\0';
I don't understand this patch yet. ovs_scan_len() should always null-terminate buf. Are there cases where it does not do that? _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
