PT-2026-163009
CVE-2026-138968
·
Publicado
2026-11-30
·
Atualizado
2026-11-30
Descrição por
Pontuação
N/A
Não disponívelNão há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
In the Linux kernel, the following vulnerability has been resolved:
iommu/vt-d: Avoid out-of-range shift in qi desc dev iotlb pasid()
Callers request a full Device-TLB flush by passing MAX AGAW PFN WIDTH
(64 - VTD PAGE SHIFT == 52) as @size order. Two expressions in
qi desc dev iotlb pasid() are not prepared for a value that large:
unsigned long mask = 1UL << (VTD PAGE SHIFT + size order - 1);
...
if (!IS ALIGNED(addr, VTD PAGE SIZE << size order))
The second evaluates to 1UL << 64, which is undefined on all
architectures. On x86 64 the shift count masks to zero, IS ALIGNED(addr,
- 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 BIT ULL() 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 @size order must not be clamped below 64 - VTD PAGE SHIFT. 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
size order 52 the descriptor sets ADDR[63:12] and clears bit 63, making
N = 63 and the comparison range empty, so everything is invalidated.
Reducing @size order 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 @size order
at 64 - VTD PAGE SHIFT so that a bogus caller cannot reintroduce an
out-of-range shift, without altering the full-flush encoding.
The non-PASID variant qi desc dev iotlb() already uses 1ULL and is
unaffected.
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