1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 02:58:02 -06:00
Commit Graph

290 Commits

Author SHA1 Message Date
Mounir IDRASSI
ff63e5aad0 Update Release Notes. Set version to 1.26.18. Update signed Windows drivers. 2025-01-17 07:44:09 +01:00
Mounir IDRASSI
54bd819990 Windows/Linux/macOS: implement AES hardware support on ARM64 (ARMv8) 2025-01-17 00:58:54 +01:00
Mounir IDRASSI
1b35abb191 Increment version to 1.26.18. Update copyright date. Update Release Notes. Update Windows drivers. 2025-01-14 12:26:28 +01:00
Mounir IDRASSI
f3af65b007 Windows driver: Use IO_DISK_INCREMENT for event signaling in IRP completion routine
This provides a slight priority boost for waiting threads and maintains standard practice for disk device drivers.
2024-12-25 17:58:12 +01:00
Mounir IDRASSI
81f0adcc35 Windows Driver: set Windows 10 version 1809 as minimum.
To support this, we had to replace ExAllocatePool2 by ExAllocatePoolUninitialized.
2024-12-25 16:18:19 +01:00
Mounir IDRASSI
283059523d Windows Driver: make UpdateBuffer function more robust by adding security region size parameter 2024-12-25 16:09:10 +01:00
Mounir IDRASSI
3bb5184645 Windows: Increment version to 1.26.17.2. Update signed drivers. 2024-11-27 01:05:55 +01:00
Mounir IDRASSI
7e398c96d0 Windows: don't test sign driver by default in Release mode. 2024-11-25 00:15:47 +01:00
Mounir IDRASSI
53bbee3a7c Windows Driver: Set version to 1.26.17.1. Update signed drivers. 2024-11-24 11:26:41 +01:00
Mounir IDRASSI
453ff2880e Windows Driver: Make max work items count configurable. Increase default to 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-23 17:44:48 +01:00
Mounir IDRASSI
5a85c54c6e Windows Driver: Optimize spinlock usage in CompleteIrpWorkItemRoutine
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-22 15:19:10 +01:00
Mounir IDRASSI
b85a2df224 Windows driver: use correct WDM type. Increment version to 1.26.17 2024-11-20 00:21:30 +01:00
Mounir IDRASSI
f9b9a9ca9f Increment version to 1.26.16. Update Release Notes. Update signed Windows drivers. 2024-11-18 00:04:26 +01:00
Mounir IDRASSI
93868acfdd Windows Driver: Use system functions directly instead of dynamic loading since we are targeting Windows 10 2024-11-17 21:37:16 +01:00
Mounir IDRASSI
42fdbcf3ce Windows Driver: Fix deadlock in EncryptedIoQueue due to re-entrant IRP 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-17 19:39:58 +01:00
Mounir IDRASSI
b7f6270c0d Windows Driver: Add Unicode define to build and enhance tracing in debug mode 2024-11-16 18:33:28 +01:00
Mounir IDRASSI
9c9870b103 Windows: Avoid modifying BootArguments structure and use __unaligned keyword to inform compiler that pointer is unaligned.
This avoids issues with existing bootloaders
2024-11-16 01:50:06 +01:00
Mounir IDRASSI
c86577fc0e Windows: remove 32-bit logic from the code since we support only 64-bit. remove 32-bit EFI bootloader files.
We also fix intermediary files folder for Portable and Setup projects
2024-11-16 01:05:15 +01:00
Mounir IDRASSI
62e956942a Windows: remove VS 2019 solution and project files since we migrated to VS 2022. 2024-11-15 18:36:19 +01:00
Mounir IDRASSI
6d1ad12755 Windows: move main project files and solution from VS 2010 to VS 2022. Delete unused files. 2024-11-15 15:50:32 +01:00
Mounir IDRASSI
214fbb5cbd Windows: Upgrade VS 2019 solution/projects to VS 2022. Remove Win32 configuration for driver and binaries.
Only setup remains 32-bit to be compatible with both x64 and arm64 Windows.
2024-11-15 14:22:45 +01:00
Mounir IDRASSI
cb97351250 Windows: Remove support for 32-bit driver code. Set build target as Windows 10. Simplify code and fix all warnings in driver. 2024-11-13 02:08:51 +01:00
Mounir IDRASSI
04c747fb2d Add support for SHA-256 x86 instrinsic for enhance performance of PBKDF2-HMAC-SHA256 2024-11-10 21:08:00 +01:00
Mounir IDRASSI
4a8f068ba5 Windows: Add support for x86 and x64 build for driver and binaries using Visual Studio 2019
We also enable Control Flow Guard and Spectre Mitigation
2024-09-08 17:14:31 +02:00
Mounir IDRASSI
86bc9b56f0 Increment version to 1.26.13. Update release notes. Update signed Windows drivers. 2024-08-02 00:55:32 +02:00
Mounir IDRASSI
ed1263bf8c Implement detection of volumes with vulnerable XTS master key.
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-08-02 00:20:53 +02:00
Mounir IDRASSI
0ea32b02b9 MacOSX: Fix compiler warning
Update friend declaration in FuseService.h and refactor GetCharWidth to ComputeCharWidth in WaitDialog.h to avoif hiding GetCharWidth inherited from wxWindow
2024-06-23 22:43:14 +02:00
Mounir IDRASSI
edde1d45f6 MacOSX: Add for using FUSE-T instead of MacFUSE
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-22 01:13:20 +02:00
Mounir IDRASSI
455a4f2176 Avoid conflict with C++17 features std::byte by using uint8 type instead of byte 2024-06-12 12:30:04 +02:00
Mounir IDRASSI
7e7d776338 Increment version to 1.26.10. Update signed Windows drivers. 2023-11-09 00:09:00 +01:00
Mounir IDRASSI
1688779bc3 Windows: Fix failure to format some disks (e.g. VHDX) caused by partition 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-11-08 22:43:18 +01:00
Mounir IDRASSI
4cfb4b03a7 Increment version to 1.26.9 2023-10-11 23:59:02 +02:00
Mounir IDRASSI
06b3095e20 Increment version to 1.26.8 2023-10-10 23:15:18 +02:00
Mounir IDRASSI
53cbe028cd Increment version to 1.26.7. Set release date to October 1st. Update Windows signed driver files. 2023-09-30 11:20:46 +02:00
Mounir IDRASSI
5192eac233 Windows Driver: Use KeQueryInterruptTimePrecise on Windows 8.1 and newer as better seed for internal RNG compared to KeQueryInterruptTime 2023-09-29 22:14:43 +02:00
Unit 193
d49c75370a Allow cross compilation. (#1182) 2023-08-21 11:24:25 +02:00
Mounir IDRASSI
fcf0cb94f1 Increment version to 1.26.5. Update signed Windows drivers. 2023-08-14 01:45:37 +02:00
Mounir IDRASSI
f84d235cf1 Windows: Implement support for mounting partially encrypted system partitions
For now, we force ReadOnly mounting for such partitions.
2023-08-13 22:50:37 +02:00
Mounir IDRASSI
fa6359d424 Windows: Remove TrueCrypt support. Increment version to 1.26.4. 2023-07-22 10:25:22 +02:00
Mounir IDRASSI
034b64f415 EMV keyfile support: Overall code improvements and bug fixes 2023-06-29 00:06:20 +02:00
David
ecb5ea9671 Fix compiler warnings (#1030)
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)
2023-05-18 23:12:01 +02:00
Mounir IDRASSI
67acba4b4f Increment version to 1.26 and update windows driver and MBR bootloader files 2022-03-21 01:19:02 +01:00
Mounir IDRASSI
36795a688f Implement support of Blake2s-256 hash algorithm and remove deprecated algorithms RIPEMD-160 and GOST89. 2022-03-08 00:29:26 +01:00
Mounir IDRASSI
3cab3ce37a Increment version to 1.25.9 and update Release Notes. 2022-02-19 22:54:59 +01:00
Mounir IDRASSI
c2b2f80d4f Increment version to 1.25.8.2 and update signed Windows drivers 2022-02-16 23:22:22 +01:00
Mounir IDRASSI
e925dd2f1a Windows: Increment version to 1.25.8.1 and update signed Windows drivers 2022-02-11 00:37:09 +01:00
Mounir IDRASSI
aebb099da2 Windows Driver: Don't cache the password if outer volume mounting succeeds but hidden volume mounting fails 2022-02-10 01:21:25 +01:00
Mounir IDRASSI
c51a209879 Windows: Add registry setting to disable erasing encryption keys on Windows 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.
2022-02-06 09:52:24 +01:00
Mounir IDRASSI
656b1c5902 Update Release Notes and add signed Windows driver. 2021-12-30 15:35:58 +01:00
Mounir IDRASSI
f63c2ec13c Windows driver: Set maximum values for encryption queue parameters. Add 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-30 00:42:39 +01:00