CVE-2023-53996 in Linuxinfo

Summary

by MITRE • 12/24/2025

In the Linux kernel, the following vulnerability has been resolved:

x86/sev: Make enc_dec_hypercall() accept a size instead of npages

enc_dec_hypercall() accepted a page count instead of a size, which forced its callers to round up. As a result, non-page aligned vaddrs caused pages to be spuriously marked as decrypted via the encryption status hypercall, which in turn caused consistent corruption of pages during live migration. Live migration requires accurate encryption status information to avoid migrating pages from the wrong perspective.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 02/25/2026

The vulnerability CVE-2023-53996 represents a critical flaw in the Linux kernel's x86 Secure Encrypted Virtualization (SEV) implementation that fundamentally undermines the integrity of memory encryption during live migration operations. This issue resides within the hypervisor interface layer where the kernel communicates with the SEV firmware to manage memory encryption states. The flaw manifests in the enc_dec_hypercall() function which serves as a critical bridge between the kernel's memory management subsystem and the hardware-based encryption mechanisms. The function's improper handling of memory addressing parameters creates a fundamental mismatch between the kernel's internal memory management and the hardware's encryption status reporting, leading to severe operational consequences.

The technical root cause of this vulnerability stems from a design inconsistency where the enc_dec_hypercall() function was originally designed to accept a page count parameter rather than a direct size measurement. This architectural choice forced all callers of the function to perform manual rounding operations to align their memory addresses to page boundaries before invoking the hypercall. When non-page aligned virtual addresses were processed, this rounding behavior caused the encryption status hypercall to incorrectly mark adjacent memory pages as decrypted, even when they should have remained encrypted. This misclassification occurs because the function's internal logic interprets page count values as direct indicators of encryption status rather than properly accounting for the actual memory region boundaries. The flaw directly violates the principle of precise memory management and creates a condition where the kernel's encryption state tracking becomes fundamentally unreliable, as detailed in CWE-1289 which addresses improper handling of memory alignment in virtualization contexts.

The operational impact of this vulnerability during live migration operations is particularly severe and directly threatens system integrity and data confidentiality. When the kernel incorrectly marks pages as decrypted during migration, it creates a scenario where pages from different encryption perspectives are inadvertently mixed during the migration process. This corruption manifests as systematic data corruption across migrated pages, as the migration process relies on accurate encryption status information to ensure that pages are migrated from the correct memory perspective. The vulnerability essentially creates a race condition between the kernel's memory management and the hardware's encryption state reporting, where the incorrect status information leads to pages being migrated in an inconsistent encryption state. This scenario directly aligns with ATT&CK technique T1552.001 which covers unauthorized data access through manipulation of encryption states, and represents a critical failure in maintaining the integrity of virtualized memory management.

The implications extend beyond simple data corruption to encompass potential security breaches and system instability during virtual machine migration operations. Systems utilizing SEV technology for memory encryption protection become vulnerable to information disclosure when this flaw is exploited, as pages that should remain encrypted may be migrated in a decrypted state. The vulnerability particularly affects enterprise environments that rely heavily on live migration for high availability and workload balancing, as it undermines the fundamental security guarantees provided by SEV. Organizations implementing virtualized environments with memory encryption must recognize that this flaw creates a persistent risk for data integrity during migration operations, potentially allowing malicious actors to exploit the inconsistent encryption states to gain unauthorized access to sensitive information. The fix implemented addresses the core issue by modifying the function to properly accept size parameters instead of page counts, eliminating the need for manual rounding operations and ensuring accurate encryption status reporting throughout the migration lifecycle.

Responsible

Linux

Reservation

12/24/2025

Disclosure

12/24/2025

Moderation

accepted

CPE

ready

EPSS

0.00112

KEV

no

Activities

very low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!