Linux kernel denial of service in vc4 buffer reservation cleanup
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.647.3.57.4-rc2In the Linux kernel, the following vulnerability has been resolved:
drm/vc4: Drop the BO reservations outside of job_lock
vc4_queue_submit() calls drm_exec_fini() with job_lock held and interrupts disabled. Besides unlocking the reservations, drm_exec_fini() frees the object array with kvfree(), which asks for preemptible task context or a non-NMI interrupt, and may reach might_sleep() through vfree().
Considering that an array that exceeds a page can take the vmalloc fallback, call drm_exec_fini() once job_lock is dropped. The reservations are then held across the job kick, which is harmless as nothing in the completion path takes a BO reservation.
Note that vc4_attach_fences() has to stay inside the critical section, as it walks exec, which the job done worker is free to release as soon as job_lock is dropped.
From the CVE record · Linux
The Linux kernel's drm/vc4 job submission path can free an object array while holding a lock with interrupts disabled, potentially reaching code that may sleep. The input does not specify an attacker capability or whether exploitation requires network access, authentication, or user interaction.
Engineers running Linux kernels with drm/vc4 should check their builds; affected versions are not specified.