VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
AgeCommit message (Collapse)AuthorFilesLines
2024-11-27Windows: Increment version to 1.26.17.2. Update signed drivers.Mounir IDRASSI2-6/+6
2024-11-25Windows: don't test sign driver by default in Release mode.Mounir IDRASSI2-0/+6
2024-11-24Windows Driver: Set version to 1.26.17.1. Update signed drivers.Mounir IDRASSI2-6/+6
2024-11-23Windows Driver: Make max work items count configurable. Increase default to ↵Mounir IDRASSI4-38/+54
1024. Queue write IRPs. - Made the maximum work items count configurable to allow flexibility based on system needs. - Increased the default value of max work items count to 1024 to better handle high-throughput scenarios. - Queue write IRPs in system worker thread to avoid potential deadlocks in write scenarios.
2024-11-22Windows Driver: Optimize spinlock usage in CompleteIrpWorkItemRoutineMounir IDRASSI1-8/+4
Reduce the critical section protected by spinlock to only cover the list manipulation operation. Move the ActiveWorkItems counter decrement outside the spinlock using InterlockedDecrement, and separate event signaling from the locked section. This change minimizes time spent at raised IRQL (DISPATCH_LEVEL) and reduces potential for lock contention.
2024-11-20Windows driver: use correct WDM type. Increment version to 1.26.17Mounir IDRASSI3-13/+24
2024-11-18Increment version to 1.26.16. Update Release Notes. Update signed Windows ↵Mounir IDRASSI2-8/+8
drivers.
2024-11-17Windows Driver: Use system functions directly instead of dynamic loading ↵Mounir IDRASSI3-160/+37
since we are targeting Windows 10
2024-11-17Windows Driver: Fix deadlock in EncryptedIoQueue due to re-entrant IRP ↵Mounir IDRASSI2-17/+167
completions There was a deadlock issue in the driver caused by the CompletionThreadProc function in EncryptedIoQueue.c: https://sourceforge.net/p/veracrypt/discussion/general/thread/f6e7f623d0/?page=20&limit=25#8362 The driver uses a single thread (CompletionThreadProc) to process IRP completions. When IoCompleteRequest is called within this thread, it can result in new IRPs being generated (e.g., for pagefile operations) that are intercepted by the driver and queued back into the CompletionThreadQueue. Since CompletionThreadProc is the only thread processing this queue and is waiting on IoCompleteRequest, these new IRPs are not handled, leading to a system freeze. To resolve this issue, the following changes have been made: Deferred IRP Completion Using Pre-allocated Work Items: - Introduced a pool of pre-allocated work items (COMPLETE_IRP_WORK_ITEM) to handle IRP completions without causing additional resource allocations that could trigger new IRPs. - The CompletionThreadProc now queues IRP completions to these work items, which are processed in a different context using IoQueueWorkItem, preventing re-entrant IRPs from blocking the completion thread. Thread-Safe Work Item Pool Management: - Implemented a thread-safe mechanism using a semaphore (WorkItemSemaphore), spin lock (WorkItemLock), and a free list (FreeWorkItemsList) to manage the pool of work items. - Threads acquire and release work items safely, and if all work items are busy, threads wait until one becomes available. Reference Counting and Improved Stop Handling: - Added an ActiveWorkItems counter to track the number of active work items. - Modified EncryptedIoQueueStop to wait for all active work items to complete before proceeding with cleanup, ensuring a clean shutdown. These changes address the deadlock issue by preventing CompletionThreadProc from being blocked by re-entrant IRPs generated during IoCompleteRequest. By deferring IRP completion to a different context using pre-allocated work items and managing resources properly, we avoid the deadlock and ensure that all IRPs are processed correctly.
2024-11-16Windows Driver: Add Unicode define to build and enhance tracing in debug modeMounir IDRASSI2-151/+83
2024-11-16Windows: Avoid modifying BootArguments structure and use __unaligned keyword ↵Mounir IDRASSI1-1/+1
to inform compiler that pointer is unaligned. This avoids issues with existing bootloaders
2024-11-16Windows: remove 32-bit logic from the code since we support only 64-bit. ↵Mounir IDRASSI4-51/+0
remove 32-bit EFI bootloader files. We also fix intermediary files folder for Portable and Setup projects
2024-11-15Windows: remove VS 2019 solution and project files since we migrated to VS 2022.Mounir IDRASSI2-940/+0
2024-11-15Windows: move main project files and solution from VS 2010 to VS 2022. ↵Mounir IDRASSI4-826/+780
Delete unused files.
2024-11-15Windows: Upgrade VS 2019 solution/projects to VS 2022. Remove Win32 ↵Mounir IDRASSI3-402/+423
configuration for driver and binaries. Only setup remains 32-bit to be compatible with both x64 and arm64 Windows.
2024-11-13Windows: Remove support for 32-bit driver code. Set build target as Windows ↵Mounir IDRASSI7-324/+220
10. Simplify code and fix all warnings in driver.
2024-11-10Add support for SHA-256 x86 instrinsic for enhance performance of ↵Mounir IDRASSI2-0/+9
PBKDF2-HMAC-SHA256
2024-09-08Windows: Add support for x86 and x64 build for driver and binaries using ↵Mounir IDRASSI2-76/+153
Visual Studio 2019 We also enable Control Flow Guard and Spectre Mitigation
2024-08-02Increment version to 1.26.13. Update release notes. Update signed Windows ↵Mounir IDRASSI1-4/+4
drivers.
2024-08-02Implement detection of volumes with vulnerable XTS master key.Mounir IDRASSI2-1/+12
If vulnerability detected, a warning message is displayed during mount or backup/restore header, and changing the password is disallowed since it will not change the master key.
2024-06-23MacOSX: Fix compiler warningMounir IDRASSI1-1/+1
Update friend declaration in FuseService.h and refactor GetCharWidth to ComputeCharWidth in WaitDialog.h to avoif hiding GetCharWidth inherited from wxWindow
2024-06-22MacOSX: Add for using FUSE-T instead of MacFUSEMounir IDRASSI1-1/+1
The build script build_veracrypt_macosx.h now accepts the argument -f to enable fuse-t support. It is also possible to set the environment variable VC_OSX_FUSET to 1 for FUSE-T support. A change was done in CoreUnix::GetMountedVolumes to add a waiting loop for control file to be accessible because when using FUSE-T there always a delay before control file can be serialized.
2024-06-12Avoid conflict with C++17 features std::byte by using uint8 type instead of byteMounir IDRASSI8-59/+59
2023-11-09Increment version to 1.26.10. Update signed Windows drivers.Mounir IDRASSI1-4/+4
2023-11-08Windows: Fix failure to format some disks (e.g. VHDX) caused by partition ↵Mounir IDRASSI2-11/+10
offset not 4K aligned Now we set offset to 1MB which is a typical values used for MBR disks. We also use a more standard way to calculate legacy number of cylinders
2023-10-11Increment version to 1.26.9Mounir IDRASSI1-4/+4
2023-10-10Increment version to 1.26.8Mounir IDRASSI1-4/+4
2023-09-30Increment version to 1.26.7. Set release date to October 1st. Update Windows ↵Mounir IDRASSI1-4/+4
signed driver files.
2023-09-29Windows Driver: Use KeQueryInterruptTimePrecise on Windows 8.1 and newer as ↵Mounir IDRASSI1-2/+20
better seed for internal RNG compared to KeQueryInterruptTime
2023-08-21Allow cross compilation. (#1182)Unit 1931-1/+1
2023-08-14Increment version to 1.26.5. Update signed Windows drivers.Mounir IDRASSI1-2/+2
2023-08-13Windows: Implement support for mounting partially encrypted system partitionsMounir IDRASSI4-5/+21
For now, we force ReadOnly mounting for such partitions.
2023-07-22Windows: Remove TrueCrypt support. Increment version to 1.26.4.Mounir IDRASSI4-25/+5
2023-06-29EMV keyfile support: Overall code improvements and bug fixesMounir IDRASSI2-0/+144
2023-05-18Fix compiler warnings (#1030)David1-2/+2
Fixing the following compiler warnings: FuseService.cpp: In function ‘int VeraCrypt::fuse_service_read(const char*, char*, size_t, off_t, fuse_file_info*)’: FuseService.cpp:233:12: warning: catching polymorphic type ‘struct VeraCrypt::MissingVolumeData’ by value [-Wcatch-value=] 233 | catch (MissingVolumeData) | ^~~~~~~~~~~~~~~~~ FuseService.cpp: In static member function ‘static int VeraCrypt::FuseService::ExceptionToErrorCode()’: FuseService.cpp:362:15: warning: catching polymorphic type ‘class std::bad_alloc’ by value [-Wcatch-value=] 362 | catch (std::bad_alloc) | ^~~~~~~~~ Apart from warnings, the current code creates unnecessary copies of the exception object in debug mode. (But not in -O3)
2022-03-21Increment version to 1.26 and update windows driver and MBR bootloader filesMounir IDRASSI1-4/+4
2022-03-08Implement support of Blake2s-256 hash algorithm and remove deprecated ↵Mounir IDRASSI4-23/+20
algorithms RIPEMD-160 and GOST89.
2022-02-19Increment version to 1.25.9 and update Release Notes.Mounir IDRASSI1-2/+2
2022-02-16Increment version to 1.25.8.2 and update signed Windows driversMounir IDRASSI1-2/+2
2022-02-11Windows: Increment version to 1.25.8.1 and update signed Windows driversMounir IDRASSI1-2/+2
2022-02-10Windows Driver: Don't cache the password if outer volume mounting succeeds ↵Mounir IDRASSI1-2/+11
but hidden volume mounting fails
2022-02-06Windows: Add registry setting to disable erasing encryption keys on Windows ↵Mounir IDRASSI4-2/+18
shutdown/reboot. This helps solve BSOD during shutdown/reboot on some machines. Under "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\veracrypt", create a REG_DWORD value named "VeraCryptEraseKeysShutdown" and set its value to 0.
2021-12-30Update Release Notes and add signed Windows driver.Mounir IDRASSI1-2/+2
2021-12-30Windows driver: Set maximum values for encryption queue parameters. Add ↵Mounir IDRASSI2-3/+18
IOCTL code to read used values from user space maximum value for EncryptionFragmentSize is 2048 maximum value for EncryptionIoRequestCount is 8192 maximum value for EncryptionItemCount is (EncryptionIoRequestCount/2)
2021-12-30Windows Driver: Better code for EncryptionFragmentSize variable handlingMounir IDRASSI1-4/+5
2021-12-27Increment version to 1.25.6. Update Release Notes and add signed Windows driver.Mounir IDRASSI1-2/+2
2021-12-20Increment version to 1.25.5 and update release notesMounir IDRASSI1-2/+2
2021-12-20Windows Driver: Add registry settings to control driver internal encryption ↵Mounir IDRASSI4-19/+130
queue Under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\veracrypt: - VeraCryptEncryptionFragmentSize (REG_DWORD): size of encryption data fragment in KiB. Default is 256. - VeraCryptEncryptionIoRequestCount (REG_DWORD): maximum number of parallel I/O requests. Default is 16. - VeraCryptEncryptionItemCount (REG_DWORD): maximum number of encryption queue items processed in parallel. Default is 8.
2021-11-30Increment version to 1.25.4 and set release date to December 3rd 2021Mounir IDRASSI1-2/+2
2021-11-28Increment version to 1.25 (1.25.3)Mounir IDRASSI1-2/+2