CVE-2025-38334
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-38334 is a vulnerability discovered in the Linux kernel affecting the x86/sgx subsystem, specifically related to the handling of poisoned pages in SGX page reclaim functionality. The vulnerability was disclosed on July 10, 2025 (NVD CVE).

Technical details

The vulnerability exists in the SGX page reclaim mechanism where the system attempts to reclaim EPC (Enclave Page Cache) pages that are known to be poisoned. The issue occurs because epc_page->poison is not checked in the reclaimer logic, allowing attempts to reclaim poisoned EPC pages. When reclaiming, the system uses microcode operations including 'EWB' which accesses the EPC page contents to encrypt and write them to non-SGX memory. These operations cannot properly handle Machine Check Exceptions (MCEs) in their accesses (CVE Details).

Impact

When exploited, this vulnerability can lead to two critical issues: 1) poisoned pages could potentially be added to another enclave, and 2) it can cause one CPU core to shut down and the kernel to panic. The executing core enters a special shutdown state affecting both threads with Hyper-Threading, and the kernel subsequently panics on the remaining cores when they detect that the affected core didn't enter MCE handlers in time (NVD CVE).

Mitigation and workarounds

The fix involves calling sgxunmarkpagereclaimable() to remove the affected EPC page from sgxactivepagelist on memory error, preventing it from being considered for reclaiming. While testing epcpage->poison in sgxreclaim_pages() would also work, the implemented solution adds code in the less likely paths. The patch has been integrated into various Linux kernel versions (Debian Tracker).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40258HIGH7
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-devel-matched
NoNoDec 04, 2025
CVE-2025-40259MEDIUM6.2
  • Linux KernelLinux Kernel
  • kernel-64k-devel
NoNoDec 04, 2025
CVE-2025-40264MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-kvm
NoNoDec 04, 2025
CVE-2025-40254MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-modules-partner
NoNoDec 04, 2025
CVE-2025-40253MEDIUM5.5
  • Linux KernelLinux Kernel
  • python3-perf
NoNoDec 04, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management