Look up another CVE · open CVE-2024-42123 in the interactive tracker
CVE-2024-42123
drm/amdgpu: fix double free err_addr pointer warnings
Published 2024-07-30 (2 years 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-42123 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
In amdgpu_umc_bad_page_polling_timeout, the amdgpu_umc_handle_bad_pages will be run many times so that double free err_addr in some special case. So set the err_addr to NULL to avoid the warnings.
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_umc.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-07-30 (2 years ago)source
- CVSS
- 7.0 high
CVSS:3.1/AV:L/AC:H/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.1% 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 | 6.9.9 | 8e24beb3c2b0 |
| 4.2 | 6.10 | 506c245f3f1c |
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 path is reached only through local GPU access — a compute job on /dev/kfd + /dev/dri/renderD* raising a per-PASID poison-consumption interrupt, or the driver's own page-retirement kthread. No network or adjacent-network input reaches amdgpu_umc_handle_bad_pages().
- AC:HAttack complexity, high
- Triggering requires a real uncorrectable ECC/poison event in GPU HBM and, on a later poll iteration, amdgpu_dpm_get_ecc_info() returning a value other than 0 or -EOPNOTSUPP so that neither allocation branch runs — both conditions are hardware/firmware state the attacker cannot manufacture. The ~100-iteration polling loop gives many attempts per event, but the initiating hardware fault remains outside attacker control.
- PR:LPrivileges required, low
- The consumption side is driven by an unprivileged userspace compute process — event_interrupt_poison_consumption_v11() dispatches on the job's PASID, and /dev/kfd and /dev/dri/renderD* are routinely granted to the render group on ML/HPC and multi-tenant GPU nodes and inside GPU containers. Root is not required (the debugfs ras_ctrl injection interface is merely a more reliable alternate route, and is itself created with world-writable S_IWUGO mode bits).
- UI:NUser interaction, none
- The double free happens autonomously inside the RAS interrupt handler and the amdgpu_ras_page_retirement_thread kthread once the poison event occurs. No victim action of any kind is needed.
- S:UScope, unchanged
- The corruption is confined to the host kernel's slab allocator, within the same security authority. The SR-IOV VF branch of amdgpu_umc_poison_handler() bypasses this code entirely, so no guest-to-host or IOMMU boundary is crossed.
- C:HConfidentiality impact, high
- Beyond the generic UAF read primitive from a double free, there is a concrete disclosure path: the stale err_addr is passed to amdgpu_ras_add_bad_pages() with a persisted err_addr_cnt, copying freed slab contents into con->eh_data->bps, which are then persisted to the RAS EEPROM and readable by any local user through the S_IRUGO gpu_vram_bad_pages sysfs binary attribute.
- I:HIntegrity impact, high
- Freeing the same kcalloc'd object twice corrupts the SLUB freelist and, if the object is reallocated between the two frees, releases a live in-use allocation — a standard route to a controlled arbitrary-write primitive. The stale-pointer data additionally drives amdgpu_vram_mgr_reserve_range() and permanent RAS EEPROM writes with garbage retired-page addresses.
- A:HAvailability impact, high
- With CONFIG_SLAB_FREELIST_HARDENED or SLUB debug the double free is detected and panics/BUGs immediately; without it the resulting freelist corruption and use-after-free crash the kernel. Either way the outcome is a full denial of service, compounded by the mode-2 GPU reset already in flight on this path.