Look up another CVE · open CVE-2024-42162 in the interactive tracker
CVE-2024-42162
gve: Account for stopped queues when reading NIC stats
Published 2024-07-30 (2 years ago) by the Linux kernel CNA. Subsystem drivers/net. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-42162 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.9.9-1 | Update the kernel and reboot. Fixed in 6.9.9-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.9.9-1 | Update the kernel and reboot. Fixed in 6.9.9-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.9.9-1 | Update the kernel and reboot. Fixed in 6.9.9-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
We now account for the fact that the NIC might send us stats for a subset of queues. Without this change, gve_get_ethtool_stats might make an invalid access on the priv->stats_report->stats array.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/net/ethernet/google/gve/gve_ethtool.c
- What this is
- GOOGLE ETHERNET DRIVERSMAINTAINERS section matched on drivers/net/ethernet/google · netdev@vger.kernel.org · Maintained
- Kernel module
- gve
Check it on the machine
grep -wE 'CONFIG_ETHERNET|CONFIG_GVE|CONFIG_NET_VENDOR_GOOGLE' /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w gvePrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormMnot built on armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, i386/686, i386/686-pae, i386/rt/686-pae, ppc64el/powerpc64le
- trixieMnot built on armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- forky, sidMnot built on armhf/armmp, armhf/armmp-lpae, loong64/loong64, ppc64el/powerpc64le, ppc64el/powerpc64le-64k, riscv64/riscv64, s390x/s390x
- M
- a module where it is built at all; some flavours do not build it
- Build switches
- CONFIG_ETHERNET, CONFIG_GVE, CONFIG_NET_VENDOR_GOOGLE
- Reads as
- all on means the file is compiled; any one off means it is not.
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2024-07-30 (2 years ago)source
- CVSS
- 7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.21%, higher than 10.2% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- drivers/net
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 5.10 | 6.9.9 | 32675d828c8a |
| 5.10 | 6.10 | af9bcf910b1f |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerable code is reached through the `SIOCETHTOOL`/`ETHTOOL_GSTATS` ioctl on a local netdev, requiring local system access. There is no remote or adjacent-network path into `gve_get_ethtool_stats()`.
- AC:LAttack complexity, low
- The attacker can invoke `ethtool -S` an unlimited number of times with no rate limit, and because the out-of-bounds index comes from an uninitialized small kmalloc allocation, standard slab grooming lets the attacker place chosen values there, making the OOB access reliable and repeatable rather than dependent on chance.
- PR:LPrivileges required, low
- `ETHTOOL_GSTATS` is explicitly listed among the ethtool commands "allowed to be done by anyone" in `__dev_ethtool()`, bypassing the `ns_capable(CAP_NET_ADMIN)` check, so only an ordinary unprivileged local account is needed.
- UI:NUser interaction, none
- The attacker triggers the entire flow themselves with a single ioctl; no action by any other user or administrator is required.
- S:UScope, unchanged
- The out-of-bounds read and write are confined to kernel memory within the same security authority as the kernel itself, with no crossing of a VM, IOMMU, or sandbox boundary.
- C:HConfidentiality impact, high
- Four `u64` words per affected queue are read from an uncontrolled/groomable offset outside the `priv->stats_report->stats` DMA buffer and copied straight to userspace by `ethtool_get_stats()`, yielding disclosure of arbitrary kernel memory including pointers and secrets.
- I:HIntegrity impact, high
- The unvalidated device-supplied `queue_id` is used directly as an index in `rx_qid_to_stats_idx[queue_id] = stats_idx`, giving a far out-of-bounds heap write of a partly controlled `int`; the fix's added bounds checks confirm this is an out-of-bounds write suitable for heap corruption and control-flow hijack.
- A:HAvailability impact, high
- A garbage `stats_idx` can address up to ±32 GB from the stats buffer, so dereferencing unmapped or non-canonical memory produces a kernel oops/panic, and the OOB write can corrupt adjacent slab objects and crash the system.