CVE-2023-54137 in Linuxinfo

Summary

by MITRE • 12/24/2025

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

vfio/type1: fix cap_migration information leak

Fix an information leak where an uninitialized hole in struct vfio_iommu_type1_info_cap_migration on the stack is exposed to userspace.

The definition of struct vfio_iommu_type1_info_cap_migration contains a hole as shown in this pahole(1) output:

struct vfio_iommu_type1_info_cap_migration {
struct vfio_info_cap_header header; /* 0 8 */ __u32 flags; /* 8 4 */

/* XXX 4 bytes hole, try to pack */

__u64 pgsize_bitmap; /* 16 8 */ __u64 max_dirty_bitmap_size; /* 24 8 */

/* size: 32, cachelines: 1, members: 4 */ /* sum members: 28, holes: 1, sum holes: 4 */ /* last cacheline: 32 bytes */ };

The cap_mig variable is filled in without initializing the hole:

static int vfio_iommu_migration_build_caps(struct vfio_iommu *iommu, struct vfio_info_cap *caps) {
struct vfio_iommu_type1_info_cap_migration cap_mig;

cap_mig.header.id = VFIO_IOMMU_TYPE1_INFO_CAP_MIGRATION; cap_mig.header.version = 1;

cap_mig.flags = 0; /* support minimum pgsize */ cap_mig.pgsize_bitmap = (size_t)1 << __ffs(iommu->pgsize_bitmap); cap_mig.max_dirty_bitmap_size = DIRTY_BITMAP_SIZE_MAX;

return vfio_info_add_capability(caps, &cap_mig.header, sizeof(cap_mig)); }

The structure is then copied to a temporary location on the heap. At this point it's already too late and ioctl(VFIO_IOMMU_GET_INFO) copies it to userspace later:

int vfio_info_add_capability(struct vfio_info_cap *caps, struct vfio_info_cap_header *cap, size_t size) {
struct vfio_info_cap_header *header;

header = vfio_info_cap_add(caps, size, cap->id, cap->version); if (IS_ERR(header)) return PTR_ERR(header);

memcpy(header + 1, cap + 1, size - sizeof(*header));

return 0; }

This issue was found by code inspection.

VulDB is the best source for vulnerability data and more expert information about this specific topic.

Analysis

by VulDB Data Team • 01/03/2026

The vulnerability CVE-2023-54137 represents an information disclosure flaw in the Linux kernel's vfio type1 IOMMU implementation that exposes uninitialized memory to userspace through a structured data leak. This issue occurs within the virtual function input/output framework's memory management subsystem where the vfio_iommu_type1_info_cap_migration structure contains a 4-byte padding hole that is not properly initialized before being exposed to user applications. The flaw specifically affects the VFIO_IOMMU_GET_INFO ioctl operation which retrieves IOMMU information capabilities, creating a potential vector for attackers to extract sensitive kernel memory contents that could reveal system internals or confidential data.

The technical root cause stems from the improper initialization of the vfio_iommu_type1_info_cap_migration structure where only the header fields and specific data members are set while the padding hole between the flags and pgsize_bitmap fields remains uninitialized. This structure definition, as revealed by pahole analysis, demonstrates a clear 4-byte gap that becomes populated with whatever data previously occupied that memory location on the stack. When the cap_mig variable is populated in the vfio_iommu_migration_build_caps function, the uninitialized memory region containing the padding bytes is copied directly to userspace without explicit initialization, creating a potential information leak that violates kernel security principles.

The operational impact of this vulnerability extends beyond simple information disclosure as it could enable attackers to extract potentially sensitive kernel memory contents that might include cryptographic keys, system configuration details, or other confidential information. The vulnerability affects systems utilizing VFIO (Virtual Function I/O) with type1 IOMMU drivers, particularly those implementing migration capabilities for virtualized environments. This issue could be exploited in scenarios where untrusted userspace applications have access to VFIO interfaces, potentially allowing for privilege escalation or system reconnaissance attacks that could aid in more sophisticated exploitation techniques. The vulnerability is classified under CWE-248, representing an exposure of uninitialized memory, and aligns with ATT&CK technique T1005 for data from local system, making it a significant concern for virtualization security.

Mitigation strategies should focus on ensuring proper memory initialization before structure exposure to userspace. The fix requires explicitly initializing the entire structure or at minimum the padding bytes to prevent information leakage. System administrators should apply the kernel patch that addresses this specific initialization issue and ensure all systems running VFIO type1 IOMMU drivers are updated. Organizations should also implement monitoring for unauthorized access to VFIO interfaces and consider restricting access to these capabilities to trusted processes only. Regular security audits of kernel modules and virtualization components should be conducted to identify similar uninitialized memory patterns. Additionally, maintaining up-to-date kernel versions and implementing proper access controls for VFIO devices will help prevent exploitation of this class of vulnerability while adhering to security best practices for kernel memory management and information flow control.

Responsible

Linux

Reservation

12/24/2025

Disclosure

12/24/2025

Moderation

accepted

CPE

ready

EPSS

0.00180

KEV

no

Activities

very low

Sources

Do you know our Splunk app?

Download it now for free!