Re: [PATCH 2/2] hw/block/nvme: assert namespaces array indices

2021-03-15 Thread Klaus Jensen
On Mar 15 12:19, Philippe Mathieu-Daudé wrote: > On 3/15/21 12:03 PM, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Coverity complains about a possible memory corruption in the > > nvme_ns_attach and _detach functions. While we should not (famous last > > words) be able to reach this functio

Re: [PATCH 2/2] hw/block/nvme: assert namespaces array indices

2021-03-15 Thread Philippe Mathieu-Daudé
On 3/15/21 12:03 PM, Klaus Jensen wrote: > From: Klaus Jensen > > Coverity complains about a possible memory corruption in the > nvme_ns_attach and _detach functions. While we should not (famous last > words) be able to reach this function without nsid having previously > been validated, this is

[PATCH 2/2] hw/block/nvme: assert namespaces array indices

2021-03-15 Thread Klaus Jensen
From: Klaus Jensen Coverity complains about a possible memory corruption in the nvme_ns_attach and _detach functions. While we should not (famous last words) be able to reach this function without nsid having previously been validated, this is still an open door for future misuse. Make Coverity