forked from firecracker-microvm/firecracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: potential underflow in AML bytecode creation
acpi_tables::aml::AddressSpace<T> type is describing an address space with a minimum address `min: T` and a maximum address `max: T`. Currently, we do not perform any checks on these values when creating the AddressSpace objects. This means that the starting address `min` can be bigger than the last address `max`, which can cause underflows when calculating the length of this address space, i.e. `max - min + 1`. Add a check in the constructor methods of AddressSpace objects and return an error when `min > max`. Signed-off-by: Babis Chalios <[email protected]>
- Loading branch information
Showing
1 changed file
with
42 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters