OpenDataPlane / odp

The ODP project is an open-source, cross-platform set of application programming interfaces (APIs) for the networking data plane

Home Page:https://opendataplane.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ipsec SA index out of Bounds

lindgrenfredrik opened this issue · comments

Sending multiple Ipsec packets in single call causes sa_idx counter to go out of bounds.

i.e.

odp_ipsec_sa_t sa;
odp_packet_t pkts[2];
odp_ipsec_out_param_t param;
odp_ipsec_out_inline_param_t inline_param[2];

... /* initialize sa, pkts and inline_param to appropriate values*/

param.num_opt = 0;
param.num_sa = 1;
param.sa = &sa;

odp_ipsec_out_inline(&pkts, 2, &param, &inline_param);

Issue is applicable when referencing a SA per packet as well.
Same issue exists in other functions as well:
odp_ipsec_out_enq
odp_ipsec_in_enq
odp_ipsec_out
odp_ipsec_in