Branch: refs/heads/master
  Commit: 8a641d2b73295d64438012972aac83838de31671
  Author: Ruiyu Ni <>
  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
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 <>
Cc: Jiewen Yao <>
Reviewed-by: Star Zeng <>

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
edk2-commits mailing list

Reply via email to