edk2/MdeModulePkg
Sean Brogan c3a037c993 MdeModulePkg: NvmExpressDriverBindingStart - early return path leaks
After allocating Private via AllocateZeroPool and successfully opening
both gEfiDevicePathProtocolGuid and gEfiPciIoProtocolGuid BY_DRIVER,
the function attempts PciIo->Attributes(EfiPciIoAttributeOperationGet)
If this call fails, the code executes return Status instead of goto Exit.

Trigger path:

NvmExpressDriverBindingStart is called.
OpenProtocol for DevicePath succeeds (opens BY_DRIVER).
OpenProtocol for PciIo succeeds (opens BY_DRIVER).
AllocateZeroPool for Private succeeds.
PciIo->Attributes(Get) returns an error.
return Status bypasses the Exit: label.

Consequence:
Memory leak of NVME_CONTROLLER_PRIVATE_DATA. Two protocols remain opened
BY_DRIVER on the controller handle, preventing other drivers from binding.

Signed-off-by: Sean Brogan <sebrogan@microsoft.com>
2026-06-02 22:23:59 +00:00
..
Application MdeModulePkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Bus MdeModulePkg: NvmExpressDriverBindingStart - early return path leaks 2026-06-02 22:23:59 +00:00
Core MdeModulePkg: Cleanup debug print readability 2026-05-06 10:43:05 +00:00
Include Revert "ArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib ..." 2026-05-06 03:41:31 +00:00
Library MdeModulePkg/ArmFfaLib: return error when CurrentVersion is NULL 2026-05-29 18:44:57 +00:00
Logo MdeModulePkg: Remove ARM32 Support 2025-09-25 22:04:10 +00:00
Test MdeModulePkg: Added several mock libraries for google test 2026-04-02 03:27:19 +00:00
Universal MdeModulePkg/Variable: Avoid double VA conversion of FVB protocol 2026-06-01 06:05:19 +00:00
MdeModulePkg.ci.yaml MdeModulePkg: Add duplicate exception for gUiAppFileGuid 2025-03-06 14:18:10 +01:00
MdeModulePkg.dec Revert "ArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib ..." 2026-05-06 03:41:31 +00:00
MdeModulePkg.dsc MdeModulePkg: Add support for generation of HEST table 2026-05-26 23:45:14 +00:00
MdeModulePkg.uni MdeModulePkg: Add platform limit for size in Resizable BAR 2026-02-25 03:40:14 +00:00
MdeModulePkgExtra.uni MdeModulePkg: Replace BSD License with BSD+Patent License 2019-04-09 10:58:08 -07:00