* [CVE-2026-52951][IMPORTANT] drm/xe/dma-buf: handle empty bo and UAF races
@ 2026-06-26 19:13 AL-KERNEL
0 siblings, 0 replies; only message in thread
From: AL-KERNEL @ 2026-06-26 19:13 UTC (permalink / raw)
To: kernel-cve
CVE: CVE-2026-52951
Priority: IMPORTANT
AL-KERNEL base severity: IMPORTANT
KPANIC flag: YES
Patch: drm/xe/dma-buf: handle empty bo and UAF races
Commit: 9894731e513019df22a29e5c52f1c98890355ff1
Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9894731e513019df22a29e5c52f1c98890355ff1
Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-52951
Analysis date: Fri, 26 Jun 2026 15:13:37 -0400
ActionableScore: 8
ActionableScore lower bound: 6
Actionable bucket: Strong Important candidate / Actionable Moderate at minimum
Manual review required: YES
Summary:
A race in drm/xe dma-buf PRIME import can expose a partially initialized or freed buffer object to invalidate_mappings, allowing a local user with DRM render access to trigger a NULL dereference or UAF and potentially crash the kernel.
======================================================================
ABOUT THIS REPORT
======================================================================
The original Linux kernel CVE announcement for CVE-2026-52951 is available here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-52951
The original announcement does not normally provide a security severity
estimate, CVSS assessment, or enough information to determine whether the
reported kernel bug represents a practically relevant security issue.
This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin. It combines
an autonomous classifier with LLM-assisted technical analysis and a
separate ActionableScore mechanism.
The purpose of this report is to prioritize Linux kernel CVEs before
manual review, identify cases that require prompt investigation, and
support automatic closure of issues that are unlikely to have meaningful
security impact.
Published priority for this report: IMPORTANT
Manual review required: YES
A detailed explanation of the methodology and priority rules is included
at the end of this message.
======================================================================
AL-KERNEL CLASSIFICATION RESULT
======================================================================
CVE-2026-52951 IMPORTANT CHECK Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H';*CWE-416;CWE-362;**CWE-476;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H';BEST CVSS score: '7';DESCR 'A race in drm/xe dma-buf import can expose a partially initialized or already freed xe buffer object to the dma-buf invalidate_mappings callback. During PRIME import the attachment was made visible before xe_dma_buf_init_obj completed, so an exporter such as amdgpu could call invalidate_mappings while the object was empty or after error cleanup freed it. This can produce NULL-pointer dereference in evict_flags and also creates a UAF candidate in kernel GPU memory management. For the CVSS the PR:L is used because a local user with access to DRM render nodes may be able to import dma-bufs and trigger the race without full administrator privileges. The issue is not network reachable. Impact is at least local denial of service via kernel crash and in the paranoid case may include confidentiality or integrity impact due to UAF style memory corruption. YES REQUIRES MANUAL CHECK';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Strong Important candidate / Actionable Moderate at minimum (with actual score 8) MAYBE DANGER NULLPTR INIT RACE UAF DMAorINTERRUPT HARDWARE KPANIC MEMORY KPANIC INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7 - - checked
======================================================================
ACTIONABLESCORE ANALYSIS
======================================================================
ActionableScore=8
ActionableScoreLower=6
## 1. ActionableScore
* Conservative score: 6
* Paranoid score: 8
* Final recommended bucket: **Strong Important candidate / Actionable Moderate at minimum**::
## 2. Signal breakdown
Conservative signals:
* Local unprivileged trigger: +1
DRM render nodes and dma-buf PRIME import paths may be reachable by local users without full administrator privileges, depending on device permissions.
* Memory corruption, Strong corruption primitive: +2
The commit explicitly describes a UAF race where a BO may be freed while still visible through dma-buf attachment state.
* Real lifetime corruption: +1
This is a lifetime ordering bug involving dma-buf attachment visibility, initialization failure, and later invalidate_mappings callbacks.
* Reliable kernel crash / strong DoS: +1
Customers reported NULL pointer dereference in evict_flags, and the commit describes bugs/crashes from empty or freed BO access.
* Privileged kernel/device-management memory corruption path: +1
The corruption occurs in GPU memory management and dma-buf device interop paths, which are privileged kernel subsystems.
* Hard or unreliable race / special timing required: -1
The commit states the hit rate is low and the issue depends on timing around invalidate_mappings.
Conservative subtotal: 6
Paranoid additional signals:
* Confidentiality impact plausible: +1
UAF in kernel GPU object lifetime may allow unintended object reuse or stale object access in a worst defensible case.
* Integrity impact plausible: +1
The UAF class can plausibly affect kernel object state, though no controlled overwrite primitive is demonstrated.
Paranoid subtotal: 8
## 3. Reachability analysis
The bug is locally reachable through DRM dma-buf PRIME import involving drm/xe and an exporter such as amdgpu. A local user with access to DRM render nodes may be able to exercise the affected import path without full root privileges, so PR:L is the practical assumption. Containers or sandboxes with passed-through /dev/dri render devices may also expose the path, but it is not generally network reachable.
The path requires drm/xe, dma-buf import, and a racing invalidate_mappings callback from the exporter side. This is not a default remote attack surface, and exploitation reliability is limited by the race window. However, the affected subsystem is a real user-accessible GPU memory management path, and the commit explicitly identifies both NULL dereference and UAF scenarios.
## 4. Severity interpretation
This should not be treated as an ordinary Moderate auto-close case. Realistically, the demonstrated impact is local kernel crash or GPU-related host instability. The theoretical risk is higher because the bug includes an explicit UAF race in a kernel object lifetime path, not merely a NULL dereference.
The conservative interpretation is Actionable Moderate due to local reachability, UAF, and reliable DoS evidence. The paranoid interpretation is a Strong Important candidate because UAF in GPU memory management may have confidentiality or integrity consequences even though the patch does not demonstrate a reliable LPE primitive.
## 5. One-sentence report phrase
A race in drm/xe dma-buf PRIME import can expose a partially initialized or freed buffer object to invalidate_mappings, allowing a local user with DRM render access to trigger a NULL dereference or UAF and potentially crash the kernel.
## 6. Manual review recommendation
MANUAL CHECK REQUIRED
Reason: the patch explicitly describes UAF races in a local user-reachable DRM dma-buf path, and the practical impact may exceed DoS depending on object reuse and allocator behavior.
======================================================================
UPSTREAM PATCH SUMMARY
======================================================================
Patch: drm/xe/dma-buf: handle empty bo and UAF races
Commit: 9894731e513019df22a29e5c52f1c98890355ff1
Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9894731e513019df22a29e5c52f1c98890355ff1
Commit description:
There look to be some nasty races here when triggering the
invalidate_mappings hook:
1) We do xe_bo_alloc() followed by the attach, before the actual full bo
init step in xe_dma_buf_init_obj(). However the bo is visible on the
attachments list after the attach. This is bad since exporter driver,
say amdgpu, can at any time call back into our invalidate_mappings hook,
with an empty/bogus bo, leading to potential bugs/crashes.
2) Similar to 1) but here we get a UAF, when the invalidate_mappings
hook is triggered. For example, we get as far as xe_bo_init_locked()
but this fails in some way. But here the bo will be freed on error, but
we still have it attached from dma-buf pov, so if the
invalidate_mappings is now triggered then the bo we access is gone and
we trigger UAF and more bugs/crashes.
To fix this, move the attach step until after we actually have a fully
set up buffer object. Note that the bo is not published to userspace
until later, so not sure what the comment "Don't publish the bo
until we have a valid attachment", is referring to.
We have at least two different customers reporting hitting a NULL ptr
deref in evict_flags when importing something from amdgpu, followed by
triggering the evict flow. Hit rate is also pretty low, which would
hint at some kind of race, so something like 1) or 2) might explain
this.
v2:
- Shuffle the order of the ops slightly (no functional change)
- Improve the comment to better explain the ordering (Matt B)
Assisted-by: Gemini:gemini-3 #debug
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/7903
Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/4055
Fixes: dd08ebf ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Signed-off-by: Matthew Auld <[email protected]>
Cc: Thomas Hellström <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: <[email protected]> # v6.8+
Reviewed-by: Matthew Brost <[email protected]>
Acked-by: Thomas Hellström <[email protected]>
Link: https://patch.msgid.link/[email protected]
(cherry picked from commit af1f2ad )
Signed-off-by: Rodrigo Vivi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Changed files:
drivers/gpu/drm/xe/xe_dma_buf.c
Diff excerpt:
Not included in this email. See the upstream URL for the full patch.
Full patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9894731e513019df22a29e5c52f1c98890355ff1
======================================================================
DETAILED REPORT METHODOLOGY
======================================================================
The original Linux kernel CVE announcement for CVE-2026-52951 can be found here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-52951
The original CVE announcement normally does not include a security-level
estimate. In particular, it may not contain a CVSS assessment, an impact
level, or enough information to determine whether the reported bug is a
practically relevant security issue. One purpose of this parallel CVE list
is to provide that missing technical and prioritization information.
The original goal of the AL-KERNEL project was to prioritize Linux kernel
CVE analysis automatically before manual review. The system can also help
identify non-security issues that may be suitable for automatic closure.
This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin.
The first analysis stage combines an autonomous classifier with additional
LLM-based analysis. The autonomous classifier runs locally on a CPU and is
based on a backpropagation neural network. Together, these mechanisms
produce a technical vulnerability description, identify likely weakness
types, estimate CVSS severity, and provide input for ActionableScore.
Two CVSS estimates are retained because incomplete kernel vulnerability
information often permits more than one defensible interpretation:
Conservative CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H
The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
The Best / paranoid CVSS score: 7
The conservative vector represents a lower-impact interpretation.
The Best/paranoid vector intentionally represents a plausible upper-bound
interpretation and should not automatically be treated as demonstrated
real-world impact.
CVSS may also need to be adjusted for a particular Linux deployment,
because actual reachability, privileges, enabled kernel configuration,
hardware, namespaces, exposed device nodes, and other environmental
conditions can differ significantly between systems.
A separate ActionableScore mechanism evaluates practical remediation
urgency. Its analysis may include reachability, attack prerequisites,
subsystem exposure, memory-corruption characteristics, denial-of-service
reliability, and possible confidentiality, integrity, or
privilege-escalation impact.
Conservative ActionableScore: 6
Paranoid ActionableScore: 8
The final base severity is taken directly from the second tab-separated
field of the AL-KERNEL classification result. ActionableScore does not
replace or independently override that final AL-KERNEL decision, and
if ActionableScore adjusted impact level of ALKERNEL, then you would see
self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7.
For an AL-KERNEL result of MODERATE, this report uses the following
additional presentation split:
ActionableScore below 5 -> MODERATE REGULAR
ActionableScore 5 or more -> MODERATE 7.0
The distinction between MODERATE REGULAR and MODERATE 7.0 makes it
possible to identify Moderate issues that should receive manual analysis
and fixes before lower-priority MODERATE REGULAR issues. In many cases,
MODERATE REGULAR fixes may wait for a later rebase or routine update.
There is one override in which MODERATE REGULAR becomes MODERATE 7.0
even when the ActionableScore is below 5. When the AL-KERNEL result
contains the KPANIC flag, a MODERATE result is always presented as
MODERATE 7.0. The KPANIC flag selected with few regexps without
usage of AI at all, so it helps to detect cases when Kernel Crash happens
and similar (to filter False-Negative results from the LLM usage).
KPANIC indicates that a reliable kernel crash, kernel panic, or similarly
serious kernel availability impact was identified by the classification
workflow.
AL-KERNEL base severity for this report: IMPORTANT
KPANIC detected for this report: YES
Published priority for this report (same as in Subject): IMPORTANT
These results are intended to support engineering triage. They are
machine-generated estimates, and cases marked for manual review should
be validated by a human security engineer before final disposition.
For more info read docs linked from here: https://kernelcve.org/
(and you can submit you own patch there to generate such a report
for non-existant CVE-id yet).
Note that in many cases this AI tool selects higher severity, than
real is (means you can expect Importants instead of Moderate 7.0 or
Moderates 7.0 instead of regular Moderates). If you see such cases,
please use reply email interface to add additional manual analyses
info to this particular CVE.
And please, please, let me know when you see Lows instead of Importants
or Important instead of Low (because particular for such cases I
need to tune this AI tool to make it better for this one and next similar).
My contact email for such notifications is [email protected] (and both
send reply to CVE record itself too and see "reply" button below for howto reply).
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-26 19:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-26 19:13 [CVE-2026-52951][IMPORTANT] drm/xe/dma-buf: handle empty bo and UAF races AL-KERNEL
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox