Skip to content

Commit 43c1964

Browse files
Wipe stack buffers in block_cipher_df
This is a partial backport of 1b36499 (only for the buffer wiping). Other wiping calls were previously added as backports of "CTR_DRBG: clean stack buffers" (d9aa84d). This completes the backporting of stack buffer wiping from the development branch.
1 parent 73e34fa commit 43c1964

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/ctr_drbg.c

+4
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ static int block_cipher_df( unsigned char *output,
226226

227227
mbedtls_aes_free( &aes_ctx );
228228

229+
mbedtls_zeroize( buf, sizeof( buf ) );
230+
mbedtls_zeroize( tmp, sizeof( tmp ) );
231+
mbedtls_zeroize( key, sizeof( key ) );
232+
mbedtls_zeroize( chain, sizeof( chain ) );
229233
return( 0 );
230234
}
231235

0 commit comments

Comments
 (0)