CVE-2024-50042·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: ice: Fix increasing MSI-X on VF Increasing MSI-X value on a VF leads to invalid memory operations. This is caused by not reallocating some arrays. Reproducer: modprobe ice echo 0 > /sys/bus/pci/devices/$PF_PCI/sriov_drivers_autoprobe echo 1 > /sys/bus/pci/devices/$PF_PCI/sriov_numvfs echo 17 > /sys/bus/pci/devices/$VF0_PCI/sriov_vf_msix_count Default MSI-X is 16, so 17 and above triggers this issue. KASAN reports: BUG: KASAN: slab-out-of-bounds in ice_vsi_alloc_ring_stats+0x38d/0x4b0 [ice] Read of size 8 at addr ffff8888b937d180 by task bash/28433 (...) Call Trace: (...) ? ice_vsi_alloc_ring_stats+0x38d/0x4b0 [ice] kasan_report+0xed/0x120 ? ice_vsi_alloc_ring_stats+0x38d/0x4b0 [ice] ice_vsi_alloc_ring_stats+0x38d/0x4b0 [ice] ice_vsi_cfg_def+0x3360/0x4770 [ice] ? mutex_unlock+0x83/0xd0 ? __pfx_ice_vsi_cfg_def+0x10/0x10 [ice] ? __pfx_ice_remove_vsi_lkup_fltr+0x10/0x10 [ice] ice_vsi_cfg+0x7f/0x3b0 [ice] ice_vf_reconfig_vsi+0x114/0x210 [ice] ice_sriov_set_msix_vec_count+0x3d0/0x960 [ice] sriov_vf_msix_count_store+0x21c/0x300 (...) Allocated by task 28201: (...) ice_vsi_cfg_def+0x1c8e/0x4770 [ice] ice_vsi_cfg+0x7f/0x3b0 [ice] ice_vsi_setup+0x179/0xa30 [ice] ice_sriov_configure+0xcaa/0x1520 [ice] sriov_numvfs_store+0x212/0x390 (...) To fix it, use ice_vsi_rebuild() instead of ice_vf_reconfig_vsi(). This causes the required arrays to be reallocated taking the new queue count into account (ice_vsi_realloc_stat_arrays()). Set req_txq and req_rxq before ice_vsi_rebuild(), so that realloc uses the newly set queue count. Additionally, ice_vsi_rebuild() does not remove VSI filters (ice_fltr_remove_all()), so ice_vf_init_host_cfg() is no longer necessary.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.11.4
- Published
- 2024-10-21
Affected versions
From: 6.8
Until: 6.11.4
Fixed in: 6.11.4
How to fix this CVE
Update your Linux kernel to version 6.11.4 or later to resolve this memory safety issue affecting Intel ice driver VF (Virtual Function) MSI-X vector allocation. The vulnerability occurs when dynamically increasing MSI-X interrupts on virtual functions without properly reallocating internal queue statistics arrays, leading to out-of-bounds memory access and system crashes. Apply the kernel update immediately if you are running kernels 6.8 through 6.11.3 and utilize SR-IOV virtualization with Intel ice network adapters.
sudo dnf update kernel kernel-devel kernel-headersDefensia detects this vulnerability
How to check if you are affected
- Run 'uname -r' to check the currently running kernel version; if it reports 6.8.x through 6.11.3, your system is vulnerable
- Execute 'lsmod | grep ice' to confirm the Intel ice driver is loaded; if present, SR-IOV VF configuration changes pose a risk
- Check 'cat /sys/bus/pci/devices/*/sriov_numvfs' to identify active virtual functions; if any VF exists with MSI-X count above default (16), the vulnerability may have been triggered
- Examine kernel logs with 'dmesg | grep -i kasan' or 'journalctl -p err' for slab-out-of-bounds errors referencing ice_vsi_alloc_ring_stats; such entries indicate successful exploitation
FAQ
What is CVE-2024-50042?
CVE-2024-50042 is a memory safety vulnerability in the Linux kernel's Intel ice network driver that occurs when increasing MSI-X vector counts on SR-IOV virtual functions. The bug fails to reallocate internal ring statistics arrays, causing out-of-bounds memory reads and potential system crashes.
Is CVE-2024-50042 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog and no public exploits are available. However, it can be trivially triggered by local users with sysfs write permissions who manage SR-IOV virtual functions.
What versions of Kernel are affected by CVE-2024-50042?
Linux kernel versions 6.8.0 through 6.11.3 are vulnerable; version 6.11.4 and later contain the fix.
How do I check if my server is vulnerable to CVE-2024-50042?
Run 'uname -r' and compare your kernel version against the vulnerable range (6.8.x–6.11.3). If your kernel falls within this range and the ice driver is loaded (confirmed by 'lsmod | grep ice'), your system is vulnerable if SR-IOV is in use.
Does Defensia detect CVE-2024-50042?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2024-50042 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2024-50042. Free for 1 server.
Get started free