Skip to contentSkip to conversation

CVE-2022-49516: ice: always check VF VSI pointer values

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ice: always check VF VSI pointer values

The ice_get_vf_vsi function can return NULL in some cases, such as if handling messages during a reset where the VSI is being removed and recreated.

Several places throughout the driver do not bother to check whether this VSI pointer is valid. Static analysis tools maybe report issues because they detect paths where a potentially NULL pointer could be dereferenced.

Fix this by checking the return value of ice_get_vf_vsi everywhere.

The Linux kernel CVE team has assigned CVE-2022-49516 to this issue.

Affected and fixed versions
===========================

	Fixed in 5.18.3 with commit e7be3877589d539c52e5d1d23a625f889b541b9d
	Fixed in 5.19 with commit baeb705fd6a7245cc1fa69ed991a9cffdf44a174

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2022-49516

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/net/ethernet/intel/ice/ice_devlink.c drivers/net/ethernet/intel/ice/ice_repr.c drivers/net/ethernet/intel/ice/ice_sriov.c drivers/net/ethernet/intel/ice/ice_vf_lib.c drivers/net/ethernet/intel/ice/ice_virtchnl.c drivers/net/ethernet/intel/ice/ice_virtchnl_fdir.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/e7be3877589d539c52e5d1d23a625f889b541b9d
	https://git.kernel.org/stable/c/baeb705fd6a7245cc1fa69ed991a9cffdf44a174