Look up another CVE · open CVE-2024-50282 in the interactive tracker
CVE-2024-50282
drm/amdgpu: add missing size check in amdgpu_debugfs_gprwave_read()
Published 2024-11-19 (23 months ago) by the Linux kernel CNA. Subsystem drivers/gpu. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-50282 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.11.9-1 | Update the kernel and reboot. Fixed in 6.11.9-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.11.9-1 | Update the kernel and reboot. Fixed in 6.11.9-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.11.9-1 | Update the kernel and reboot. Fixed in 6.11.9-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
Avoid a possible buffer overflow if size is larger than 4K. (cherry picked from commit f5d873f5825b40d886d03bd2aede91d4cf002434)
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/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
- What this is
- RADEON and AMDGPU DRM DRIVERSMAINTAINERS section matched on drivers/gpu/drm/amd/ · amd-gfx@lists.freedesktop.org · Supported
- Kernel module
- amdgpu
Check it on the machine
grep -w CONFIG_DRM_AMDGPU /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 amdgpuPrints 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 amd64/cloud-amd64, arm64/cloud-arm64, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp
- trixieMnot built on amd64/cloud-amd64, arm64/cloud-arm64, armel/rpi, armhf/armmp, armhf/armmp-lpae, armhf/rt/armmp, s390x/s390x
- forky, sidMnot built on amd64/cloud-amd64, arm64/cloud-arm64, s390x/s390x
- M
- a module where it is built at all; some flavours do not build it
- Build switch
- CONFIG_DRM_AMDGPU
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-11-19 (23 months 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.27%, higher than 18.4% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- drivers/gpu
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 4.2 | 4.19.324 | 673bdb4200c0 |
| 4.2 | 6.6.61 | 8906728f2fbd |
| 4.2 | 6.11.8 | 2faaee36e6e3 |
| 4.2 | 6.12 | 4d75b9468021 |
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
- Exploitation requires opening the local debugfs node /sys/kernel/debug/dri/N/amdgpu_gprwave and issuing an ioctl plus read() against it. There is no network-facing path to this code.
- AC:LAttack complexity, low
- The overflow is fully deterministic — the attacker directly supplies the unvalidated `size` argument to read(), and `wave_read_regs()` writes exactly `size>>2` words into the fixed 4096-byte buffer with no race or unpredictable precondition. No specific memory layout is needed to trigger it.
- PR:LPrivileges required, low
- In the vulnerable kernels the node was mode 0444 and all debugfs directories default to 0755, so an unprivileged local user reaches it on any system that mounts debugfs with kernel-default permissions or relaxes it for GPU tooling (Android, embedded/automotive images, ROCm/umr-enabled compute hosts); the companion stable fix "Regular users shouldn't have read access" confirms regular users had it. No capability check exists on the path itself.
- UI:NUser interaction, none
- The attacker performs open/ioctl/read entirely on its own; no victim action or interaction is required at any point.
- S:UScope, unchanged
- The corruption is confined to the kernel slab of the same system and security authority; no VM, IOMMU, or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- The drain loop copies `size` bytes from the 4096-byte buffer to userspace, directly disclosing tens of kilobytes of adjacent kernel heap — defeating KASLR and leaking credentials, keys, and other slab contents, and this leak occurs even where the vgpr/sgpr callback is absent.
- I:HIntegrity impact, high
- The heap buffer overflow writes an attacker-chosen number of bytes past the kmalloc-4k allocation with GPU wave-register data that a co-operating render-node shader can populate, giving a controlled slab overwrite of adjacent kernel objects — a standard primitive for control-flow hijack and privilege escalation.
- A:HAvailability impact, high
- Overwriting many kilobytes of adjacent slab objects reliably corrupts kernel structures and produces an oops or panic, and the attacker can repeat it at will.