Comments (2)
Instrumentation of the code and displaying the offsets into the buffer and pointers shows that this is indeed a false positive.
diff --git a/src/tpm2/AlgorithmTests.c b/src/tpm2/AlgorithmTests.c
index 08ee6b02..479ad5c0 100644
--- a/src/tpm2/AlgorithmTests.c
+++ b/src/tpm2/AlgorithmTests.c
@@ -196,8 +196,10 @@ MakeIv(
}
else
{
- for(i = 0; i < size; i++)
+ for(i = 0; i < size; i++) {
+ fprintf(stderr, "iv: %p, i: %d\n", iv, i);
*iv++ = i;
+ }
}
return size;
}
@@ -220,6 +222,7 @@ TestSymmetricAlgorithm(
//
// Get the appropriate IV
+ fprintf(stderr,"==> buffer: %p\n", &iv.t.buffer[0]);
iv.t.size = (UINT16)MakeIv(mode, test->ivSize, iv.t.buffer);
// Encrypt known data
CryptSymmetricEncrypt(encrypted, test->alg, test->keyBits, test->key, &iv,
from libtpms.
For the record. This patch here resolves this issue [I will not apply it upstream]:
Do not inline MakeIV due toppc64 compiler issue
The ppc64 gcc compiler has an issue with MakeIv.
---
src/tpm2/AlgorithmTests.c | 3 +++
1 file changed, 3 insertions(+)
--- a/src/tpm2/AlgorithmTests.c
+++ b/src/tpm2/AlgorithmTests.c
@@ -179,6 +179,9 @@
/* 10.2.1.4.1 MakeIv() */
/* Internal function to make the appropriate IV depending on the mode. */
static UINT32
+#if defined(__powerpc64__)
+__attribute__((noinline))
+#endif
MakeIv(
TPM_ALG_ID mode, // IN: symmetric mode
UINT32 size, // IN: block size of the algorithm
from libtpms.
Related Issues (20)
- TPM2_Create returns 0x2d2 HOT 4
- TPM2_Create returns 0x2d2
- TPM failure when running TPM2_PCR_Event through tpm2-abrmd HOT 4
- cross compile libtpm tools. HOT 2
- Future of libtpms: Downgrading (of state for support of migration) HOT 1
- Typo in the preprocessor symbol name for gcc minor version HOT 1
- Support CC_ECC_Encrypt and CC_ECC_Decrypt HOT 3
- /usr/bin/ld: ./.libs/libtpms.so: ABI version 2 is not compatible with ABI version 0 output HOT 13
- Future trouble: OpenSSL 3.x may require host admin to enable legacy mode to support SHA1 signatures HOT 10
- missing BN_div() error check? HOT 3
- nvi in USER_NVRAM_Unmarshal() used without initialization? HOT 2
- policyInNv used uninitialized in TPMT_HA_Unmarshal()? HOT 6
- tpm_state_path may be null HOT 2
- Compilation fails on OSS-Fuzz HOT 1
- Can't compile since latest git pull HOT 4
- TPMA_NV_READ_STCLEAR is never set, therefore TPM2_NV_ReadLock() always fails HOT 1
- Use explicit pre-fetching to improve performance HOT 6
- RFE: SGX enclave support HOT 5
- An out-of-bounds read or write exists in CryptParameterEncryption HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libtpms.