Skip to content

[Bug]: FMP GetImageInfo test with ImageInfo==NULL case generates synchronous exception on some platforms #297

@edhay

Description

@edhay

Is there an existing issue for this?

  • I have searched existing issues

Bug Type

  • Test Coverage
  • Test Infrastructure
  • Memory or crash related
  • Build Issue

What packages are impacted?

UEFI-SCT

Which targets are impacted by this bug?

RELEASE

Which architectures are impacted by this bug?

All

Current Behavior

The new FMP GetImageInfo() test with ImageInfo==NULL case generates synchronous exception on some platforms.

This test was added as part of 1c3a7ce

The UEFI spec enlists the below as a possible combination which should return INVALID_PARAMETER.
_The ImageSize is not too small and Image is NULL_

See: https://uefi.org/specs/UEFI/2.11/23_Firmware_Update_and_Reporting.html#efi-firmware-management-protocol-getimageinfo

However the NULL check for ImageInfo may not exist in some implementation of FMPDxe which may cause the synchronous exception.

However in edk2 implementation the NULL check exists:
https://github.com/tianocore/edk2/blob/dfbb7de3c667e6d9c8be54ad538998790029f6c2/FmpDevicePkg/FmpDxe/FmpDxe.c#L502C10-L502C20

Also spec should make it clear that this combination is allowed in the description of ImageInfo which says(which contradicts the previous case above):
"A pointer to the buffer in which firmware places the current image(s) information. The information is an array of EFI_FIRMWARE_IMAGE_DESCRIPTOR , see “Related Definitions”. May be NULL with a zero ImageInfoSize in order to determine the size of the buffer needed."
It could also be NULL otherwise (which is a INVALID PARAMETER)

Image

Expected Behavior

The system should not generate synchronous exception and stop rest of the tests.

As a avoidance measure, presently this test is disabled.
Further decision will be taken after the UEFI specification updates are discussed.

Steps To Reproduce

Run the FirmwareManagement test suite in UEFI-SCT

Build Environment

- OS(s):
- Tool Chain(s):

Version Information

https://github.com/tianocore/edk2-test/commit/40cc44e557fbebb0319bc30b1dfdaca7072f7260

Urgency

High

Are you going to fix this?

I will fix it

Do you need maintainer feedback?

Maintainer feedback requested

Anything else?

None

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions