Suanming Mou 4a73c86ff6 net/mlx5: fix crash on GRE flow rule parsing
When set the GRE item, GRE key should follow after GRE header, or the
header gre_item pointer used by the key will be invalid.

Currently in the mlx5_flow_validate_item_gre_key() function, the header
gre_item pointer is access before checking if the key is after the
header or not. Once the key item is before the header, invalid gre_item
pointer access happens.

Move the gre_item pointer access after the GRE header check to avoid the
crash issue.

Fixes: a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Cc: stable@dpdk.org

Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
2019-11-26 18:22:27 +01:00
..
2019-11-26 18:05:15 +01:00
2019-11-26 18:05:15 +01:00
2019-11-26 00:12:08 +01:00
2019-11-26 18:05:15 +01:00
2019-11-26 18:05:15 +01:00
2019-10-23 16:43:08 +02:00
2019-10-23 16:43:08 +02:00