HomeFreeBSD

bhyve nvme: Fix Controller init error cases

Description

bhyve nvme: Fix Controller init error cases

Fuzzing of bhyve uncovered an assertion failure in the NVMe emulation.
Investigation uncovered several corner cases the code did not handle.
This change handles several Controller initialization errors, including

  • bad AQ sizes
  • bad AQ vm_map_gpa
  • doorbell writes prior to RDY
  • doorbell writes to uninitialized queue
  • CSTS.RDY if CFS set

PR: 256317,256319,256320,256322
Reported by: Cheolwoo Myung <cwmyung@snu.ac.kr>
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D35453

Details

Provenance
chuckAuthored on Aug 14 2022, 2:47 PM
Reviewer
jhb
Differential Revision
D35453: bhyve nvme: Fix Controller init error cases
Parents
rG3d3678627c31: bhyve nvme: Check return value of mapped memory
Branches
Unknown
Tags
Unknown