In the Linux kernel, the following vulnerability has been resolved:
drm/nouveau: unsubscribe the channel-kill event before the fence context
nouveau_channel_del() tears the fence context down first and only drops
the channel-kill subscription later, in the middle of the nvif object
teardown:
<pre>
if (chan->fence)
nouveau_fence(chan->cli->drm)->context_del(chan);
...
nvif_object_dtor(&chan->vram);
nvif_event_dtor(&chan->kill);
</pre>
The subscribed handler is nouveau_channel_killed(), which calls
nouveau_channel_kill() and from there nouveau_fence_context_kill() on
chan->fence. A kill event delivered in that window takes fctx->lock and
walks fctx->pending on a fence context that context_del() has already
freed.
Nothing reaches this below Fermi today, because the subscription is
gated on FERMI_CHANNEL_GPFIFO and nothing kills a channel there. On
Fermi and newer the window is real but narrow, since a kill has to land
exactly while the channel is being destroyed. That is reason enough on
its own, which is why this carries a Fixes: tag. The last patch in this
series subscribes Tesla channels as well; nothing kills those today, so
it does not widen the exposure now, but it is the groundwork for a
recovery path that would, and the ordering is better fixed before that
lands than alongside it.
Drop the subscription before anything it depends on is torn down.
CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 7.8
AV:L - Reached via local DRM ioctls DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC/FREE on /dev/dri/renderD*, or by closing that fd (nouveau_drm_postclose→nouveau_abi16_chan_fini→nouveau_channel_del). Not reachable from network protocols, adjacent radios, or physical buses.
AC:L - The attacker creates and destroys their own Fermi+ channel so the kill handler stays armed across fence teardown; they also induce the kill (illegal pushbuf/MMU fault or GSP RC during the still-subscribed nvif object dtors) and can retry, so they control both sides of the race.
PR:L - CHANNEL_ALLOC and CHANNEL_FREE are DRM_RENDER_ALLOW with no ROOT_ONLY or capability checks. Any unprivileged local user who can open the nouveau render node (render/video group, logind ACL, Android GPU, or container) can trigger it.
UI:N - The attacker opens their own nouveau render-node client and issues CHANNEL_ALLOC/FREE or close on that fd; no separate victim action is required.
S:U - The use-after-free corrupts host kernel heap state (struct nouveau_fence_chan) inside the nouveau driver. Impact stays in the same kernel authority; this is not a VM escape or IOMMU/DMA isolation bypass.
C:H - A channel-kill delivered after context_del uses chan->fence on a freed fence context, taking fctx->lock and walking fctx->pending. Reclaiming that slab enables arbitrary kernel reads as with other UAFs.
I:H - The same UAF lets the IRQ/GSP kill path list_del and dma_fence_signal through attacker-reclaimed fence-context and pending-list pointers, enabling heap corruption, arbitrary writes, and control-flow hijack.
A:H - Dereferencing the freed fence context from nouveau_channel_killed() (spinlock/list walk in interrupt or GSP callback) oopses or panics the kernel; the attacker can repeat CHANNEL_FREE or close to crash the system.
| Attack Vector |
Local |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
Low |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:L - Reached via local DRM ioctls DRM_IOCTL_NOUVEAU_CHANNEL_ALLOC/FREE on /dev/dri/renderD*, or by closing that fd (nouveau_drm_postclose→nouveau_abi16_chan_fini→nouveau_channel_del). Not reachable from network protocols, adjacent radios, or physical buses.
AC:L - The attacker creates and destroys their own Fermi+ channel so the kill handler stays armed across fence teardown; they also induce the kill (illegal pushbuf/MMU fault or GSP RC during the still-subscribed nvif object dtors) and can retry, so they control both sides of the race.
PR:L - CHANNEL_ALLOC and CHANNEL_FREE are DRM_RENDER_ALLOW with no ROOT_ONLY or capability checks. Any unprivileged local user who can open the nouveau render node (render/video group, logind ACL, Android GPU, or container) can trigger it.
UI:N - The attacker opens their own nouveau render-node client and issues CHANNEL_ALLOC/FREE or close on that fd; no separate victim action is required.
S:U - The use-after-free corrupts host kernel heap state (struct nouveau_fence_chan) inside the nouveau driver. Impact stays in the same kernel authority; this is not a VM escape or IOMMU/DMA isolation bypass.
C:H - A channel-kill delivered after context_del uses chan->fence on a freed fence context, taking fctx->lock and walking fctx->pending. Reclaiming that slab enables arbitrary kernel reads as with other UAFs.
I:H - The same UAF lets the IRQ/GSP kill path list_del and dma_fence_signal through attacker-reclaimed fence-context and pending-list pointers, enabling heap corruption, arbitrary writes, and control-flow hijack.
A:H - Dereferencing the freed fence context from nouveau_channel_killed() (spinlock/list walk in interrupt or GSP callback) oopses or panics the kernel; the attacker can repeat CHANNEL_FREE or close to crash the system.
CVSS 3.1