CVE-2026-138968: iommu/vt-d: Avoid out-of-range shift in qi_desc_dev_iotlb_pasid()

Published Nov 30, 2026
·
Updated

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

iommu/vt-d: Avoid out-of-range shift in qidescdeviotlbpasid()

Callers request a full Device-TLB flush by passing MAXAGAWPFNWIDTH (64 - VTDPAGESHIFT == 52) as @sizeorder. Two expressions in qidescdeviotlbpasid() are not prepared for a value that large:

unsigned long mask = 1UL << (VTDPAGESHIFT + sizeorder - 1); ... if (!ISALIGNED(addr, VTDPAGESIZE << sizeorder))

The second evaluates to 1UL << 64, which is undefined on all architectures. On x8664 the shift count masks to zero, ISALIGNED(addr, 1) is trivially true, and the alignment sanity check silently degrades into a no-op.

The first evaluates to 1UL << 63. That is well defined on 64-bit builds, where unsigned long is 64 bits wide, but is undefined on 32-bit ones. In practice x86 masks the shift count to five bits, so the expression yields 1UL << 31 and ~mask becomes 0x7fffffff. That value is zero-extended when applied to the 64-bit descriptor, so

desc->qw1 &= ~mask;

clears qw1[63:32] as well as bit 31, collapsing the ADDR field that had just been filled with ones. Reaching that requires a scalable-mode PASID configuration on 32-bit x86, which is not a realistic deployment, but the construct is wrong regardless.

Compute the mask with BITULL() so that it is 64-bit on every architecture, and skip the alignment check for a full flush, where it is both meaningless and the source of the out-of-range shift.

Note that @sizeorder must not be clamped below 64 - VTDPAGESHIFT. With S set, hardware derives the invalidation range from the least significant zero bit N of ADDR and matches bits [63:N+1] of the incoming address. For sizeorder 52 the descriptor sets ADDR[63:12] and clears bit 63, making N = 63 and the comparison range empty, so everything is invalidated. Reducing @sizeorder to 51 would instead leave N = 62 and cause hardware to compare address bit 63; since callers pass an address of 0, only the lower half of the address space would be invalidated. Bound @sizeorder at 64 - VTDPAGESHIFT so that a bogus caller cannot reintroduce an out-of-range shift, without altering the full-flush encoding.

The non-PASID variant qidescdeviotlb() already uses 1ULL and is unaffected.

Affected Software

7 affected componentsFixes available
Linux Linux kernel
linux/kernel>=6.12.0<6.12.117
6.12.117
linux/kernel>=6.13.0<6.18.63
6.18.63
linux/kernel>=6.19.0<7.3.4
7.3.4
debian/linux<6.12.117-1
6.12.117-1
debian/linux<7.3.4-1
7.3.4-1
debian/linux
6.12.117-17.3.4-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.117
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.63
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.4
  4. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1
  5. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.4-1
  6. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.117-1Fixed in 7.3.4-1
  7. Compensating control

    In Linux kernel iommu/vt-d qi_desc_dev_iotlb_pasid(), compute the mask with BIT_ULL(), bound @size_order at 64 - VTD_PAGE_SHIFT, and skip the alignment check for a full flush (MAX_AGAW_PFN_WIDTH).

Event History

Nov 30, 2026
CVE Published
via MITRE·01:26 PM
Data Sourced
via MITRE·01:26 PM
Description
Data Sourced
via OSV·01:26 PM
DescriptionAffected Software
Data Sourced
via NVD·02:17 PM
Description

Frequently Asked Questions

1

Which systems have the concrete descriptor-corruption behavior described?

It requires a scalable-mode PASID configuration on 32-bit x86. On those systems, the out-of-range shift can cause the descriptor mask operation to clear the upper half of qw1 along with bit 31, collapsing the ADDR field.

2

What is the impact on x86_64 systems?

On x86_64, the shift count for the alignment check is masked to zero, making the check equivalent to testing alignment to 1 byte. The alignment sanity check therefore silently becomes ineffective for this full Device-TLB flush request.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203