mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-10-11 10:59:56 -05:00
Windows vulnerability fix: correct possible BSOD attack targeted towards GetWipePassCount() / WipeBuffer() found by the Open Crypto Audit Project.
This commit is contained in:
1 parent
e0efb36f33
commit
4fa4d6d227
5 files changed
+42
-10
No files matched your search
@@ -861,10 +861,18 @@ inplace_enc_read:
|
||||
if (wipeAlgorithm != TC_WIPE_NONE)
|
||||
{
|
||||
byte wipePass;
|
||||
int wipePassCount = GetWipePassCount (wipeAlgorithm);
|
||||
|
||||
if (wipePassCount <= 0)
|
||||
{
|
||||
SetLastError (ERROR_INVALID_PARAMETER);
|
||||
nStatus = ERR_PARAMETER_INCORRECT;
|
||||
goto closing_seq;
|
||||
}
|
||||
|
||||
offset.QuadPart = masterCryptoInfo->EncryptedAreaStart.Value - workChunkSize;
|
||||
|
||||
for (wipePass = 1; wipePass <= GetWipePassCount (wipeAlgorithm); ++wipePass)
|
||||
for (wipePass = 1; wipePass <= wipePassCount; ++wipePass)
|
||||
{
|
||||
if (!WipeBuffer (wipeAlgorithm, wipeRandChars, wipePass, wipeBuffer, workChunkSize))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user