Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
Vulnerability Details :

CVE-2024-35981

Summary
Assigner-Linux
Assigner Org ID-416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published At-20 May, 2024 | 09:42
Updated At-04 May, 2025 | 09:09
Rejected At-
Credits

virtio_net: Do not send RSS key if it is not supported

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.

Vendors
-
Not available
Products
-
Metrics (CVSS)
VersionBase scoreBase severityVector
Weaknesses
Attack Patterns
Solution/Workaround
References
HyperlinkResource Type
EPSS History
Score
Latest Score
-
N/A
No data available for selected date range
Percentile
Latest Percentile
-
N/A
No data available for selected date range
Stakeholder-Specific Vulnerability Categorization (SSVC)
▼Common Vulnerabilities and Exposures (CVE)
cve.org
Assigner:Linux
Assigner Org ID:416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published At:20 May, 2024 | 09:42
Updated At:04 May, 2025 | 09:09
Rejected At:
▼CVE Numbering Authority (CNA)
virtio_net: Do not send RSS key if it is not supported

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.

Affected Products
Vendor
Linux Kernel Organization, IncLinux
Product
Linux
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Program Files
  • drivers/net/virtio_net.c
Default Status
unaffected
Versions
Affected
  • From c7114b1249fa3b5f3a434606ba4cc89c4a27d618 before 539a2b995a4ed93125cb0efae0f793b00ab2158b (git)
  • From c7114b1249fa3b5f3a434606ba4cc89c4a27d618 before 43a71c1b4b3a6d4db857b1435d271540279fc7de (git)
  • From c7114b1249fa3b5f3a434606ba4cc89c4a27d618 before 28e9a64638cd16bc1ecac9ff74ffeacb9fb652de (git)
  • From c7114b1249fa3b5f3a434606ba4cc89c4a27d618 before 059a49aa2e25c58f90b50151f109dd3c4cdb3a47 (git)
Vendor
Linux Kernel Organization, IncLinux
Product
Linux
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Program Files
  • drivers/net/virtio_net.c
Default Status
affected
Versions
Affected
  • 5.18
Unaffected
  • From 0 before 5.18 (semver)
  • From 6.1.90 through 6.1.* (semver)
  • From 6.6.29 through 6.6.* (semver)
  • From 6.8.7 through 6.8.* (semver)
  • From 6.9 through * (original_commit_for_fix)
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://git.kernel.org/stable/c/539a2b995a4ed93125cb0efae0f793b00ab2158b
N/A
https://git.kernel.org/stable/c/43a71c1b4b3a6d4db857b1435d271540279fc7de
N/A
https://git.kernel.org/stable/c/28e9a64638cd16bc1ecac9ff74ffeacb9fb652de
N/A
https://git.kernel.org/stable/c/059a49aa2e25c58f90b50151f109dd3c4cdb3a47
N/A
Hyperlink: https://git.kernel.org/stable/c/539a2b995a4ed93125cb0efae0f793b00ab2158b
Resource: N/A
Hyperlink: https://git.kernel.org/stable/c/43a71c1b4b3a6d4db857b1435d271540279fc7de
Resource: N/A
Hyperlink: https://git.kernel.org/stable/c/28e9a64638cd16bc1ecac9ff74ffeacb9fb652de
Resource: N/A
Hyperlink: https://git.kernel.org/stable/c/059a49aa2e25c58f90b50151f109dd3c4cdb3a47
Resource: N/A
▼Authorized Data Publishers (ADP)
1. CISA ADP Vulnrichment
Affected Products
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
2. CVE Program Container
Affected Products
Metrics
VersionBase scoreBase severityVector
Metrics Other Info
Impacts
CAPEC IDDescription
Solutions

Configurations

Workarounds

Exploits

Credits

Timeline
EventDate
Replaced By

Rejected Reason

References
HyperlinkResource
https://git.kernel.org/stable/c/539a2b995a4ed93125cb0efae0f793b00ab2158b
x_transferred
https://git.kernel.org/stable/c/43a71c1b4b3a6d4db857b1435d271540279fc7de
x_transferred
https://git.kernel.org/stable/c/28e9a64638cd16bc1ecac9ff74ffeacb9fb652de
x_transferred
https://git.kernel.org/stable/c/059a49aa2e25c58f90b50151f109dd3c4cdb3a47
x_transferred
Hyperlink: https://git.kernel.org/stable/c/539a2b995a4ed93125cb0efae0f793b00ab2158b
Resource:
x_transferred
Hyperlink: https://git.kernel.org/stable/c/43a71c1b4b3a6d4db857b1435d271540279fc7de
Resource:
x_transferred
Hyperlink: https://git.kernel.org/stable/c/28e9a64638cd16bc1ecac9ff74ffeacb9fb652de
Resource:
x_transferred
Hyperlink: https://git.kernel.org/stable/c/059a49aa2e25c58f90b50151f109dd3c4cdb3a47
Resource:
x_transferred
Information is not available yet
▼National Vulnerability Database (NVD)
nvd.nist.gov
Source:416baaa9-dc9f-4396-8d5f-8c081fb06d67
Published At:20 May, 2024 | 10:15
Updated At:16 Jan, 2025 | 17:22

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.

