commit | 1cf50a1f2723764eb53fad7c5ff8754835806df0 | [log] [tgz] |
---|---|---|
author | Andrea Claudi <aclaudi@redhat.com> | Mon May 29 23:42:16 2023 +0200 |
committer | Stephen Hemminger <stephen@networkplumber.org> | Tue May 30 12:25:47 2023 -0700 |
tree | f8d63da5d4fd061bf870d688a308851cb2e94831 | |
parent | b2c6613ef955e6e10c3acadc852057686ffcf721 [diff] |
iproute_lwtunnel: fix array boundary check seg6_mode_types is made up of 5 elements, so ARRAY_SIZE(seg6_mode_types) evaluates to 5. Thus, when mode = 5, this function returns seg6_mode_types[5], resulting in an out-of-bound access. Fix this bailing out when mode is equal to or greater than 5. Fixes: cf87da417bb4 ("iproute: add support for seg6 l2encap mode") Signed-off-by: Andrea Claudi <aclaudi@redhat.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>