Hi,

> -----Original Message-----
> From: Dariusz Sosnowski <[email protected]>
> Sent: Tuesday, February 27, 2024 3:58 PM
> To: Slava Ovsiienko <[email protected]>; Ori Kam <[email protected]>;
> Suanming Mou <[email protected]>; Matan Azrad
> <[email protected]>
> Cc: [email protected]; [email protected]
> 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: [email protected]
> Cc: [email protected]
> 
> Signed-off-by: Dariusz Sosnowski <[email protected]>
> Acked-by: Suanming Mou <[email protected]>
> ---
> v2:
> - Rebased.
> 
Patch applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh

Reply via email to