[PATCH v2] net/mlx5: fix VLAN handling in meter split

Raslan Darawsheh rasland at nvidia.com
Wed Feb 28 14:53:53 CET 2024


Hi,

> -----Original Message-----
> From: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Sent: Tuesday, February 27, 2024 3:58 PM
> To: Slava Ovsiienko <viacheslavo at nvidia.com>; Ori Kam <orika at nvidia.com>;
> Suanming Mou <suanmingm at nvidia.com>; Matan Azrad
> <matan at nvidia.com>
> Cc: dev at dpdk.org; stable at 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: suanmingm at nvidia.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Acked-by: Suanming Mou <suanmingm at nvidia.com>
> ---
> v2:
> - Rebased.
> 
Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh


More information about the stable mailing list