Hi,

> -----Original Message-----
> From: Dariusz Sosnowski <dsosnow...@nvidia.com>
> Sent: Tuesday, February 27, 2024 3:58 PM
> To: Slava Ovsiienko <viachesl...@nvidia.com>; Ori Kam <or...@nvidia.com>;
> Suanming Mou <suanmi...@nvidia.com>; Matan Azrad
> <ma...@nvidia.com>
> Cc: dev@dpdk.org; sta...@dpdk.org
> Subject: [PATCH v2] net/mlx5: fix VLAN handling in meter split
> 
> 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: 50f576d657d7 ("net/mlx5: fix VLAN actions in meter")
> Cc: suanmi...@nvidia.com
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnow...@nvidia.com>
> Acked-by: Suanming Mou <suanmi...@nvidia.com>
> ---
> v2:
> - Rebased.
> 
Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

Reply via email to