diff options
Diffstat (limited to 'src/Driver')
-rw-r--r-- | src/Driver/DriveFilter.c | 6 | ||||
-rw-r--r-- | src/Driver/DriveFilter.h | 2 | ||||
-rw-r--r-- | src/Driver/Driver.rc | 8 | ||||
-rw-r--r-- | src/Driver/Driver.vcxproj | 20 | ||||
-rw-r--r-- | src/Driver/Driver.vcxproj.filters | 6 | ||||
-rw-r--r-- | src/Driver/Driver.vcxproj.user | 3 | ||||
-rw-r--r-- | src/Driver/DumpFilter.c | 2 | ||||
-rw-r--r-- | src/Driver/DumpFilter.h | 2 | ||||
-rw-r--r-- | src/Driver/EncryptedIoQueue.c | 2 | ||||
-rw-r--r-- | src/Driver/EncryptedIoQueue.h | 2 | ||||
-rw-r--r-- | src/Driver/Fuse/FuseService.cpp | 2 | ||||
-rw-r--r-- | src/Driver/Fuse/FuseService.h | 2 | ||||
-rw-r--r-- | src/Driver/Ntdriver.c | 38 | ||||
-rw-r--r-- | src/Driver/Ntdriver.h | 2 | ||||
-rw-r--r-- | src/Driver/Ntvol.c | 2 | ||||
-rw-r--r-- | src/Driver/Ntvol.h | 2 | ||||
-rw-r--r-- | src/Driver/VolumeFilter.c | 2 | ||||
-rw-r--r-- | src/Driver/VolumeFilter.h | 2 | ||||
-rw-r--r-- | src/Driver/veracrypt.Inf | 2 |
19 files changed, 71 insertions, 36 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c index a280d20e..f8f06b37 100644 --- a/src/Driver/DriveFilter.c +++ b/src/Driver/DriveFilter.c @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source @@ -288,5 +288,5 @@ err: static void DismountDrive (DriveFilterExtension *Extension, BOOL stopIoQueue) { - Dump ("Dismounting drive\n"); + Dump ("Unmounting drive\n"); ASSERT (Extension->DriveMounted); @@ -302,5 +302,5 @@ static void DismountDrive (DriveFilterExtension *Extension, BOOL stopIoQueue) Extension->DriveMounted = FALSE; - Dump ("Drive dismount done!\n"); + Dump ("Drive unmount done!\n"); } diff --git a/src/Driver/DriveFilter.h b/src/Driver/DriveFilter.h index 307880fb..60ec9a05 100644 --- a/src/Driver/DriveFilter.h +++ b/src/Driver/DriveFilter.h @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/Driver.rc b/src/Driver/Driver.rc index 6d9bad20..928ce1c3 100644 --- a/src/Driver/Driver.rc +++ b/src/Driver/Driver.rc @@ -28,6 +28,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,26,17,2 - PRODUCTVERSION 1,26,17,2 + FILEVERSION 1,26,20,0 + PRODUCTVERSION 1,26,20,0 FILEFLAGSMASK 0x17L #ifdef _DEBUG @@ -46,9 +46,9 @@ BEGIN VALUE "CompanyName", "IDRIX" VALUE "FileDescription", "VeraCrypt Driver" - VALUE "FileVersion", "1.26.17" + VALUE "FileVersion", "1.26.20" VALUE "LegalTrademarks", "VeraCrypt" VALUE "OriginalFilename", "veracrypt.sys" VALUE "ProductName", "VeraCrypt" - VALUE "ProductVersion", "1.26.17" + VALUE "ProductVersion", "1.26.20" END END diff --git a/src/Driver/Driver.vcxproj b/src/Driver/Driver.vcxproj index 60585351..17fbfa43 100644 --- a/src/Driver/Driver.vcxproj +++ b/src/Driver/Driver.vcxproj @@ -111,5 +111,6 @@ <ProviderName> </ProviderName> - <TimeStamp>1.26.17.2</TimeStamp> + <TimeStamp>1.26.20.0</TimeStamp> + <DateStamp>02/03/2025</DateStamp> </Inf> <Link> @@ -137,5 +138,6 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Debug\Setup Files\veracrypt.inf"</Com <ProviderName> </ProviderName> - <TimeStamp>1.26.17.2</TimeStamp> + <TimeStamp>1.26.20.0</TimeStamp> + <DateStamp>02/03/2025</DateStamp> </Inf> <Link> @@ -163,5 +165,6 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Release\Setup Files\veracrypt.inf"</C <ProviderName> </ProviderName> - <TimeStamp>1.26.17.2</TimeStamp> + <TimeStamp>1.26.20.0</TimeStamp> + <DateStamp>02/03/2025</DateStamp> </Inf> <Link> @@ -189,5 +192,6 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Release\Setup Files\veracrypt.inf"</C <ProviderName> </ProviderName> - <TimeStamp>1.26.17.2</TimeStamp> + <TimeStamp>1.26.20.0</TimeStamp> + <DateStamp>02/03/2025</DateStamp> </Inf> <Link> @@ -225,4 +229,8 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Debug\Setup Files\veracrypt.inf"</Com <ClCompile Include="..\Crypto\Aeskey.c" /> <ClCompile Include="..\Crypto\Aestab.c" /> + <ClCompile Include="..\Crypto\Aes_hw_armv8.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\Crypto\blake2s.c" /> <ClCompile Include="..\Crypto\blake2s_SSE2.c"> @@ -265,4 +273,8 @@ copy $(OutDir)veracrypt.inf "$(SolutionDir)Debug\Setup Files\veracrypt.inf"</Com </ClCompile> <ClCompile Include="..\Crypto\Sha2.c" /> + <ClCompile Include="..\Crypto\sha256_armv8.c"> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild> + <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> + </ClCompile> <ClCompile Include="..\Crypto\Sha2Intel.c" /> <ClCompile Include="..\Crypto\Streebog.c" /> diff --git a/src/Driver/Driver.vcxproj.filters b/src/Driver/Driver.vcxproj.filters index 478432fa..3c427dad 100644 --- a/src/Driver/Driver.vcxproj.filters +++ b/src/Driver/Driver.vcxproj.filters @@ -166,4 +166,10 @@ <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="..\Crypto\Aes_hw_armv8.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> + <ClCompile Include="..\Crypto\sha256_armv8.c"> + <Filter>Crypto\Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> diff --git a/src/Driver/Driver.vcxproj.user b/src/Driver/Driver.vcxproj.user index 9724a753..f5bd9cdc 100644 --- a/src/Driver/Driver.vcxproj.user +++ b/src/Driver/Driver.vcxproj.user @@ -17,3 +17,6 @@ <SignMode>Off</SignMode> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> + <DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor> + </PropertyGroup> </Project>
\ No newline at end of file diff --git a/src/Driver/DumpFilter.c b/src/Driver/DumpFilter.c index f858bb7c..4105b116 100644 --- a/src/Driver/DumpFilter.c +++ b/src/Driver/DumpFilter.c @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/DumpFilter.h b/src/Driver/DumpFilter.h index c72115a2..88091bd4 100644 --- a/src/Driver/DumpFilter.h +++ b/src/Driver/DumpFilter.h @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/EncryptedIoQueue.c b/src/Driver/EncryptedIoQueue.c index de1e4fdc..c39941e6 100644 --- a/src/Driver/EncryptedIoQueue.c +++ b/src/Driver/EncryptedIoQueue.c @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/EncryptedIoQueue.h b/src/Driver/EncryptedIoQueue.h index 3738065a..82cc76cd 100644 --- a/src/Driver/EncryptedIoQueue.h +++ b/src/Driver/EncryptedIoQueue.h @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/Fuse/FuseService.cpp b/src/Driver/Fuse/FuseService.cpp index 5b12ba4d..5fe9f6fe 100644 --- a/src/Driver/Fuse/FuseService.cpp +++ b/src/Driver/Fuse/FuseService.cpp @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/Fuse/FuseService.h b/src/Driver/Fuse/FuseService.h index d09a40db..1e4ffc6c 100644 --- a/src/Driver/Fuse/FuseService.h +++ b/src/Driver/Fuse/FuseService.h @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c index 12943dc8..148f88b8 100644 --- a/src/Driver/Ntdriver.c +++ b/src/Driver/Ntdriver.c @@ -7,5 +7,5 @@ and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source @@ -233,5 +233,5 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) } } - +#ifndef _M_ARM64 // use RDSEED or RDRAND from CPU as source of entropy if enabled if ( IsCpuRngEnabled() && @@ -242,4 +242,5 @@ void GetDriverRandomSeed (unsigned char* pbRandSeed, size_t cbRandSeed) WHIRLPOOL_add (digest, sizeof(digest), &tctx); } +#endif WHIRLPOOL_finalize (&tctx, digest); @@ -267,5 +268,9 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) Dump("DriverEntry " TC_APP_NAME " " VERSION_STRING VERSION_STRING_SUFFIX "\n"); +#ifndef _M_ARM64 DetectX86Features(); +#else + DetectArmFeatures(); +#endif PsGetVersion(&OsMajorVersion, &OsMinorVersion, NULL, NULL); @@ -294,5 +299,9 @@ NTSTATUS DriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) // in case of system encryption, if self-tests fail, disable all extended CPU // features and try again in order to workaround faulty configurations +#ifndef _M_ARM64 DisableCPUExtendedFeatures(); +#else + EnableHwEncryption(FALSE); +#endif SelfTestsPassed = AutoTestAlgorithms(); @@ -1220,5 +1229,5 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION outputBuffer->PartitionLength.QuadPart= Extension->DiskLength; outputBuffer->PartitionNumber = 1; - outputBuffer->HiddenSectors = 0; + outputBuffer->HiddenSectors = BYTES_PER_MB / Extension->BytesPerSector; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof (PARTITION_INFORMATION); @@ -1240,5 +1249,5 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION outputBuffer->Mbr.BootIndicator = FALSE; outputBuffer->Mbr.RecognizedPartition = TRUE; - outputBuffer->Mbr.HiddenSectors = 0; + outputBuffer->Mbr.HiddenSectors = BYTES_PER_MB / Extension->BytesPerSector; Irp->IoStatus.Status = STATUS_SUCCESS; Irp->IoStatus.Information = sizeof (PARTITION_INFORMATION_EX); @@ -1264,5 +1273,5 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION outputBuffer->PartitionEntry->PartitionLength.QuadPart = Extension->DiskLength; outputBuffer->PartitionEntry->PartitionNumber = 1; - outputBuffer->PartitionEntry->HiddenSectors = 0; + outputBuffer->PartitionEntry->HiddenSectors = BYTES_PER_MB / Extension->BytesPerSector; Irp->IoStatus.Status = STATUS_SUCCESS; @@ -1299,5 +1308,5 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION outputBuffer->PartitionEntry->PartitionLength.QuadPart = Extension->DiskLength; outputBuffer->PartitionEntry->PartitionNumber = 1; - outputBuffer->PartitionEntry->Mbr.HiddenSectors = 0; + outputBuffer->PartitionEntry->Mbr.HiddenSectors = BYTES_PER_MB / Extension->BytesPerSector; outputBuffer->PartitionEntry->Mbr.PartitionType = Extension->PartitionType; @@ -1438,5 +1447,10 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Dump ("ProcessVolumeDeviceControlIrp (IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS)\n"); // Vista's, Windows 8.1 and later filesystem defragmenter fails if IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS does not succeed. - if (ValidateIOBufferSize(Irp, sizeof(VOLUME_DISK_EXTENTS), ValidateOutput)) + if (!AllowWindowsDefrag || !Extension->bRawDevice) // We don't support defragmentation for file-hosted volumes + { + Irp->IoStatus.Status = STATUS_INVALID_DEVICE_REQUEST; + Irp->IoStatus.Information = 0; + } + else if (ValidateIOBufferSize(Irp, sizeof(VOLUME_DISK_EXTENTS), ValidateOutput)) { VOLUME_DISK_EXTENTS* extents = (VOLUME_DISK_EXTENTS*)Irp->AssociatedIrp.SystemBuffer; @@ -2587,5 +2601,5 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex break; - case TC_IOCTL_DISMOUNT_VOLUME: + case TC_IOCTL_UNMOUNT_VOLUME: if (ValidateIOBufferSize (Irp, sizeof (UNMOUNT_STRUCT), ValidateInputOutput)) { @@ -2615,5 +2629,5 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex break; - case TC_IOCTL_DISMOUNT_ALL_VOLUMES: + case TC_IOCTL_UNMOUNT_ALL_VOLUMES: if (ValidateIOBufferSize (Irp, sizeof (UNMOUNT_STRUCT), ValidateInputOutput)) { @@ -3174,6 +3188,6 @@ LPWSTR TCTranslateCode (ULONG ulCode) TC_CASE_RET_NAME (TC_IOCTL_ABORT_DECOY_SYSTEM_WIPE); TC_CASE_RET_NAME (TC_IOCTL_BOOT_ENCRYPTION_SETUP); - TC_CASE_RET_NAME (TC_IOCTL_DISMOUNT_ALL_VOLUMES); - TC_CASE_RET_NAME (TC_IOCTL_DISMOUNT_VOLUME); + TC_CASE_RET_NAME (TC_IOCTL_UNMOUNT_ALL_VOLUMES); + TC_CASE_RET_NAME (TC_IOCTL_UNMOUNT_VOLUME); TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_DRIVE_VOLUME_PROPERTIES); TC_CASE_RET_NAME (TC_IOCTL_GET_BOOT_ENCRYPTION_ALGORITHM_NAME); @@ -3372,5 +3386,5 @@ void OnShutdownPending () unmount.ignoreOpenFiles = TRUE; - while (SendDeviceIoControlRequest (RootDeviceObject, TC_IOCTL_DISMOUNT_ALL_VOLUMES, &unmount, sizeof (unmount), &unmount, sizeof (unmount)) == STATUS_INSUFFICIENT_RESOURCES || unmount.HiddenVolumeProtectionTriggered) + while (SendDeviceIoControlRequest (RootDeviceObject, TC_IOCTL_UNMOUNT_ALL_VOLUMES, &unmount, sizeof (unmount), &unmount, sizeof (unmount)) == STATUS_INSUFFICIENT_RESOURCES || unmount.HiddenVolumeProtectionTriggered) unmount.HiddenVolumeProtectionTriggered = FALSE; diff --git a/src/Driver/Ntdriver.h b/src/Driver/Ntdriver.h index b03b5e93..c23bbfe3 100644 --- a/src/Driver/Ntdriver.h +++ b/src/Driver/Ntdriver.h @@ -7,5 +7,5 @@ and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/Ntvol.c b/src/Driver/Ntvol.c index 0376033f..9856fc2b 100644 --- a/src/Driver/Ntvol.c +++ b/src/Driver/Ntvol.c @@ -7,5 +7,5 @@ and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/Ntvol.h b/src/Driver/Ntvol.h index 1d80b7de..a1051e94 100644 --- a/src/Driver/Ntvol.h +++ b/src/Driver/Ntvol.h @@ -7,5 +7,5 @@ and which is governed by the 'License Agreement for Encryption for the Masses' Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/VolumeFilter.c b/src/Driver/VolumeFilter.c index b4bc8d2e..f4fc9610 100644 --- a/src/Driver/VolumeFilter.c +++ b/src/Driver/VolumeFilter.c @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/VolumeFilter.h b/src/Driver/VolumeFilter.h index f3e53237..e318e99d 100644 --- a/src/Driver/VolumeFilter.h +++ b/src/Driver/VolumeFilter.h @@ -5,5 +5,5 @@ Modifications and additions to the original source code (contained in this file) - and all other portions of this file are Copyright (c) 2013-2017 IDRIX + and all other portions of this file are Copyright (c) 2013-2025 IDRIX and are governed by the Apache License 2.0 the full text of which is contained in the file License.txt included in VeraCrypt binary and source diff --git a/src/Driver/veracrypt.Inf b/src/Driver/veracrypt.Inf index d2cef1b4..c5751ac2 100644 --- a/src/Driver/veracrypt.Inf +++ b/src/Driver/veracrypt.Inf @@ -3,5 +3,5 @@ ;;; ;;; -;;; Copyright (c) 2024, IDRIX +;;; Copyright (c) 2025, IDRIX ;;; |