]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ice: fix using untrusted value of pkt_len in ice_vc_fdir_parse_raw()
authorMateusz Polchlopek <mateusz.polchlopek@intel.com>
Tue, 4 Mar 2025 11:08:36 +0000 (12:08 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 18 Mar 2025 16:38:16 +0000 (09:38 -0700)
commit1388dd564183a5a18ec4a966748037736b5653c5
treebd8d05497da555b762ea1b20259d4dab52a5cd36
parentc5be6562de5a19c44605b1c1edba8e339f2022c8
ice: fix using untrusted value of pkt_len in ice_vc_fdir_parse_raw()

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 <przemyslaw.kitszel@intel.com>
Signed-off-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
Signed-off-by: Martyna Szapar-Mudlaw <martyna.szapar-mudlaw@linux.intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c