vulnerability

Ubuntu: (Multiple Advisories) (CVE-2023-52659): Linux kernel vulnerabilities

Severity
6
CVSS
(AV:L/AC:L/Au:S/C:N/I:C/A:C)
Published
05/17/2024
Added
07/01/2024
Modified
02/20/2025

Description

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

x86/mm: Ensure input to pfn_to_kaddr() is treated as a 64-bit type

On 64-bit platforms, the pfn_to_kaddr() macro requires that the input
value is 64 bits in order to ensure that valid address bits don't get
lost when shifting that input by PAGE_SHIFT to calculate the physical
address to provide a virtual address for.

One such example is in pvalidate_pages() (used by SEV-SNP guests), where
the GFN in the struct used for page-state change requests is a 40-bit
bit-field, so attempts to pass this GFN field directly into
pfn_to_kaddr() ends up causing guest crashes when dealing with addresses
above the 1TB range due to the above.

Fix this issue with SEV-SNP guests, as well as any similar cases that
might cause issues in current/future code, by using an inline function,
instead of a macro, so that the input is implicitly cast to the
expected 64-bit input type prior to performing the shift operation.

While it might be argued that the issue is on the caller side, other
archs/macros have taken similar approaches to deal with instances like
this, such as ARM explicitly casting the input to phys_addr_t:

e48866647b48 ("ARM: 8396/1: use phys_addr_t in pfn_to_kaddr()")

A C inline function is even better though.

[ mingo: Refined the changelog some more & added __always_inline. ]

Solution(s)

ubuntu-upgrade-linux-image-6-8-0-1004-gkeubuntu-upgrade-linux-image-6-8-0-1005-raspiubuntu-upgrade-linux-image-6-8-0-1006-ibmubuntu-upgrade-linux-image-6-8-0-1006-oemubuntu-upgrade-linux-image-6-8-0-1006-oracleubuntu-upgrade-linux-image-6-8-0-1006-oracle-64kubuntu-upgrade-linux-image-6-8-0-1008-azureubuntu-upgrade-linux-image-6-8-0-1008-azure-fdeubuntu-upgrade-linux-image-6-8-0-1008-gcpubuntu-upgrade-linux-image-6-8-0-1009-awsubuntu-upgrade-linux-image-6-8-0-35-genericubuntu-upgrade-linux-image-6-8-0-35-generic-64kubuntu-upgrade-linux-image-6-8-0-35-lowlatencyubuntu-upgrade-linux-image-6-8-0-35-lowlatency-64kubuntu-upgrade-linux-image-awsubuntu-upgrade-linux-image-azureubuntu-upgrade-linux-image-azure-fdeubuntu-upgrade-linux-image-gcpubuntu-upgrade-linux-image-genericubuntu-upgrade-linux-image-generic-64kubuntu-upgrade-linux-image-generic-64k-hwe-24-04ubuntu-upgrade-linux-image-generic-hwe-24-04ubuntu-upgrade-linux-image-generic-lpaeubuntu-upgrade-linux-image-gkeubuntu-upgrade-linux-image-ibmubuntu-upgrade-linux-image-ibm-classicubuntu-upgrade-linux-image-ibm-lts-24-04ubuntu-upgrade-linux-image-kvmubuntu-upgrade-linux-image-lowlatencyubuntu-upgrade-linux-image-lowlatency-64kubuntu-upgrade-linux-image-oem-24-04ubuntu-upgrade-linux-image-oem-24-04aubuntu-upgrade-linux-image-oracleubuntu-upgrade-linux-image-oracle-64kubuntu-upgrade-linux-image-raspiubuntu-upgrade-linux-image-virtualubuntu-upgrade-linux-image-virtual-hwe-24-04
Title
NEW

Explore Exposure Command

Confidently identify and prioritize exposures from endpoint to cloud with full attack surface visibility and threat-aware risk context.