Branch: refs/heads/UDK2018
  Home:   https://github.com/tianocore/edk2
  Commit: 5e69443e82090ce68fc1d3874841bc5175c14006
      
https://github.com/tianocore/edk2/commit/5e69443e82090ce68fc1d3874841bc5175c14006
  Author: Ruiyu Ni <ruiyu...@intel.com>
  Date:   2018-02-03 (Sat, 03 Feb 2018)

  Changed paths:
    M MdeModulePkg/Core/PiSmmCore/Smi.c

  Log Message:
  -----------
  MdeModulePkg/SmmCore: Fix hang due to already-freed memory deference

SmiHandlerUnRegister() validates the DispatchHandle by checking
whether the first 32bit matches to a certain signature
(SMI_HANDLER_SIGNATURE).
But if a caller calls *UnRegister() twice and the memory freed by
first call still contains the signature, the second call may hang.

The patch fixes this issue by locating the DispatchHandle
in all SMI handlers, instead of checking the signature.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu...@intel.com>
Cc: Jiewen Yao <jiewen....@intel.com>
Reviewed-by: Star Zeng <star.z...@intel.com>
(cherry picked from commit 8a641d2b73295d64438012972aac83838de31671)


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to