cve.bz

CVE-2024-35981 linux linux kernel: Infinite Loop

5.5 mediumEPSS 0.2%Fix available

Medium (5.5) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: virtio_net: Do not send RSS key if it is not supported There is a bug when setting the RSS options in virtio_net that can break the whole machine, getting the kernel into an infinite loop. Running the following command in any QEMU virtual machine with virtionet will reproduce this problem: # ethtool -X eth0 hfunc toeplitz This is how the problem happens: 1) ethtool_set_rxfh() calls virtnet_set_rxfh() 2) virtnet_set_rxfh() calls virtnet_commit_rss_command() 3) virtnet_commit_rss_command() populates 4 entries for the rss scatter-gather 4) Since the command above does not have a key, then the last scatter-gatter entry will be zeroed, since rss_key_size == 0. sg_buf_size = vi->rss_key_size; 5) This buffer is passed to qemu, but qemu is not happy with a buffer with zero length, and do the following in virtqueue_map_desc() (QEMU function): if (!sz) { virtio_error(vdev, "virtio: zero sized buffers are not allowed"); 6) virtio_error() (also QEMU function) set the device as broken vdev->broken = true; 7) Qemu bails out, and do not repond this crazy kernel. 8) The kernel is waiting for the response to come back (function virtnet_send_command()) 9) The kernel is waiting doing the following : while (!virtqueue_get_buf(vi->cvq, &tmp) && !virtqueue_is_broken(vi->cvq)) cpu_relax(); 10) None of the following functions above is true, thus, the kernel loops here forever. Keeping in mind that virtqueue_is_broken() does not look at the qemu `vdev->broken`, so, it never realizes that the vitio is broken at QEMU side. Fix it by not sending RSS commands if the feature is not available in the device.

Severity

CVSS 3.1

5.5 medium
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 13th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: partial, assessed 2024-05-20. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-835 Loop with Unreachable Exit Condition (Infinite Loop)
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-35981 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-35981?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-35981?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-35981 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.18 and later

Fixed in

ProductRelease lineFixed in
Linux6.16.1.90
Linux6.66.6.29
Linux6.86.8.7
Linuxlater releases6.9

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12linux6.1.90-1DEBIAN-CVE-2024-35981
Debian13, 14linux6.8.9-1DEBIAN-CVE-2024-35981
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2024-35981
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 11 moreno fix listedUBUNTU-CVE-2024-35981
Ubuntu20.04:LTSlinux-gke, linux-riscv, linux-raspi2 and 24 moreno fix listedUBUNTU-CVE-2024-35981
Ubuntu22.04:LTSlinux-aws-6.86.8.0-1011.12~22.04.1UBUNTU-CVE-2024-35981
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1010.10~22.04.1UBUNTU-CVE-2024-35981
Ubuntu22.04:LTSlinux-nvidia-6.86.8.0-1009.9~22.04.1UBUNTU-CVE-2024-35981
Ubuntu22.04:LTSlinux-oracle-6.86.8.0-1008.8~22.04.1UBUNTU-CVE-2024-35981
Ubuntu22.04:LTSlinux-riscv, linux-aws-6.2, linux-aws-6.5 and 30 moreno fix listedUBUNTU-CVE-2024-35981
Ubuntu24.04:LTSlinux6.8.0-38.38UBUNTU-CVE-2024-35981 USN-6893-1
Ubuntu24.04:LTSlinux-aws6.8.0-1011.12UBUNTU-CVE-2024-35981 USN-6893-3
Ubuntu24.04:LTSlinux-azure6.8.0-1010.10UBUNTU-CVE-2024-35981 USN-6893-1
Ubuntu24.04:LTSlinux-gcp6.8.0-1010.11UBUNTU-CVE-2024-35981 USN-6893-1
8 more for Ubuntu in the JSON and on Ubuntu's page.
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.7.3SUSE-SU-2024:2203-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6-RT_Update_11-150600.1.5.1SUSE-SU-2024:2973-1
SUSELinux Enterprise Live Patching 15 SP6kernel-livepatch-SLE15-SP6_Update_11-150600.13.3.7SUSE-SU-2024:2203-1
SUSELinux Enterprise Module for Basesystem 15 SP6kernel-64kb, kernel-default, kernel-zfcpdump6.4.0-150600.23.7.3SUSE-SU-2024:2203-1
SUSELinux Enterprise Module for Basesystem 15 SP6kernel-default-base6.4.0-150600.23.7.3.150600.12.2.7SUSE-SU-2024:2203-1
SUSELinux Enterprise Module for Basesystem 15 SP6, Linux Enterprise Module for Development Tools 15 SP6kernel-source6.4.0-150600.23.7.2SUSE-SU-2024:2203-1
SUSELinux Enterprise Module for Development Tools 15 SP6kernel-docs6.4.0-150600.23.7.4SUSE-SU-2024:2203-1
SUSELinux Enterprise Module for Development Tools 15 SP6kernel-obs-build6.4.0-150600.23.7.3SUSE-SU-2024:2203-1
SUSELinux Enterprise Module for Development Tools 15 SP6kernel-syms6.4.0-150600.23.7.1SUSE-SU-2024:2203-1
SUSELinux Enterprise Module for Public Cloud 15 SP6kernel-azure, kernel-source-azure6.4.0-150600.8.5.4SUSE-SU-2024:2135-1
SUSELinux Enterprise Module for Public Cloud 15 SP6kernel-syms-azure6.4.0-150600.8.5.1SUSE-SU-2024:2135-1
SUSELinux Micro 6.0kernel-default-base6.4.0-17.1.1.51SUSE-SU-2025:20008-1
3 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6dtb-aarch64, kernel-syms, kernel-obs-qa6.4.0-150600.23.7.1SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-64kb, kernel-debug, kernel-default and 3 more6.4.0-150600.23.7.3SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-azure, kernel-source-azure6.4.0-150600.8.5.4SUSE-SU-2024:2135-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.7.3.150600.12.2.7SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-docs6.4.0-150600.23.7.4SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more6.4.0-150600.10.5.1SUSE-SU-2024:2973-1
openSUSELeap 15.6kernel-source6.4.0-150600.23.7.2SUSE-SU-2024:2203-1
openSUSELeap 15.6kernel-syms-azure6.4.0-150600.8.5.1SUSE-SU-2024:2135-1
Alpaquita23linux-lts6.1.91-r0BELL-CVE-2024-35981
Alpaquita25, streamlinux-lts6.12.41-r0BELL-CVE-2024-35981

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Low.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 6kernelOut of support scope
Red Hat Enterprise Linux 7kernelOut of support scope
Red Hat Enterprise Linux 7kernel-rtOut of support scope
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-35981.

References

Check your stackJSON