Re: [Qemu-block] [PATCH for-3.1] nvme: fix out-of-bounds access to the CMB

2018-11-16 Thread Li Qiang
Paolo Bonzini 于2018年11月16日周五 下午5:31写道: > Because the CMB BAR has a min_access_size of 2, if you read the last > byte it will try to memcpy *2* bytes from n->cmbuf, causing an off-by-one > error. This is CVE-2018-16847. > > Another way to fix this might be to register the CMB as a RAM memory >

[Qemu-block] [PATCH for-3.1] nvme: fix out-of-bounds access to the CMB

2018-11-16 Thread Paolo Bonzini
Because the CMB BAR has a min_access_size of 2, if you read the last byte it will try to memcpy *2* bytes from n->cmbuf, causing an off-by-one error. This is CVE-2018-16847. Another way to fix this might be to register the CMB as a RAM memory region, which would also be more efficient. However,