[edk2-devel] [PATCH] SecurityPkg/Tcg2PhysicalPresenceLib: Fix incorrect TCG VER comparision

Laszlo Ersek lersek at redhat.com
Thu Jul 9 10:02:00 UTC 2020


On 07/09/20 04:46, Gao, Zhichao wrote:
> From: Terry Lee <terry.lee at hpe.com>
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2697
> 
> Tcg2PhysicalPresenceLibConstructor set the module variable
> mIsTcg2PPVerLowerThan_1_3 with incorrect TCG version comparision.
> 
> Cc: Jiewen Yao <jiewen.yao at intel.com>
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Chao Zhang <chao.b.zhang at intel.com>
> Signed-off-by: Zhichao Gao <zhichao.gao at intel.com>
> ---
>  .../SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c     | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
> index 1c46d5e69d..8afaa0a785 100644
> --- a/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
> +++ b/SecurityPkg/Library/SmmTcg2PhysicalPresenceLib/SmmTcg2PhysicalPresenceLib.c
> @@ -387,7 +387,7 @@ Tcg2PhysicalPresenceLibConstructor (
>  {
>    EFI_STATUS  Status;
>  
> -  if (AsciiStrnCmp(PP_INF_VERSION_1_2, (CHAR8 *)PcdGetPtr(PcdTcgPhysicalPresenceInterfaceVer), sizeof(PP_INF_VERSION_1_2) - 1) <= 0) {
> +  if (AsciiStrnCmp(PP_INF_VERSION_1_2, (CHAR8 *)PcdGetPtr(PcdTcgPhysicalPresenceInterfaceVer), sizeof(PP_INF_VERSION_1_2) - 1) >= 0) {
>      mIsTcg2PPVerLowerThan_1_3 = TRUE;
>    }
>  
> 

What is the practical impact of this bug / fix?

Thanks
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#62296): https://edk2.groups.io/g/devel/message/62296
Mute This Topic: https://groups.io/mt/75390754/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list