Page MenuHomeFreeBSD

bhyve: validate the NVMe LBA start and count
ClosedPublic

Authored by chuck on May 18 2020, 6:30 PM.

Details

Summary

Add checks that the combination of Starting LBA and Number of Logical
Blocks in a command will not exceed the range of the underlying storage.

Note that because NVMe specifices the Starting LBA as a uint64_t, care
must be taken when converting it and the block count to avoid an integer
overflow.

Fixes UNH Tests 2.2.3, 2.3.2, and 2.4.2

Test Plan

Run UNH IOL INTERACT tests

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

chuck created this revision.May 18 2020, 6:30 PM
chuck requested review of this revision.May 18 2020, 6:30 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mon, Jun 29, 12:32 AM
This revision was automatically updated to reflect the committed changes.