All reports
Medium

kernel: x86/tdx: Fix off-by-one in port I/O handling

Affected versions

Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2026-89751

Probability of exploitation in the next 30 days: 0.17%

FIRST EPSS · 2026-11-19

Description

In the Linux kernel, the following vulnerability has been resolved: x86/tdx: Fix off-by-one in port I/O handling handle_in() and handle_out() in arch/x86/coco/tdx/tdx.c use: u64 mask = GENMASK(BITS_PER_BYTE * size, 0); GENMASK(h, l) includes bit h. For size=1 (INB), this produces GENMASK(8, 0) = 0x1FF (9 bits) instead of GENMASK(7, 0) = 0xFF (8 bits). The mask is one bit too wide for all I/O sizes. Fix the mask calculation.

A flaw was found in the Linux kernel's x86/tdx component. An off-by-one error in the handle_in() and handle_out() functions, specifically in the GENMASK calculation for port I/O operations, causes the mask to be one bit too wide. This incorrect handling of I/O sizes could potentially lead to unintended data access or modification during port I/O operations, which may result in information disclosure or data corruption.