Add explanatory comment
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
5d2024333b
commit
0a3c72df02
1 changed files with 10 additions and 0 deletions
|
@ -43,6 +43,16 @@ void mbedtls_platform_zeroize(int len, int null)
|
|||
/* BEGIN_CASE */
|
||||
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];
|
||||
mbedtls_platform_zeroize(buf, len);
|
||||
|
||||
|
|
Loading…
Reference in a new issue