]> git.proxmox.com Git - mirror_ovs.git/commit
odp-util: Set a limit for nested parse_odp_key_mask_attr call
authorYifeng Sun <pkusunyifeng@gmail.com>
Wed, 7 Nov 2018 20:42:17 +0000 (12:42 -0800)
committerBen Pfaff <blp@ovn.org>
Fri, 9 Nov 2018 21:09:54 +0000 (13:09 -0800)
commitac20d3feb127fe0ed1474ba87935260a18bde67c
treee4c8e165a4a8d5674a75684d669e1196d0cfeb9b
parentdc4be59890aad3e5bc8b39f9e09406ca74e11768
odp-util: Set a limit for nested parse_odp_key_mask_attr call

This patch puts a limit on the nested depth in flow key string to avoid
stackoverflow. An example to show this issue is a key string contains
thousands of nested encaps. In addition, a new test is added for this fix.

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