Look up another CVE · open CVE-2024-41008 in the interactive tracker
CVE-2024-41008
drm/amdgpu: change vm->task_info handling
Published 2024-07-16 (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-41008 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.7-1 | Update the kernel and reboot. Fixed in 6.9.7-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.9.7-1 | Update the kernel and reboot. Fixed in 6.9.7-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.9.7-1 | Update the kernel and reboot. Fixed in 6.9.7-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
This patch changes the handling and lifecycle of vm->task_info object. The major changes are: - vm->task_info is a dynamically allocated ptr now, and its uasge is reference counted. - introducing two new helper funcs for task_info lifecycle management - amdgpu_vm_get_task_info: reference counts up task_info before returning this info - amdgpu_vm_put_task_info: reference counts down task_info - last put to task_info() frees task_info from the vm. This patch also does logistical changes required for existing usage of vm->task_info. V2: Do not block all the prints when task_info not found (Felix) V3: Fixed review comments from Felix - Fix wrong indentation - No debug message for -ENOMEM - Add NULL check for task_info - Do not duplicate the debug messages (ti vs no ti) - Get first reference of task_info in vm_init(), put last in vm_fini() V4: Fixed review comments from Felix - fix double reference increment in create_task_info - change amdgpu_vm_get_task_info_pasid - additional changes in amdgpu_gem.c while porting
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
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.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-16 (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.19%, higher than 8.0% 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 | b8f67b9ddf4f |
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 vulnerability is reached through DRM ioctls on the amdgpu device node (/dev/dri/renderD128 or card0), specifically DRM_IOCTL_AMDGPU_CS job submission followed by fd close. No network or adjacent-network exposure exists.
- AC:LAttack complexity, low
- The attacker controls both sides of the lifetime race: it submits a job that deterministically hangs the ring, closes the fd (which does not wait for in-flight hung jobs), and the ~10-second scheduler timeout gives a large, attacker-scheduled window to groom the freed amdgpu_fpriv slab before the coredump path dereferences the stale vm pointer.
- PR:LPrivileges required, low
- An unprivileged local user with render-node access can do this — on desktop distros logind grants uaccess ACLs on /dev/dri/renderD*, and Android/ChromeOS app sandboxes and GPU-enabled containers likewise expose it. No capability check exists on the amdgpu CS ioctl path.
- UI:NUser interaction, none
- The attacking process performs every step itself — job submission, fd close, and heap grooming — with no action required from any other user.
- S:UScope, unchanged
- The stale-pointer read and its consequences stay within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.
- C:HConfidentiality impact, high
- The use-after-free reads a freed kernel heap object and emits its contents into the devcoredump blob and kernel log, and the unterminated %s print can read past the field, disclosing arbitrary reallocated kernel heap data that the attacker can groom.
- I:HIntegrity impact, high
- Use-after-free of a slab object whose contents an attacker can control by reallocation constitutes memory corruption exploitable beyond a simple read; the unsynchronized task_info lifetime is a general object-lifetime confusion, so integrity impact is scored High per UAF guidance.
- A:HAvailability impact, high
- Dereferencing the dangling vm pointer during GPU reset can oops or panic the kernel if the slab page has been returned to the page allocator, and it occurs in the non-recoverable GPU recovery path, which the attacker can trigger repeatedly.