1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-12 19:38:26 -06:00
Commit Graph

1982 Commits

Author SHA1 Message Date
Mounir IDRASSI
0e19cb9223 Windows driver: harden UpdateBuffer against integer overflow. Make completion backoff per request (no shared state) 2025-09-08 10:36:18 +09:00
Mounir IDRASSI
062b385a69 Windows driver: overhaul IRP completion path in EncryptedIoQueue, add dual completion threads, precise byte accounting & safer UpdateBuffer
Major changes:
- Added pooled + elastic work item model with retry/backoff (MAX_WI_RETRIES). removed semaphore usage.
- Introduced two completion threads to reduce contention and latency under heavy IO.
- Added BytesCompleted (per IRP) and ActualBytes (per fragment) for correct short read/write accounting. total read/write stats now reflect real transferred bytes instead of requested length.
- Moved decryption of read fragments into IO thread. completion threads now only finalize IRPs (reduces race window and simplifies flow).
- Deferred final IRP completion via FinalizeOriginalIrp to avoid inline IoCompleteRequest re-entrancy. added safe OOM inline fallback.
- Implemented work item pool drain & orderly shutdown (ActiveWorkItems + NoActiveWorkItemsEvent) with robust stop protocol.
- Replaced semaphore-based work item acquisition with spin lock + free list + event (WorkItemAvailableEvent). added exponential backoff for transient exhaustion.
- Added elastic (on-demand) work item allocation with pool vs dynamic origin tracking (FromPool).
- Added FreeCompletionWorkItemPool() for symmetric cleanup; ensured all threads are explicitly awakened during stop.
- Added second completion thread replacing single CompletionThread.
- Hardened UpdateBuffer: fixed parameter name typo, added bounds/overflow checks using IntSafe (ULongLongAdd), validated Count, guarded sector end computation.
- Fixed GPT/system region write protection logic to pass correct length instead of end offset.
- Ensured ASSERTs use fragment‑relative bounds (cast + length) and avoided mixed 64/32 comparisons.
- Added MAX_WI_RETRIES constant. added WiRetryCount field in EncryptedIoRequest.
- Ensured RemoveLock is released only after all queue/accounting updates (OnItemCompleted).
- Reset/read-ahead logic preserved. read-ahead trigger now based on actual completion & zero pending fragment count.
- General refactoring, clearer separation of concerns (TryAcquireCompletionWorkItem / FinalizeOriginalIrp / HandleCompleteOriginalIrp).

