HomeFreeBSD

bhyve: validate the NVMe LBA start and count

Description

bhyve: validate the NVMe LBA start and count

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

Tested by: Jason Tubnor
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D24895

Details

Committed
chuckJun 29 2020, 12:32 AM
Differential Revision
D24895: bhyve: validate the NVMe LBA start and count
Parents
rS362759: bhyve: implement NVMe SMART data I/O statistics
Branches
Unknown
Tags
Unknown