Linux kernel use-after-free in nouveau driver fence work
Affects the Linux kernel nouveau driver on NVIDIA G84 or later GPUs in 6.6.18 to before 6.6.163 and 6.7.6 to before 6.8. No vendor rating is given; CVSS is 7.0 (high). Fixed in 6.6.163 and 6.8.
- Exploited
- No known exploitation
- Fix
- Fixed in 6.6.163, 6.8
- Who is exposed
- Specific setups only
Summary
The Linux kernel's nouveau driver has a flaw in which a fence work item can be re-queued after its context has been torn down. The work then runs on memory that has already been freed.
Written by a model
Original description
In the Linux kernel, the following vulnerability has been resolved:
drm/nouveau: disable the fence uevent work instead of just cancelling it
nouveau_fence_context_del() drains the uevent work while the event that feeds it is still armed:
cancel_work_sync(&fctx->uevent_work); nouveau_fence_context_kill(fctx, 0); nvif_event_dtor(&fctx->event);
nouveau_fence_wait_uevent_handler() queues the work unconditionally:
schedule_work(&fctx->uevent_work); return NVIF_EVENT_KEEP;
so a non-stall interrupt arriving after cancel_work_sync() has returned re-arms the work that was just drained. The window closes in two steps, neither of which is the drain. The kill blocks the event when the last fence holding a notify_ref is signalled, which reaches atomic_xchg(&ntfy->allowed, 0) (nvkm/core/event.c:104), and nvkm_event_ntfy() skips a ntfy that is not allowed (:183). That stops further handlers from starting, but not one that is already inside nvkm_event_ntfy(): the event is created with wait = false (nouveau_fence.c:201), so nvkm_event_ntfy_block_() leaves it on the list and never takes event->list_lock. Only nvif_event_dtor() waits that one out: nvkm_event_ntfy_del() (:141) goes through nvkm_event_ntfy_remove(), which takes write_lock_irq() on that same list_lock (:84).
Either way the re-arm happens after the drain, and the caller drops its reference immediately afterwards, for example nv84_fence_context_del():
nouveau_fence_context_del(&fctx->base); chan->fence = NULL; nouveau_fence_context_free(&fctx->base);
That is a kref_put() on fctx->fence_ref, so the context outlives the teardown only while emitted fences still hold a reference of their own. That is no safety net: whenever none do, the count reaches zero right there and nouveau_fence_context_put() kfree()s fctx while the work is still queued. &fctx->uevent_work is embedded in that allocation, so the workqueue already dereferences freed memory when it picks the item up, and nouveau_fence_uevent_work() can then take fctx->lock on it. With CONFIG_DEBUG_OBJECTS_WORK and CONFIG_DEBUG_OBJECTS_FREE, kfree() of a still-queued work item is reported as the free of an active object.
On live memory the re-armed work has nothing left to do: nouveau_fence_context_kill() empties fctx->pending and sets fctx->killed under fctx->lock, nouveau_fence_emit() then returns -ENODEV rather than queueing anything new, and nouveau_fence_update() only reaches nvif_event_block() if it signalled something off that list. The defect is the access to freed memory, not what the work would have found.
Only chips from G84 on can reach this at all: nouveau_fence_context_new() returns before nvif_event_ctor() when priv->uevent is clear, and nv84_fence_create() is the only place that sets it. nv84_fence_context_del() is the context_del for all of those, because nvc0_fence_create() and gv100_fence_create() build on nv84_fence_create() and override only context_new.
Use disable_work_sync() instead. It drains the work exactly like cancel_work_sync() does, and additionally increments the work item's disable count, after which "any attempt to queue @work will fail and return %false" (kernel/workqueue.c, disable_work()). The handler's schedule_work() then has nothing to re-arm, and the teardown order stays as it is.
Draining a second time after nvif_event_dtor() would close the window as well, and without the newer API: once nvkm_event_ntfy_remove() has returned, no handler can start or still be running, so nothing re-arms the work past that point. disable_work_sync() is preferred here because it needs one synchronisation point instead of two, it keeps the work from being queued at all rather than cleaning up after it, and it is what drm has settled on for this (drm/xe, drm/panthor, drm_pagemap). Blocking the event rather than the work is not an option: fctx->event is created with wait = false, so a handler already inside nvkm_event_ntfy() can still queue the work.
Note for backpor ---truncated---
Who should check
Teams running Linux kernels with the nouveau DRM driver on NVIDIA G84-or-newer GPUs, including 6.6.y kernels that lack disable_work_sync().
Not fixed by: Blocking the event rather than the work does not fix it.
“Only chips from G84 on can reach this at all”
What to do
Check whether your setup matches what the bug needs.
NVIDIA GPU from G84 or later, driven by the nouveau DRM driver (uevent fence path) A non-stall interrupt arrives after the work has been drained during channel teardown Fence context is freed while the uevent work is still queued, which requires no emitted fence holding a referenceUpgrade to a fixed version: 6.6.163, 6.8.
Check your systems with an agent
Paste this into a coding or ops agent. It checks your systems read-only and reports a table per asset.
Check whether my systems are affected by CVE-2026-139075 (drm/nouveau: disable the fence uevent work instead of just cancelling it), using the cve.now data below.
Rules: work read-only. Do not run exploit code, proof-of-concept scripts or scanners that send attack payloads, and do not change any configuration, package, image or deployment. Report findings only.
What cve.now has for CVE-2026-139075 (entry last updated 2026-12-01):
Affected:
- Linux Linux: from 6.6.18, fixed in 6.6.163; from 6.7.6, fixed in 6.8
- Linux Linux: versions 6.8
Fixed versions: 6.6.163, 6.8.
Vendor patches: 827eb9328eaed831d7cc426ac2705038a40835b6 (source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d45c83c41b2d7cf25dbd9ba44a35ee66aaa23c67). Check each asset for these patch ids, not only its version.
Conditions (all must be true for the bug to be hit):
- NVIDIA GPU from G84 or later, driven by the nouveau DRM driver (uevent fence path) (source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fba3e939ed5cb2f1cd255a6bc5b9c1fb921d8587)
- A non-stall interrupt arrives after the work has been drained during channel teardown (source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fba3e939ed5cb2f1cd255a6bc5b9c1fb921d8587)
- Fence context is freed while the uevent work is still queued, which requires no emitted fence holding a reference (source: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fba3e939ed5cb2f1cd255a6bc5b9c1fb921d8587)
Setup: unknown whether the bug needs a non-default feature or setting. Check the advisory.
Attacker needs: local access, low-privilege login, no user action.
CISA KEV: CVE-2026-139075 is not listed as of cve.now's last read.
This KEV status is for CVE-2026-139075 only. If you also check another CVE, look up its own KEV status; never assume it from this one.
How to check:
- Installed software: check what is actually running, not what a repo declares. Read the version from each host, container image and Kubernetes node (the binary's version output, the OS package database, image layers), and check whether the conditions above hold there. Distribution packages may carry a backported fix under an older version number; confirm against the distribution's own advisory.
Verify against the linked advisories before concluding, and cite the date you read each one:
- https://git.kernel.org/stable/c/fba3e939ed5cb2f1cd255a6bc5b9c1fb921d8587
- https://git.kernel.org/stable/c/d45c83c41b2d7cf25dbd9ba44a35ee66aaa23c67
- https://git.kernel.org/stable/c/f688ffe4a23ae12d2947e68b10225b208c36022c
- https://git.kernel.org/stable/c/bf09cf3e05011b77d00c7dd4abca760dd8fff4f4
- https://git.kernel.org/stable/c/827eb9328eaed831d7cc426ac2705038a40835b6
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d45c83c41b2d7cf25dbd9ba44a35ee66aaa23c67
- https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=fba3e939ed5cb2f1cd255a6bc5b9c1fb921d8587
Do not conclude an asset is unaffected unless you checked it and the evidence covers both its version and the conditions above. If you could not check something, mark it unknown and say what is missing.
Report a table with one row per asset and these columns: Asset | Version or build | Status (affected, fixed, not applicable, unknown) | Compensating controls | Exposure (internet-facing, internal, none) | Evidence | Next action.
Entry: https://cve.now/CVE-2026-139075
For follow-up questions, use the cve.now MCP server at https://mcp.cve.now/mcp (no authentication), for example execute with name cve.get and arguments {"id": "CVE-2026-139075"}.Affected versions
- Linux LinuxFrom 6.6.18 · fixed in 6.6.163; From 6.7.6 · fixed in 6.8
- Linux Linux6.8
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure5/25Specific setups only
- Reach20/20Affects Linux kernel (software on nearly every server, desktop or phone)
- Severity7/10CVSS 7.0
- No patch0/5No signal
What would change the score
- Would score about 82 if added to CISA KEV
- Would score about 77 if CISA's SSVC rates exploitation active
- Would score about 42 if CISA's SSVC rates it automatable
Timeline
- CVE published
- First seen by cve.now1 day
- Record last updated
- Posted on X by cve.now
Evidence 7
| Kind | Source |
|---|---|
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-139075 |
| Record | NVD · CVE-2026-139075 |
| Other links 5 | |
| Link | git.kernel.org · stable/c/fba3e939ed5cb2f1cd255a6bc5b9c1fb921d8587 |
| Link | git.kernel.org · stable/c/d45c83c41b2d7cf25dbd9ba44a35ee66aaa23c67 |
| Link | git.kernel.org · stable/c/f688ffe4a23ae12d2947e68b10225b208c36022c |
| Link | git.kernel.org · stable/c/bf09cf3e05011b77d00c7dd4abca760dd8fff4f4 |
| Link | git.kernel.org · stable/c/827eb9328eaed831d7cc426ac2705038a40835b6 |
Questions about CVE-2026-139075
Is CVE-2026-139075 being exploited?
It is not in CISA's Known Exploited Vulnerabilities catalog, and CISA's SSVC assessment does not mark exploitation as active. That does not mean it has not been attacked: vendors and researchers can report attacks before CISA lists them. No public exploit code is tracked.
Source: cve.now feed data
What does this mean?
A use-after-free of a kernel workqueue item in the nouveau fence path. A non-stall interrupt that arrives after the work has been drained during channel teardown can reach freed fence context. The advisory says this can lead to kernel memory reads, control-flow hijack and memory writes, or a kernel crash, and that a local user with render node access can trigger it.
Source: git.kernel.org, cve.org, git.kernel.org
Which versions are affected by CVE-2026-139075?
Linux: from 6.6.18 before 6.6.163; from 6.7.6 before 6.8. Linux: version 6.8.
Source: cve.now feed data
Am I affected, and how do I check?
Linux kernel versions from 6.6.18 up to but not including 6.6.163, and from 6.7.6 up to but not including 6.8. The setup is an NVIDIA GPU from G84 or later driven by the nouveau DRM driver. To check, run uname -r for the kernel version and lsmod | grep nouveau to see whether nouveau is loaded.
Source: git.kernel.org, cve.org, git.kernel.org
How do I fix CVE-2026-139075?
Upgrade to Linux 6.6.163 or 6.8, or a later release. The upstream fix is commit 827eb9328eaed831d7cc426ac2705038a40835b6, which replaces cancel_work_sync() with disable_work_sync().
Source: git.kernel.org, cve.org, git.kernel.org
Related
- CVE-2026-139801KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM
- CVE-2026-139799mm/shmem: hold off eviction in shmem_writeout()
- CVE-2026-139792ALSA: pcm: Prevent O_APPEND open on OSS streams
- CVE-2026-139788cipso: stop modifying live ip_options_rcu
- CVE-2026-139786mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows
- CVE-2026-1398009p/xen: drain response work after unbinding IRQ
No corrections so far. Something wrong on this page? Report an error.