HomeFreeBSD

iommu_gas: avoid overflow in bounds check

Description

iommu_gas: avoid overflow in bounds check

Change the range test in iommu_gas_match_one from '< ubound' to '<=
ubound', and pass a smaller-by-one ubound parameter to it, to avoid
overflow in ubound calculation.

Reported by: andrew
Reviewed by: andrew (previous version)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D37764

(cherry picked from commit 5b9b55fbc43261fc1467caaf7f2b70b8f752e479)

Details

Provenance
dougmAuthored on Dec 22 2022, 8:31 PM
Reviewer
andrew
Differential Revision
D37764: iommu_gas: avoid overflow in bounds check
Parents
rGc5084b3fbcd3: netmap_update_config: update na->name to cope with reconfigurations
Branches
Unknown
Tags
Unknown