Page MenuHomeFreeBSD

iommu_gas: avoid overflow in bounds check
ClosedPublic

Authored by dougm on Dec 20 2022, 9:03 PM.
Tags
None
Referenced Files
F166970721: D37764.id114496.diff
Tue, Aug 18, 6:49 AM
F166931706: D37764.id114496.diff
Mon, Aug 17, 8:39 PM
F166921401: D37764.id114339.diff
Mon, Aug 17, 7:05 PM
Unknown Object (File)
Fri, Aug 14, 7:15 PM
Unknown Object (File)
Thu, Aug 13, 8:48 PM
Unknown Object (File)
Thu, Aug 13, 8:48 PM
Unknown Object (File)
Thu, Aug 13, 8:48 PM
Unknown Object (File)
Jul 17 2026, 1:07 AM
Subscribers

Details

Summary

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.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Dec 20 2022, 9:03 PM
dougm created this revision.
This revision is now accepted and ready to land.Dec 21 2022, 11:18 AM

Correct bounds check, where one was added when it should have been subtracted.

This revision now requires review to proceed.Dec 21 2022, 9:30 PM
This revision was not accepted when it landed; it landed in state Needs Review.Dec 22 2022, 8:34 PM
This revision was automatically updated to reflect the committed changes.