REDHAT-BUG-2532062: High severity Linux Linux kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved:
iommu/tegra241-cmdqv: Reject a vSID wider than the SIDMATCH field
tegra241vintfinitvsid() programs the guest-provided vSID into SIDMATCH, whose VIRTSID field spans bits [20:1] with bit 0 as the match-enable flag. The HW therefore matches only a 20-bit Stream ID.
The bound check rejects only virtsid > UINTMAX, which admits a value far wider than the field. The write "virtsid << 1 | 0x1" then drops every bit above 20: a virtsid of 0x80000000 lands as SIDMATCH = 0x1, a valid match on vSID 0, so the entry aliases the wrong Stream ID. Because vdev->virtid is guest-controlled, a VMM can trigger it.
Validate virtsid against the field width with FIELDMAX(), and program the register with FIELDPREP() so the value and the field stay consistent.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In tegra241_vintf_init_vsid(), validate virt_sid against the SID_MATCH field width using FIELD_MAX(), and program SID_MATCH with FIELD_PREP().