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

2673 Commits

Author SHA1 Message Date
Mounir IDRASSI
54b81ed2d1 Windows driver: add defensive checks to TCCloseVolume implementation 2025-09-13 15:26:53 +09:00
Mounir IDRASSI
0b60d2a119 Windows: remove wrong static declaration of functions in Ntvol.h 2025-09-13 15:25:56 +09:00
Mounir IDRASSI
02e7b48836 Windows driver: revert IRP completion overhaul changes until more tests are conducted 2025-09-13 15:08:38 +09:00
Mounir IDRASSI
f6f25eec8f Windows driver: simplify TCSleep to use KeDelayExecutionThread
Replace timer-based TCSleep (which allocated a KTIMER and waited on it) with an
implementation that calls KeDelayExecutionThread. This removes dynamic allocation
and kernel timer usage to simplify the code and reduce resource overhead.
Adds an IRQL <= APC_LEVEL assertion and documents the requirement.

This is safe because TCSleep is always called from code that runs at PASSIVE_LEVEL
2025-09-08 12:14:20 +09:00
Mounir IDRASSI
7df2c2957f Windows driver fix: Decrement IoThreadPendingRequestCount on allocation failure in MainThreadProc
Added InterlockedDecrement in the error path when GetPoolBuffer fails for EncryptedIoRequest to ensure accurate tracking of pending IO requests and prevent potential resource leaks.
2025-09-08 11:40:33 +09:00
Mounir IDRASSI
f40f316dfb Windows driver: remove unneeded __try/__finally 2025-09-08 11:38:30 +09:00
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
Mr-Update
e86d83e63c Update Language.de.xml (#1598)
Translation completed
2025-09-06 09:27:46 +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
c5589ac4fb Translations: set correct "lang" attribute in Swedish language file 2025-09-05 23:55:18 +09:00
nkh0472
58353ceb4c Update Language.zh-cn.xml (#1597) 2025-09-05 23:46:35 +09:00
Nick
ca95c5fdcd Update Swedish (#1594) 2025-09-05 23:45:46 +09:00
Matthaiks
73e738a629 Update Polish translation (#1592) 2025-09-05 23:44:03 +09:00
Patriccollu
b38a31a190 Update Corsican translation on 2025-08 (#1591)
* Update Corsican translation on 2025-08

* Update Corsican translation on 2025-08
2025-09-05 23:43:38 +09:00
Mounir IDRASSI
10c4d30312 Documentation: Add entry about KDF, PBKDF2. 2025-08-31 23:11:06 +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
26a754b198 Documentation: Use "KDF" instead of "PKCS-5 PRF". Add Argon2 related information. 2025-08-08 23:38:40 +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
helmutbuhler
04648bc5ee Fix IDC_MOUNTALL in German translation (#1568)
* Fix german translation of IDC_MOUNTALL

* Replace " ..." with "..." in German translation

* Change help texts that refer to IDC_MOUNTALL string
2025-07-07 08:54:55 +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
nkh0472
95659a8563 Update Language.zh-cn.xml (#1565) 2025-06-29 08:36:34 +09:00
Patriccollu
98a504c70a Update Corsican translation on 2025-06 (#1566) 2025-06-29 08:36:10 +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
Matthaiks
56146ca6b7 Update Polish translation (#1564) 2025-06-26 10:37:00 +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
c148898ece Update some translations 2025-06-25 23:36:17 +09:00
Mounir IDRASSI
28f0c6cb4a Update Release Notes and CHM. 2025-06-25 23:14:34 +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