mirror of https://github.com/acidanthera/audk.git
SecurityPkg: TcgSmm: Handle invalid parameter in MOR SMI handler
Add more logic to filter invalid function parameter in MOR Control SMI handler Cc: Long Qin <qin.long@intel.com> Cc: Yao Jiewen <jiewen.yao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Chao Zhang <chao.b.zhang@intel.com> Reviewed-by: Long Qin <qin.long@intel.com>
This commit is contained in:
parent
2aa4fb10a5
commit
831bb137a8
|
@ -153,6 +153,10 @@ MemoryClearCallback (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
MorControl &= ~MOR_CLEAR_MEMORY_BIT_MASK;
|
||||
} else {
|
||||
mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;
|
||||
DEBUG ((EFI_D_ERROR, "[TPM] MOR Parameter error! Parameter = %x\n", mTcgNvs->MemoryClear.Parameter));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
DataSize = sizeof (UINT8);
|
||||
|
|
|
@ -271,6 +271,10 @@ MemoryClearCallback (
|
|||
return EFI_SUCCESS;
|
||||
}
|
||||
MorControl &= ~MOR_CLEAR_MEMORY_BIT_MASK;
|
||||
} else {
|
||||
mTcgNvs->MemoryClear.ReturnCode = MOR_REQUEST_GENERAL_FAILURE;
|
||||
DEBUG ((EFI_D_ERROR, "[TPM] MOR Parameter error! Parameter = %x\n", mTcgNvs->MemoryClear.Parameter));
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
DataSize = sizeof (UINT8);
|
||||
|
|
Loading…
Reference in New Issue