Skip to main content
Vulnerability Database/CVE-2026-93238

CVE-2026-93238: Linux Kernel VFIO-AP Use-After-Free Flaw

CVE-2026-93238 is a use-after-free vulnerability in the Linux kernel VFIO-AP module involving uninitialized bitmap data. This flaw can cause unintended guest hardware queue resets. This article covers technical details, impact, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-93238 Overview

CVE-2026-93238 is an uninitialized memory use vulnerability in the Linux kernel's s390/vfio-ap driver. The flaw resides in the vfio_ap_mdev_hot_plug_cfg() function, which uses the DECLARE_BITMAP(apm_filtered, AP_DEVICES) macro to allocate a bitmap on the stack without zero-initialization. When a hot plug configuration change only adds control domains, the vfio_ap_mdev_filter_matrix() initialization path is bypassed, leaving apm_filtered populated with stack garbage. The uninitialized bitmap is then passed to reset_queues_for_apids(), which may interpret arbitrary bits as valid Adjunct Processor identifiers.

Critical Impact

Unintended guest hardware queue resets on IBM Z systems using vfio-ap passthrough, affecting cryptographic adapter availability for KVM guests.

Affected Products

  • Linux kernel builds containing the s390/vfio-ap driver
  • IBM Z (s390x) systems using AP (Adjunct Processor) device passthrough to KVM guests
  • Distributions shipping affected stable kernel branches prior to the referenced fix commits

Discovery Timeline

  • 2026-09-24 - CVE-2026-93238 published to the National Vulnerability Database
  • 2026-09-24 - Last updated in NVD database

Technical Details for CVE-2026-93238

Vulnerability Analysis

The vulnerability stems from improper initialization of a stack-allocated bitmap in the s390 virtual function I/O Adjunct Processor (vfio-ap) subsystem. The DECLARE_BITMAP macro reserves space on the stack but does not clear it. In normal execution paths, vfio_ap_mdev_filter_matrix() populates the bitmap before use, masking the problem.

The defect appears when hot plug configuration logic branches based on three flags: filter_adapters, filter_domains, and filter_cdoms. The filter function only runs when filter_adapters or filter_domains is true. If a configuration change touches only control domains, the function is skipped and apm_filtered retains whatever data occupied that stack region.

Root Cause

The root cause is uninitialized memory use [CWE-908] combined with a conditional initialization pattern. The developer assumed vfio_ap_mdev_filter_matrix() would always run before reset_queues_for_apids() consumed the bitmap. The control-domain-only code path violates this assumption, exposing stack contents as adapter identifier bits.

Attack Vector

An administrator or privileged process triggering a vfio-ap hot plug configuration change that modifies only control domains can cause the driver to reset arbitrary AP queues on the host. The impact depends on stack layout and prior function execution, making outcomes nondeterministic. Guest workloads relying on specific cryptographic adapters may experience disruption when host queues are reset without authorization from the mediated device configuration.

The fix zero-initializes apm_filtered using bitmap_zero() at the start of vfio_ap_mdev_hot_plug_cfg(), guaranteeing deterministic behavior regardless of which branches execute. See the upstream fix commit for implementation details.

Detection Methods for CVE-2026-93238

Indicators of Compromise

  • Unexpected AP queue reset events in kernel logs on s390x hosts running KVM guests with vfio-ap passthrough
  • Guest-side cryptographic operation failures or adapter unavailability coinciding with host mediated device configuration changes
  • Audit entries showing vfio_ap_mdev_hot_plug_cfg invocations limited to control domain modifications

Detection Strategies

  • Inventory s390x hosts and identify kernel versions predating the stable commits 09548ed, 4ba8a08, 6d554f2, bf09b9d, and f73db63
  • Correlate vfio-ap sysfs writes to assign_control_domain or unassign_control_domain with subsequent AP queue reset messages
  • Monitor kernel ring buffer for vfio_ap subsystem warnings during mediated device reconfiguration

Monitoring Recommendations

  • Enable kernel audit rules covering /sys/devices/vfio_ap/matrix/ configuration interfaces
  • Track KVM guest cryptographic workload stability metrics after any mediated device adjustment
  • Collect dmesg output on affected hosts and forward to centralized logging for retrospective analysis

How to Mitigate CVE-2026-93238

Immediate Actions Required

  • Identify s390x hosts providing AP passthrough to KVM guests and prioritize them for kernel updates
  • Apply vendor-supplied kernel updates referencing the upstream fix commits once available from your distribution
  • Restrict administrative access to vfio-ap sysfs configuration interfaces to trusted operators only

Patch Information

The fix is available in upstream stable kernel trees via commits 09548ed, 4ba8a08, 6d554f2, bf09b9d, and f73db63. The patch adds a bitmap_zero(apm_filtered, AP_DEVICES) call at the beginning of vfio_ap_mdev_hot_plug_cfg().

Workarounds

  • Avoid hot plug configuration changes that modify only control domains until the host kernel is patched
  • When mediated device adjustments are required, include at least one adapter or usage domain change to force the filter path to execute
  • Schedule configuration changes during planned maintenance windows and verify guest cryptographic adapter state afterward
bash
# Verify the running kernel on s390x hosts and confirm patch presence
uname -r
zgrep -i 'vfio-ap' /proc/config.gz
dmesg | grep -i 'vfio_ap'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.