[PATCH 1/3] uefirtvariable: Check new VariableNameSize from GetNextVariableName()

Matt Fleming matt.fleming at intel.com
Wed Mar 6 11:27:10 UTC 2013


On Tue, 2013-03-05 at 21:54 +0000, Matt Fleming wrote:
> From: Matt Fleming <matt.fleming at intel.com>
> 
> Some firmware implementations update VariableNameSize in
> GetNextVariableName() with a value that is larger than the actual
> buffer required to hold the VariableName string. This is not
> technically a bug, but most implementations do update VariableNameSize
> with the value of strlen(VariableName) + 1, so print a warning if a
> different value is found.
> 
> Signed-off-by: Matt Fleming <matt.fleming at intel.com>
> ---
>  src/uefi/uefirtvariable/uefirtvariable.c | 74 +++++++++++++++++++++++++++++++-
>  1 file changed, 72 insertions(+), 2 deletions(-)

Folks, I was fairly certain that there were no implementations in the
wild that failed to update VariableNameSize on EFI_SUCCESS, but I've
just been informed that there are some.

You may or may not want to take this patch, since it is warning about an
undocumented behaviour - albeit one that many implementations exhibit.





More information about the fwts-devel mailing list