audk/OvmfPkg/SataControllerDxe
Laszlo Ersek 0b448dd8b2 OvmfPkg: SataControllerDxe: SataControllerStop: fix use after free
It would be possible to remove the UAF without local variables, by calling
SataPrivateData->PciIo->Attributes() before releasing SataPrivateData.

However, by keeping the location of the call (for which temporary
variables are necessary), we continue to match the error path logic in
SataControllerStart(), which is always recommended.

Reported-by: wang xiaofeng <winggundum82@163.com>
Fixes: bcab714134
Cc: wang xiaofeng <winggundum82@163.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-04-26 17:59:40 +02:00
..
ComponentName.c
SataController.c OvmfPkg: SataControllerDxe: SataControllerStop: fix use after free 2016-04-26 17:59:40 +02:00
SataController.h OvmfPkg: SataControllerDxe: enable IO / mem access and DMA when binding 2015-09-22 11:18:27 +00:00
SataControllerDxe.inf