x86/tdx: Fix off-by-one in port I/O handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 03149948832a078f759022ed5b92e722d8d23c26 · < 0f63e656b1c679d32ac595de29d10c03efca6a25| No fix yet |
| Linux Linux |
|
|
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.
From the CVE record · Linux
The Linux kernel’s x86/tdx port I/O handlers use a mask that is one bit too wide for every I/O size. The input does not describe an attacker impact or specify whether exploitation requires network or local access, authentication, or user interaction.
Engineers running Linux kernels with x86/tdx should check their deployments; affected versions are not specified.