diff options
author | GaoChX <chiso.gao@gmail.com> | 2022-08-04 10:04:33 +0800 |
---|---|---|
committer | chiso.gao@gmail.com <chiso.gao@gmail.com> | 2022-08-04 06:45:31 +0000 |
commit | 5fcec2053eab28b8b56e6d692d9822dc22bd073f (patch) | |
tree | a6aeb16ce113bf423efc96cd883a28d48f30b6b0 /src/plugins | |
parent | 44ec846f4ad1c11cc596c9fa6b73284511131ed4 (diff) |
arping: validate am->interfaces before check address
May cause pointers point to unexpected non-zero addresses if not
validate vec
Type: fix
Change-Id: Ie4d3343d6734125b98e0dc962e33e0c7514da829
Signed-off-by: GaoChX <chiso.gao@gmail.com>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/arping/arping.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/arping/arping.c b/src/plugins/arping/arping.c index 14f92589ea7..a446c259d44 100644 --- a/src/plugins/arping/arping.c +++ b/src/plugins/arping/arping.c @@ -554,7 +554,8 @@ arping_neighbor_probe_dst (vlib_main_t *vm, arping_args_t *args) arping_intf_t aif; /* Disallow multiple sends on the same interface for now. Who needs it? */ - if (am->interfaces && (am->interfaces[args->sw_if_index] != 0)) + if ((vec_len (am->interfaces) > args->sw_if_index) && + (am->interfaces[args->sw_if_index] != 0)) { error = clib_error_return ( 0, "arping command is in progress for the same interface. " |