]> git.proxmox.com Git - mirror_ovs.git/commit
odp-util: Add checking to prevent buffer overflow when parsing push_nsh
authorYifeng Sun <pkusunyifeng@gmail.com>
Tue, 13 Nov 2018 19:25:24 +0000 (11:25 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 15 Nov 2018 16:27:13 +0000 (08:27 -0800)
commit33a3ee6b39acd9799301ec6cc0069bc9e4b4428b
treec466e112065b160e6aa5aa7666f73eb5ed2e8b3f
parent581d3bec7b8c714a98744b0b5f48dd7c7c4db037
odp-util: Add checking to prevent buffer overflow when parsing push_nsh

Previously, the buffer size of 'struct ofpbuf b' is less than the
size of 'char buf[512]', this could cause memory overflow of ofpbuf
when calling ofpbuf_put_hex. This patch fixes it.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10865
Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/odp-util.c