CISA Catalog
Date AddedDue DateVulnerability NameRequired Action
N/A
Date Added: N/A
Due Date: N/A
Vulnerability Name: N/A
Required Action: N/A
Metrics
TypeVersionBase scoreBase severityVector
Primary3.15.5MEDIUM
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Type: Primary
Version: 3.1
Base score: 5.5
Base severity: MEDIUM
Vector:
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CPE Matches

Linux Kernel Organization, Inc
linux
>>linux_kernel>>Versions from 5.18(inclusive) to 6.1.90(exclusive)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Linux Kernel Organization, Inc
linux
>>linux_kernel>>Versions from 6.2(inclusive) to 6.6.29(exclusive)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Linux Kernel Organization, Inc
linux
>>linux_kernel>>Versions from 6.7(inclusive) to 6.8.7(exclusive)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Linux Kernel Organization, Inc
linux
>>linux_kernel>>6.9
cpe:2.3:o:linux:linux_kernel:6.9:rc1:*:*:*:*:*:*
Linux Kernel Organization, Inc
linux
>>linux_kernel>>6.9
cpe:2.3:o:linux:linux_kernel:6.9:rc2:*:*:*:*:*:*
Linux Kernel Organization, Inc
linux
>>linux_kernel>>6.9
cpe:2.3:o:linux:linux_kernel:6.9:rc3:*:*:*:*:*:*
Weaknesses
CWE IDTypeSource
CWE-835Primarynvd@nist.gov
CWE ID: CWE-835
Type: Primary
Source: nvd@nist.gov
Evaluator Description

Evaluator Impact

Evaluator Solution

Vendor Statements

References
HyperlinkSourceResource
https://git.kernel.org/stable/c/059a49aa2e25c58f90b50151f109dd3c4cdb3a47416baaa9-dc9f-4396-8d5f-8c081fb06d67
Patch
https://git.kernel.org/stable/c/28e9a64638cd16bc1ecac9ff74ffeacb9fb652de416baaa9-dc9f-4396-8d5f-8c081fb06d67
Patch
https://git.kernel.org/stable/c/43a71c1b4b3a6d4db857b1435d271540279fc7de416baaa9-dc9f-4396-8d5f-8c081fb06d67
Patch
https://git.kernel.org/stable/c/539a2b995a4ed93125cb0efae0f793b00ab2158b416baaa9-dc9f-4396-8d5f-8c081fb06d67
Patch
https://git.kernel.org/stable/c/059a49aa2e25c58f90b50151f109dd3c4cdb3a47af854a3a-2127-422b-91ae-364da2661108
Patch
https://git.kernel.org/stable/c/28e9a64638cd16bc1ecac9ff74ffeacb9fb652deaf854a3a-2127-422b-91ae-364da2661108
Patch
https://git.kernel.org/stable/c/43a71c1b4b3a6d4db857b1435d271540279fc7deaf854a3a-2127-422b-91ae-364da2661108
Patch
https://git.kernel.org/stable/c/539a2b995a4ed93125cb0efae0f793b00ab2158baf854a3a-2127-422b-91ae-364da2661108
Patch
Hyperlink: https://git.kernel.org/stable/c/059a49aa2e25c58f90b50151f109dd3c4cdb3a47
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Resource:
Patch
Hyperlink: https://git.kernel.org/stable/c/28e9a64638cd16bc1ecac9ff74ffeacb9fb652de
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Resource:
Patch
Hyperlink: https://git.kernel.org/stable/c/43a71c1b4b3a6d4db857b1435d271540279fc7de
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Resource:
Patch
Hyperlink: https://git.kernel.org/stable/c/539a2b995a4ed93125cb0efae0f793b00ab2158b
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Resource:
Patch
Hyperlink: https://git.kernel.org/stable/c/059a49aa2e25c58f90b50151f109dd3c4cdb3a47
Source: af854a3a-2127-422b-91ae-364da2661108
Resource:
Patch
Hyperlink: https://git.kernel.org/stable/c/28e9a64638cd16bc1ecac9ff74ffeacb9fb652de
Source: af854a3a-2127-422b-91ae-364da2661108
Resource:
Patch
Hyperlink: https://git.kernel.org/stable/c/43a71c1b4b3a6d4db857b1435d271540279fc7de
Source: af854a3a-2127-422b-91ae-364da2661108
Resource:
Patch
Hyperlink: https://git.kernel.org/stable/c/539a2b995a4ed93125cb0efae0f793b00ab2158b
Source: af854a3a-2127-422b-91ae-364da2661108
Resource:
Patch

Change History

0
Information is not available yet

Similar CVEs

0Records found

Details not found