Safety / correctness improvements:
- Accurate short read handling (STATUS_END_OF_FILE with true byte count).
- Eliminated risk of double free or premature RemoveLock release on completion paths.
- Prevented potential overflow in sector end arithmetic.
- Reduced contention and potential deadlock scenarios present with previous semaphore wait path.
2025-09-07 23:58:35 +09:00
Mounir IDRASSI
55adda7504 Windows driver: add more checks and comments to crash dump filter
- Document HIGH_LEVEL constraints and rationale for pre-building a nonpaged scratch MDL.
- Allocate contiguous scratch buffer with conservative PFN cap (0x7FFFFFFFFFF) and fall back to unlimited cap if needed.
- Replace ASSERT with TC_BUG_CHECK for validation of write MDL mapping at HIGH_LEVEL.
- Safely copy PFNs from prebuilt MDL into caller MDL: compute dst/src page counts, check capacity, copy exact PFNs and retarget MDL header fields (preserve MdlFlags).
- Make DumpData cleanup defensive in unload path.
- comments improvements for clarity and maintainability.
2025-09-06 16:42:42 +09:00
Charlie
c1ae011ba1 Fix problems inside crash dump filter path (#1590)
* Prefer allocations to be non-executable
* Remove and reimplement DDIs inappropriately called inside HIGH_LEVEL IRQL routines
* Refactor hibernate context to be passed around in the passed FILTER_EXTENSION pointer rather than global
2025-09-06 11:22:50 +09:00
Mounir IDRASSI
2dd4e29430 Fix warning caused by clash between Argon2 AVX2 rotrX macros and integer equivalents in VeraCrypt headers 2025-09-06 00:03:03 +09:00
Mounir IDRASSI
1326844065 Windows: Use tab control for VeraCrypt preferences to reduce clutter and size of dialog 2025-08-31 23:03:32 +09:00
uni-kod
7de81cd42b Fix code compilation. (#1583)
* Fix "blake2b.h" header file location.

* Include "blake2b.h" to fix compilation.
2025-08-31 15:32:33 +09:00
Mounir IDRASSI
54c39e4eb2 Use "KDF" instead of "PKCS5 PRF" for UI selection of KDF to use 2025-08-08 22:53:04 +09:00
Mounir IDRASSI
3867c1cca3 Use blake2b as hash for random generator from Argon2 is used. 2025-07-03 17:32:47 +09:00
Mounir IDRASSI
eadb02d8ef Windows: set version to 1.26.26. Update Release Notes, bootloader and Windows drivers. 2025-06-29 23:31:18 +09:00
Mounir IDRASSI
9dc24ba7d0 Windows: speedup PRF autodetection mode by implementing abort mechanism in PBKDF2/Argon2 primitives 2025-06-29 21:44:32 +09:00
Mounir IDRASSI
84f7ec5250 Linux: Fix build error under ARM64 2025-06-26 17:07:16 +09:00
Mounir IDRASSI
176d1c8bff Windows: Update MSI version to 1.26.25 2025-06-26 11:12:30 +09:00
Mounir IDRASSI
04606da5ee Linux: Fix build issue after addition of Argon2 on Windows.
Argon2 support for Linux will come later
2025-06-26 10:15:01 +09:00
Mounir IDRASSI
6949417181 Windows: use correct default PIM value for Argon2 when validating small PIM values 2025-06-26 00:05:28 +09:00
Mounir IDRASSI
90e315dae2 Windows: Add missing x64 driver file 2025-06-26 00:00:40 +09:00
Mounir IDRASSI
c782051e27 Windows: Fix build errors on ARM64 configuration due to missing include path in projects 2025-06-25 22:01:32 +09:00
Mounir IDRASSI
f1b1112254 Windows: Update Windows MBR bootloader 2025-06-25 22:00:31 +09:00
Mounir IDRASSI
ab2937c889 Add new entry in XML files for Argon2 memory cost. Increment version to 1.26.25 2025-06-25 20:32:09 +09:00
Mounir IDRASSI
3c17b8ced2 Windows: Add support for Argon2id as an alternative to PBKDF2 key derivation 2025-06-25 15:44:31 +09:00
Mounir IDRASSI
228129362a Windows: Include SDL dlls in signing batch file 2025-06-24 15:49:32 +09:00
Mounir IDRASSI
5627e7a738 Windows: Add CLI switches to control memory/screen protection features. Disable non-configurable settings in portable mode 2025-06-24 15:48:01 +09:00
Mounir IDRASSI
c1dbcb32e6 Windows: Add resource file to Format dll. Fix copying output of Format dll project. 2025-06-24 15:31:39 +09:00
Mounir IDRASSI
79f7791036 Windows: Add password length and pin value defined to SDK header 2025-06-13 22:25:08 +09:00
Mounir IDRASSI
4402d153b9 Windows: Fix incorrect comment in SDK header file 2025-06-13 21:15:03 +09:00
Mounir IDRASSI
2b531dd113 Windows: Add an SDK for VeraCrypt Format that allows third-party application to create volumes 2025-06-13 21:12:14 +09:00
Jertzukka
1ed5225971 Linux: Update 25.04 Plucky dependencies (#1556)
Update 25.04 dependency to require libwxgtk3.2-1t64 package.
2025-06-13 08:51:28 +09:00
Mounir IDRASSI
08093f460a Windows: fix link error in custom EFI / VC_SKIP_OS_DRIVER_REQ_CHECK configuration 2025-06-09 11:41:12 +09:00
Mounir IDRASSI
87a5024a5b Linux: Allow AppImage file to start with "veracrypt" in any case 2025-06-09 11:07:07 +09:00
Mounir IDRASSI
69852fad9a Windows: Increase length of screen protection setting label to avoid truncation in some cases. 2025-06-09 10:41:10 +09:00
Jertzukka
5d1c48d5ba Linux/FreeBSD/macOS: Column widths correct initially and on update (#1552)
Column width was updated before SlotListCtrl had the slots added,
which caused the column width to be incorrect before the first time
OnTimer ran to update it. Changing the order ensures the column width
is correct on program launch. Also ensure that we do not autosize
column to fit empty content.
2025-06-09 10:27:25 +09:00
Mounir IDRASSI
716ff4180e Add python script that automates uploading VeraCrypt release files to Launchpad 2025-06-01 10:44:10 +09:00
Jertzukka
44fc3ca991 All platforms: Update logo icons (#1546)
Update the old logo with a simplified one without extra label text.
.ico and .icns are updated on Windows and macOS, and .png, .svg
are added on Linux and FreeBSD.

Original logo design by Andreas Becker, recreated by danielwerg with
some edits and symbolic version by me.
2025-05-31 23:16:39 +09:00
Sam Hocevar
c7f69062db Use “unmount” instead of “dismount” in scripts and in text shown to the user. (#1548) 2025-05-31 23:06:30 +09:00
Mounir IDRASSI
0f509dba9c Windows:Continuation of fix of tab navigation in various dialogs 2025-05-29 22:07:03 +09:00
Mounir IDRASSI
08c813efd6 Increment version to 1.26.24. Update Release Notes and Windows drivers. 2025-05-29 18:10:59 +09:00
Mounir IDRASSI
704a21d31f Windows: Fix tab navigation in various dialogs 2025-05-29 06:17:06 +09:00
Mounir IDRASSI
4774bde1f1 macOS: use macFUSE name instead of OSXFUSE to match the new name of the macOS fuse library project. 2025-05-29 06:03:52 +09:00
Mounir IDRASSI
b64b7c9ca4 macOS: Create symlink to VeraCrypt binary at /usr/local/bin/veracrypt during installation
This makes it easier to use the VeraCrypt CLI in a manner similar to Linux systems.
2025-05-29 05:48:40 +09:00
Mounir IDRASSI
71f538bcda Windows: real fix for "Unmount all" button label!! 2025-05-28 21:03:09 +09:00
Mounir IDRASSI
e68c98ab6b Increment version to 1.26.3. Update Release Notes and signed drivers 2025-05-28 19:28:32 +09:00
Mounir IDRASSI
1ebd11c750 Windows: Replace remaining "Dismount All" by "Unmount All" 2025-05-28 11:08:16 +09:00
Mounir IDRASSI
26eb821c69 Update Release Notes and release date. Increment version of Windows binaries 2025-05-27 18:15:32 +09:00
Mounir IDRASSI
98102bbff6 Linux/macOS: Make help text less confusing with regards to optional parameter of certain commands
the presence of '=' sign was not correct.
2025-05-27 17:14:17 +09:00
Mounir IDRASSI
b18c2d3c71 Windows: Implement mutex to serialize initialization across multiple VeraCrypt instances
When multiple VeraCrypt.exe instances were launched simultaneously, race conditions
could occur during the WM_INITDIALOG processing phase, potentially causing application
crashes or hang. This was because the initialization logic handles critical operations
like mounting/unmounting volumes and processing favorite volumes that modify global
system state.

This commit:
- Adds a named local session mutex (MainInitMutex) that serializes the WM_INITDIALOG handler
- Implements proper acquisition and release of the mutex during initialization
- Ensures proper cleanup of mutex resources on application exit
2025-05-27 15:18:06 +09:00
Mounir IDRASSI
4b46d992da Increment version to 1.26.22. Update Release Notes. Update signed drivers. 2025-05-25 09:49:49 +09:00
Mounir IDRASSI
9ea5ccc4aa Windows: Enable screen protection by default to block screenshots, recordings & Windows Recall. Add configurable setting in Preferences, Installer, and MSI.
This update introduces a screen protection mechanism that leverages the Windows Display Affinity API to prevent screen capture, screen recording, and inclusion in the Windows 11 Recall feature. By default, all VeraCrypt windows, menus, and tooltips are protected. Users can enable or disable this feature through a new setting available in the application Preferences, as well as in the installer and MSI configurations.

This enhances user privacy by mitigating potential leaks of sensitive interface content.

Note: Due to a regression in Windows 11 affecting layered windows, ComboBox dropdowns cannot currently be protected by this mechanism.
2025-05-24 15:28:39 +09:00
Mounir IDRASSI
44a9f8bcff Remove SM4 support! 2025-05-18 18:31:39 +09:00
Mounir IDRASSI
ec0fa4f482 macOS: make dmg template larger to accommodate increase size of documentation 2025-05-18 18:13:43 +09:00
Mounir IDRASSI
4b6e1a2309 macOS/FreeBSD: add missing GCC_GTEQ_440 define in Makefile 2025-05-18 17:39:41 +09:00