-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx5: fix VLAN handling in meter split
[ upstream commit 5d2301a222d77e7bac3a085aa17f8ef7a3af7ffe ] On the attempt to create a flow rule with: - matching on REPRESENTED_PORT, - matching on outer VLAN tag, - matching on inner VLAN tag, - METER action, flow splitting mechanism for handling metering flows was causing memory corruption. It was assumed that suffix flow will have a single VLAN item (used for translation of OF_PUSH_VLAN/OF_SET_VLAN_VID actions), however during flow_meter_split_prep() 2 VLAN items were parsed. This caused the buffer overflow on allocated suffix flow item buffer. This patch fixes this overflow, by account for number of VLAN items in flow rule pattern when allocating items for suffix flow. Fixes: 50f576d ("net/mlx5: fix VLAN actions in meter") Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com> Acked-by: Suanming Mou <suanmingm@nvidia.com>
- Loading branch information
1 parent
c52e6e0
commit 03c7f0a
Showing
1 changed file
with
39 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters