> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Martyna Szapar-Mudlaw
> Sent: Tuesday, March 4, 2025 12:09 PM
> To: [email protected]
> Cc: [email protected]; Polchlopek, Mateusz
> <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; Martyna Szapar-Mudlaw <martyna.szapar-
> [email protected]>
> Subject: [Intel-wired-lan] [iwl-net v3 5/5] ice: fix using untrusted value of 
> pkt_len
> in ice_vc_fdir_parse_raw()
> 
> From: Mateusz Polchlopek <[email protected]>
> 
> Fix using the untrusted value of proto->raw.pkt_len in function
> ice_vc_fdir_parse_raw() by verifying if it does not exceed the
> VIRTCHNL_MAX_SIZE_RAW_PACKET value.
> 
> Fixes: 99f419df8a5c ("ice: enable FDIR filters from raw binary patterns for 
> VFs")
> Reviewed-by: Przemek Kitszel <[email protected]>
> Signed-off-by: Mateusz Polchlopek <[email protected]>
> Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-
> [email protected]>
> ---
>  .../ethernet/intel/ice/ice_virtchnl_fdir.c    | 24 ++++++++++++-------
>  1 file changed, 15 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> index 14e3f0f89c78..9be4bd717512 100644
> --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c
> @@ -832,21 +832,27 @@ ice_vc_fdir_parse_raw(struct ice_vf *vf,

Tested-by: Rafal Romanowski <[email protected]>


Reply via email to