CVE-2025-38596: drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code
In the Linux kernel, the following vulnerability has been resolved:
drm/panthor: Fix UAF in panthor_gem_create_with_handle() debugfs code
The object is potentially already gone after the drm_gem_object_put().
In general the object should be fully constructed before calling
drm_gem_handle_create(), except the debugfs tracking uses a separate
lock and list and separate flag to denotate whether the object is
actually initialized.
Since I'm touching this all anyway simplify this by only adding the
object to the debugfs when it's ready for that, which allows us to
delete that separate flag. panthor_gem_debugfs_bo_rm() already checks
whether we've actually been added to the list or this is some error
path cleanup.
v2: Fix build issues for !CONFIG_DEBUGFS (Adrián)
v3: Add linebreak and remove outdated comment (Liviu)
Security readout for executives and security teams
Plain-English summary
A local user could potentially trigger a use-after-free flaw in the Linux Panthor graphics driver’s debugfs object tracking. Successful exploitation could compromise confidentiality, integrity, and availability, but exposure depends on the affected kernel, Panthor support, and debugfs-related configuration.
Executive priority
Treat as a high-priority local privilege risk on applicable Linux graphics systems. Expedite validation and vendor-supported updates where untrusted users can access affected hosts; lower priority only after confirming the Panthor driver or vulnerable debugfs path is absent.
Technical view
The flaw occurs in panthor_gem_create_with_handle(): a GEM object may already be freed after drm_gem_object_put() while debugfs tracking still references it. The kernel fix delays adding the object to debugfs tracking until construction is complete and removes the separate initialization flag.
Likely exposure
The supplied record identifies Linux kernel 6.16 as affected and 6.16.1 as a boundary, but its version encoding is ambiguous. Prioritize systems using the Panthor DRM driver, especially where CONFIG_DEBUGFS is enabled. The sources do not identify affected distributions or devices.
Exploitation context
CVSS 3.1 scores this 7.8 with local access, low complexity, low privileges, and no user interaction. The supplied bundle reports no KEV listing and provides no evidence of active exploitation or a public exploit.
Researcher notes
The core lifetime error follows drm_gem_object_put(), with debugfs list tracking protected separately from GEM object construction. The fix changes initialization ordering rather than merely adding a reference check. The bundle provides two stable commits but does not map each commit to an explicit release branch.
Mitigation direction
Apply a vendor-supported kernel containing the referenced stable fix.
Check distribution or device-vendor guidance for exact fixed package versions.
Prioritize multi-user or otherwise untrusted systems using the Panthor driver.
Where upgrading is delayed, evaluate disabling unnecessary debugfs access under vendor guidance.
Validation and detection
Inventory kernel versions on systems with applicable Arm Mali graphics hardware.
Determine whether the Panthor driver and CONFIG_DEBUGFS are enabled.
Confirm the installed kernel includes an applicable referenced stable commit or vendor backport.
Review vendor advisories because the supplied affected-version range is ambiguous.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-38596 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
3Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.