CVE & CISA-KEV Catalog

CVE-2025-21939

MEDIUM
5.5
CVSS v3
NVD

Description

In the Linux kernel, the following vulnerability has been resolved: drm/xe/hmm: Don't dereference struct page pointers without notifier lock The pnfs that we obtain from hmm_range_fault() point to pages that we don't have a reference on, and the guarantee that they are still in the cpu page-tables is that the notifier lock must be held and the notifier seqno is still valid. So while building the sg table and marking the pages accesses / dirty we need to hold this lock with a validated seqno. However, the lock is reclaim tainted which makes sg_alloc_table_from_pages_segment() unusable, since it internally allocates memory. Instead build the sg-table manually. For the non-iommu case this might lead to fewer coalesces, but if that's a problem it can be fixed up later in the resource cursor code. For the iommu case, the whole sg-table may still be coalesced to a single contigous device va region. This avoids marking pages that we don't own dirty and accessed, and it also avoid dereferencing struct pages that we don't own. v2: - Use assert to check whether hmm pfns are valid (Matthew Auld) - Take into account that large pages may cross range boundaries (Matthew Auld) v3: - Don't unnecessarily check for a non-freed sg-table. (Matthew Auld) - Add a missing up_read() in an error path. (Matthew Auld) (cherry picked from commit ea3e66d280ce2576664a862693d1da8fd324c317)

How to fix

Remediation Available
linuxDebian
Fixed in:6.12.19-1CVE-2025-21939
Fixed in:6.12.19-1CVE-2025-21939
linux-azure-6.11Ubuntu
Fixed in:6.11.0-1018.18~24.04.1USN-7628-1
linux-gcp-6.11Ubuntu
Fixed in:6.11.0-1016.16~24.04.1USN-7605-1
linux-hwe-6.11Ubuntu
Fixed in:6.11.0-28.28~24.04.1USN-7605-1
linux-image-6.11.0-1015-lowlatencyUbuntu
Fixed in:6.11.0-1015.16~24.04.2USN-7605-2
linux-image-6.11.0-1015-lowlatency-64kUbuntu
Fixed in:6.11.0-1015.16~24.04.2USN-7605-2
linux-image-6.11.0-1016-gcpUbuntu
Fixed in:6.11.0-1016.16~24.04.1USN-7605-1
linux-image-6.11.0-1016-gcp-64kUbuntu
Fixed in:6.11.0-1016.16~24.04.1USN-7605-1
linux-image-6.11.0-1018-azureUbuntu
Fixed in:6.11.0-1018.18~24.04.1USN-7628-1
linux-image-6.11.0-1018-azure-fdeUbuntu
Fixed in:6.11.0-1018.18~24.04.1USN-7628-1
linux-image-6.11.0-1024-oemUbuntu
Fixed in:6.11.0-1024.24USN-7606-1
linux-image-6.11.0-28-genericUbuntu
Fixed in:6.11.0-28.28~24.04.1USN-7605-1
linux-image-6.11.0-28-generic-64kUbuntu
Fixed in:6.11.0-28.28~24.04.1USN-7605-1
linux-image-azureUbuntu
Fixed in:6.11.0-1018.18~24.04.1USN-7628-1
linux-image-azure-6.11Ubuntu
Fixed in:6.11.0-1018.18~24.04.1USN-7628-1
linux-image-azure-fdeUbuntu
Fixed in:6.11.0-1018.18~24.04.1USN-7628-1
linux-image-azure-fde-6.11Ubuntu
Fixed in:6.11.0-1018.18~24.04.1USN-7628-1
linux-image-azure-fde-edgeUbuntu
Fixed in:6.11.0-1018.18~24.04.1USN-7628-1
linux-image-gcpUbuntu
Fixed in:6.11.0-1016.16~24.04.1USN-7605-1
linux-image-gcp-64kUbuntu
Fixed in:6.11.0-1016.16~24.04.1USN-7605-1
linux-image-generic-64k-hwe-24.04Ubuntu
Fixed in:6.11.0-28.28~24.04.1USN-7605-1
linux-image-generic-hwe-24.04Ubuntu
Fixed in:6.11.0-28.28~24.04.1USN-7605-1
linux-image-lowlatency-6.11Ubuntu
Fixed in:6.11.0-1015.16~24.04.2USN-7605-2
linux-image-lowlatency-64k-6.11Ubuntu
Fixed in:6.11.0-1015.16~24.04.2USN-7605-2
linux-image-lowlatency-64k-hwe-24.04Ubuntu
Fixed in:6.11.0-1015.16~24.04.2USN-7605-2
linux-image-lowlatency-hwe-24.04Ubuntu
Fixed in:6.11.0-1015.16~24.04.2USN-7605-2
linux-image-oem-24.04bUbuntu
Fixed in:6.11.0-1024.24USN-7606-1
linux-image-virtual-hwe-24.04Ubuntu
Fixed in:6.11.0-28.28~24.04.1USN-7605-1
linux-lowlatency-hwe-6.11Ubuntu
Fixed in:6.11.0-1015.16~24.04.2USN-7605-2
linux-oem-6.11Ubuntu
Fixed in:6.11.0-1024.24USN-7606-1

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

0.19%probability of exploitation in 30 days
8thpercentile

Low risk: more likely to be exploited than 8% of all known CVEs.

References

Related Vulnerabilities

Other CWE-476 (NULL Pointer Dereference) vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2023-21758High7.592%-Fix
CVE-2023-21547High7.588%-Fix
CVE-2014-3470Medium4.386%-Fix
CVE-2021-44224High8.282%-Fix
CVE-2016-0742High7.582%-Fix
CVE-2009-1386Medium5.080%-Fix
Embed a live status badge for CVE-2025-21939
CVE-2025-21939 severity badge

Markdown

[![CVE-2025-21939](https://tridentstack.com/cve/badge/CVE-2025-21939.svg)](https://tridentstack.com/cve/CVE-2025-21939)

HTML

<a href="https://tridentstack.com/cve/CVE-2025-21939"><img src="https://tridentstack.com/cve/badge/CVE-2025-21939.svg" alt="CVE-2025-21939"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-10-30.