forked from pool/ibmswtpm2
Marcus Meissner
09bad69cfd
- Add ibmswtpm2-fix-empty-decrypt.patch: Fix a corner case in the emulator that causes an error when trying to RSA-decrypt an empty message (bsc#1159510). This fix was confirmed to be by the upstream author and is supposed to be contained in the next release. OBS-URL: https://build.opensuse.org/request/show/758978 OBS-URL: https://build.opensuse.org/package/show/security/ibmswtpm2?expand=0&rev=18
14 lines
549 B
Diff
14 lines
549 B
Diff
Index: ibmswtpm2-1119/src/CryptRsa.c
|
|
===================================================================
|
|
--- ibmswtpm2-1119.orig/src/CryptRsa.c
|
|
+++ ibmswtpm2-1119/src/CryptRsa.c
|
|
@@ -469,7 +469,7 @@ RSAES_Decode(
|
|
pSize++;
|
|
// Make sure that pSize has not gone over the end and that there are at least 8
|
|
// bytes of pad data.
|
|
- fail = (pSize >= coded->size) | fail;
|
|
+ fail = (pSize > coded->size) | fail;
|
|
fail = ((pSize - 2) < 8) | fail;
|
|
if((message->size < (UINT16)(coded->size - pSize)) || fail)
|
|
return TPM_RC_VALUE;
|