mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-25 13:43:31 +00:00
Add explanatory comment
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
5d2024333b
commit
0a3c72df02
@ -43,6 +43,16 @@ void mbedtls_platform_zeroize(int len, int null)
|
|||||||
/* BEGIN_CASE */
|
/* BEGIN_CASE */
|
||||||
void mbedtls_platform_zeroize_uninitialised(int len, int p)
|
void mbedtls_platform_zeroize_uninitialised(int len, int p)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* As per #7301: on some platforms, including modern Linux, Clang with Msan
|
||||||
|
* does not recognize that explicit_bzero() writes well-defined content to
|
||||||
|
* its output buffer. For us, this causes CMAC operations to fail in Msan
|
||||||
|
* builds when mbedtls_platform_zeroize() is implemented over
|
||||||
|
* explicit_bzero().
|
||||||
|
*
|
||||||
|
* This test ensures we have a simple/obvious MSan test rather than
|
||||||
|
* spurious errors in crypto code that are hard to track down.
|
||||||
|
*/
|
||||||
char buf[128];
|
char buf[128];
|
||||||
mbedtls_platform_zeroize(buf, len);
|
mbedtls_platform_zeroize(buf, len);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user