Vulnerability · Published Oct 21, 2024 · Assigned by Linux

CVE-2024-50020ice: Fix improper handling of refcount in ice_sriov_set_msix_vec_count()

Medium 5.5

In plain English

A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 10% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 89.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: ice: Fix improper handling of refcount in ice_sriov_set_msix_vec_count() This patch addresses an issue with improper reference count handling in the ice_sriov_set_msix_vec_count() function. First, the function calls ice_get_vf_by_id(), which increments the reference count of the vf pointer. If the subsequent call to ice_get_vf_vsi() fails, the function currently returns an error without decrementing the reference count of the vf pointer, leading to a reference count leak. The correct behavior, as implemented in this patch, is to decrement the reference count using ice_put_vf(vf) before returning an error when vsi is NULL. Second, the function calls ice_sriov_get_irqs(), which sets vf->first_vector_idx. If this call returns a negative value, indicating an error, the function returns an error without decrementing the reference count of the vf pointer, resulting in another reference count leak. The patch addresses this by adding a call to ice_put_vf(vf) before returning an error when vf->first_vector_idx < 0. This bug was identified by an experimental static analysis tool developed by our team. The tool specializes in analyzing reference count operations and identifying potential mismanagement of reference counts. In this case, the tool flagged the missing decrement operation as a potential issue, leading to this patch.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:13linux6.11.4-1DEBIAN-CVE-2024-50020
Debian:14linux6.11.4-1DEBIAN-CVE-2024-50020
Ubuntu:24.04:LTSlinux6.8.0-56.58UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux6.8.0-56.58USN-7383-1
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-aws6.8.0-1025.27USN-7383-1
Ubuntu:24.04:LTSlinux-aws6.8.0-1025.27UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-aws-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1027.29~22.04.1USN-7451-1
Ubuntu:22.04:LTSlinux-aws-6.86.8.0-1027.29~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-azure6.8.0-1025.30UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-azure-6.116.11.0-1012.12~24.04.1UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-azure-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-azure-6.86.8.0-1025.30~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-azure-nvidia6.8.0-1014.15UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-gcp6.8.0-1026.28UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-gcp6.8.0-1026.28USN-7383-1
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-gcp-6.116.11.0-1011.11~24.04.1UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-gcp-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1026.28~22.04.1USN-7383-1
Ubuntu:22.04:LTSlinux-gcp-6.86.8.0-1026.28~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-gke6.8.0-1021.25UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-gke6.8.0-1021.25USN-7383-1
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1008.10USN-7383-1
Ubuntu:24.04:LTSlinux-gkeop6.8.0-1008.10UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-hwe-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-hwe-6.86.8.0-57.59~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-ibm6.8.0-1022.22UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-ibm-6.86.8.0-1023.23~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-intel-iot-realtimeno fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-56.58.1UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-lowlatency6.8.0-56.58.1USN-7383-1
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-56.58.1~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.86.8.0-56.58.1~22.04.1USN-7383-1
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1024.27USN-7383-1
Ubuntu:24.04:LTSlinux-nvidia6.8.0-1024.27UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-nvidia-6.116.11.0-1007.7UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-nvidia-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1024.27~22.04.1USN-7383-1
Ubuntu:22.04:LTSlinux-nvidia-6.86.8.0-1024.27~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1024.27.1UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-nvidia-lowlatency6.8.0-1024.27.1USN-7383-1
Ubuntu:24.04:LTSlinux-nvidia-tegra6.8.0-1004.4UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-oem-6.116.11.0-1015.15UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-oem-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-oem-6.86.8.0-1024.24UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-oracle6.8.0-1022.23USN-7383-1
Ubuntu:24.04:LTSlinux-oracle6.8.0-1022.23UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-oracle-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1022.23~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-oracle-6.86.8.0-1022.23~22.04.1USN-7383-1
Ubuntu:24.04:LTSlinux-raspi6.8.0-1028.32UBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-raspi6.8.0-1028.32USN-7524-1
Ubuntu:24.04:LTSlinux-raspi-realtimeno fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-realtimeno fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-riscv6.8.0-56.58.1UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-riscv-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-riscv-6.86.8.0-56.58.1~22.04.1UBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2024-50020
Ubuntu:22.04:LTSlinux-starfive-6.5no fix listedUBUNTU-CVE-2024-50020
Ubuntu:24.04:LTSlinux-xilinx6.8.0-1017.18UBUNTU-CVE-2024-50020

Affected products (as reported)

VendorProductVersions
Linux Linux 4d38cb44bd321c81da3457cfbc38501ed8cb6714 – before 416dbb815ca69684de148328990ba0ec53e6dbc14d38cb44bd321c81da3457cfbc38501ed8cb6714 – before d517cf89874c6039e6294b18d66f40988e62502a
Linux Linux 6.7

References