Kernel: max page sharing of kernel samepage merging (ksm) may cause memory deduplication

Summary

CVECVE-2024-0564
StatePUBLISHED
Assignerredhat
Source PriorityCVE Program / NVD first with legacy fallback
Published2024-01-30 15:15:08 UTC
Updated2026-11-25 14:17:05 UTC
DescriptionA flaw was found in the Linux kernel's memory deduplication mechanism. The max page sharing of Kernel Samepage Merging (KSM), added in Linux kernel version 4.4.0-96.119, can create a side channel. When the attacker and the victim share the same host and the default setting of KSM is "max page sharing=256", it is possible for the attacker to time the unmap to merge with the victim's page. The unmapping time depends on whether it merges with the victim's page and additional physical pages are created beyond the KSM's "max page share". Through these operations, the attacker can leak the victim's page.

Risk And Classification

Primary CVSS: v3.1 6.5 MEDIUM from [email protected]

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

EPSS: 0.006230000 probability, percentile 0.500530000 (date 2026-11-06)

Problem Types: CWE-203 | CWE-203 Observable Discrepancy


VersionSourceTypeScoreSeverityVector
3.1[email protected]Primary6.5MEDIUMCVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
3.1[email protected]Secondary5.3MEDIUMCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
3.1CNACVSS5.3MEDIUMCVSS:3.1/AV:A/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

CVSS v3.1 Breakdown

Attack Vector
Adjacent
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

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

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Operating System Linux Linux Kernel All All All All
Operating System Redhat Enterprise Linux 8.0 All All All
Operating System Redhat Enterprise Linux 9.0 All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Red Hat Red Hat Enterprise Linux 6 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 7 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 7 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 8 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 8 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 9 Not specified Not specified
CNA Red Hat Red Hat Enterprise Linux 9 Not specified Not specified

References

ReferenceSourceLinkTags
WISA 2023 : The 24th World Conference on Information Security Applications af854a3a-2127-422b-91ae-364da2661108 wisa.or.kr Not Applicable
cve-details af854a3a-2127-422b-91ae-364da2661108 access.redhat.com Third Party Advisory
International Conference on Information Security Applications af854a3a-2127-422b-91ae-364da2661108 link.springer.com Not Applicable
Bug #1680513 “Migrating KSM page causes the VM lock up as the KS...” : Bugs : linux package : Ubuntu af854a3a-2127-422b-91ae-364da2661108 bugs.launchpad.net Exploit, Issue Tracking
2258514 – (CVE-2024-0564) CVE-2024-0564 kernel: max page sharing of Kernel Samepage Merging (KSM) may cause memory deduplication af854a3a-2127-422b-91ae-364da2661108 bugzilla.redhat.com Issue Tracking
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Additional Advisory Data

SourceTimeEvent
CNA2024-01-15T00:00:00.000ZReported to Red Hat.
CNA2024-01-20T00:00:00.000ZMade public.

Workarounds

CNA: The mitigation shown below has a potentially significant impact on system performance and stability. It should be carefully tested prior to deployment: - Deactivation of memory deduplication Deactivating memory deduplication will effectively mitigate all attack vectors. This measure unfortunately eliminates all the highly appreciated benefits of memory deduplication, namely the increase of operational cost-effectiveness through inter-VM memory sharing. This will cause an increase in the amount of memory required and in some situations may adversely impact performance (e.g. due to slower swap space being used). It is recommended that customers test this workaround before using it in production. See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/virtualization_tuning_and_optimization_guide/sect-ksm-deactivating_ksm for how to disable KSM from Red Hat Enterprise Linux 6 and newer. - Disabling services and firewall rules. The attack uses the response time of services on the system. By limiting access to services an attacker must connect to the service to successful carry out the exploit. Reducing the number of systems that are allowed to connect to the service will prevent an attack from working when launched outside an allowed ranges. While this does not prevent an attack from working, it will reduce the amount of systems that an attacker can launch an attack from.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report