VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
6 daysUpdate Release Notes. Set version to 1.26.18. Update signed Windows drivers.Mounir IDRASSI14-25/+25
7 daysWindows/Linux/macOS: implement AES hardware support on ARM64 (ARMv8)Mounir IDRASSI22-49/+492
9 daysLinux/FreeBSD: Prevent mounting volumes on system directories and PATH ↵Mounir IDRASSI17-6/+244
(CVE-2025-23021, reported by SivertPL @__tfr) Added security checks to prevent mounting VeraCrypt volumes on system directories (like /usr/bin) or directories in the user's PATH, which could theoretically allow execution of malicious binaries instead of legitimate system binaries. Key changes: - Block mounting on protected system directories (/usr, /bin, /lib, etc.) This restriction cannot be overridden - Block mounting on directories present in user's PATH environment variable This can be overridden with --allow-insecure-mount flag - Add visual warnings (red border, "[INSECURE MODE]") when mounting on PATH directories is allowed - Handle symlinks properly when checking paths - Add new error messages for blocked mount points To override PATH-based restrictions only (system directories remain protected): veracrypt --allow-insecure-mount [options] volume mountpoint Security Impact: Low to Medium The attack requires either: - User explicitly choosing a system directory as mount point instead of using VeraCrypt's default mount points - Or attacker having both filesystem access to modify favorites configuration AND knowledge of the volume password Default mount points are not affected by this vulnerability. Security: CVE-2025-23021
9 daysLinux/FreeBSD: Add absolute paths for system binaries to prevent path ↵Mounir IDRASSI9-99/+226
hijacking (CVE-2024-54187, collaboration with SivertPL @__tfr) This commit fixes a critical security vulnerability where VeraCrypt could be tricked into executing malicious binaries with elevated privileges. The vulnerability has two severe implications: 1. When sudo's secure_path option is disabled, attackers could execute malicious binaries with root privileges by placing them in user-writable PATH directories (e.g., making "sudo mount" execute a malicious mount binary) 2. By placing a malicious sudo binary in PATH, attackers could intercept and steal the user's password when VeraCrypt prompts for sudo authentication The vulnerability allowed attackers to place malicious binaries in user-writable directories that appear in PATH before system directories, potentially leading to privilege escalation and credential theft. Key changes: - Implement FindSystemBinary() to locate executables in secure system paths - Replace all relative binary paths with absolute paths for system commands - Add security checks for executable permissions - Update process execution to use absolute paths for: * sudo * mount * fsck * terminal emulators * file managers * system utilities (hdiutil, mdconfig, vnconfig, lofiadm) The fix ensures all system binaries are called using their absolute paths from secure system directories, preventing both privilege escalation through PATH manipulation and password theft through sudo hijacking. Security: CVE-2024-54187
9 daysIncrement version to 1.26.18. Update copyright date. Update Release Notes. ↵Mounir IDRASSI409-427/+434
Update Windows drivers.
11 daysWindows: Fix regression in Traveler Disk creation (#886)Mounir IDRASSI1-6/+6
Issue was caused by the fact that Microsoft signing certificate for driver file has changed. We fix it by updating the SHA512 fingerprint of Microsoft code signing certificate.
12 daysLinux Debian/Ubuntu: use a distro-specific version string to avoid APT ↵Mounir IDRASSI1-1/+13
repository conflicts In a Debian-style APT repository, the pool/ directory groups packages primarily by source package name and binary package name, version, architecture, etc. If two distinct .deb files have identical name and version (as seen in their control file) and same architecture, reprepro will report a conflict when adding one after the other. So, we need to append distro-specific string to the existing version in order to avoid such conflict when creating VeraCrypt APT repository.
2025-01-06Windows: Add missing file entry to Zip project after libzip updateMounir IDRASSI2-0/+4
2025-01-01Windows: Update libzip to version 1.11.2Mounir IDRASSI143-669/+1200
2025-01-01Windows: Update LZMA SDK to version 24.09Mounir IDRASSI16-247/+967
2024-12-27Windows: use modern API to gather system entropy for random generation ↵Mounir IDRASSI1-134/+212
instead of obsolete that were not working This commit increases randomness quality by using more dynamic/varied sources of entropy. PDH-based disk and network statistics collection in now added to random pool - Introduced `GetDiskStatistics` to gather disk read/write performance data using PDH API. - Introduced `GetNetworkStatistics` to gather network send/receive performance data using PDH API. - Integrated high-resolution timestamps and random intervals to improve entropy in collected data. - Updated `SlowPoll` function to utilize PDH-based disk and network statistics. - Removed obsolete NetAPI32-based network statistics collection.
2024-12-25Windows driver: Use IO_DISK_INCREMENT for event signaling in IRP completion ↵Mounir IDRASSI1-2/+2
routine This provides a slight priority boost for waiting threads and maintains standard practice for disk device drivers.
2024-12-25Windows: Update Windows version check on startup to require Win10 1809 or laterMounir IDRASSI3-4/+22
- Add IsWin10BuildAtLeast() helper function to check Windows 10 build numbers - Replace direct build number comparison with IsWin10BuildAtLeast() for ReflectDrivers check - Update error message to be more specific about Windows version requirement
2024-12-25Windows Driver: set Windows 10 version 1809 as minimum.Mounir IDRASSI2-5/+5
To support this, we had to replace ExAllocatePool2 by ExAllocatePoolUninitialized.
2024-12-25Windows Driver: make UpdateBuffer function more robust by adding security ↵Mounir IDRASSI1-20/+60
region size parameter
2024-12-25Linux: Fix warning during build cause by deprecated 'u' modifier in "ar" commandMounir IDRASSI1-1/+1
2024-12-25Linux/macOS: Simplify sudo session detection logic and extend it to macOSMounir IDRASSI5-44/+23
This update simplifies the logic for detecting active sudo sessions by checking the exit code of the sudo -n -l command, which reliably returns 0 if a session is active. Additionally, this approach is now applicable to recent macOS versions, as they no longer have the sudo bug that previously prevented us from using this method.
2024-12-24Linux: Fix "Password too long" error message not expanded to include max ↵Mounir IDRASSI1-2/+2
length (#1456)
2024-12-23Linux/macOS: check if volume doesn't exist before starting the mount operation.Mounir IDRASSI2-0/+25
2024-11-27Windows: Increment version to 1.26.17.2. Update signed drivers.Mounir IDRASSI14-21/+21
2024-11-27Windows Setup: Fix the implementation of backup/restore of file permission ↵Mounir IDRASSI2-13/+4
during update
2024-11-25Windows: don't test sign driver by default in Release mode.Mounir IDRASSI2-0/+6
2024-11-25Windows Setup: Fix "Access Denied" issue during VeraCrypt update after a ↵Mounir IDRASSI3-2/+256
Windows upgrade During a Windows upgrade, ownership of veracrypt.sys is set to TrustedInstaller, preventing VeraCrypt from accessing the file during an update. This commit resolves the issue by temporarily taking ownership of the file to rename it, allowing the new file to be copied. The setup process now obtains additional privileges for this operation, which are properly dropped once the file copying is complete.
2024-11-24Set 1.26.17 release date to November 24thMounir IDRASSI1-1/+1
2024-11-24Windows Driver: Set version to 1.26.17.1. Update signed drivers.Mounir IDRASSI7-7/+7
2024-11-23Windows Driver: Make max work items count configurable. Increase default to ↵Mounir IDRASSI5-38/+56
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: Update signed Windows drivers.Mounir IDRASSI5-1/+1
2024-11-20Windows driver: use correct WDM type. Increment version to 1.26.17Mounir IDRASSI41-65/+71
2024-11-18Increment version to 1.26.16. Update Release Notes. Update signed Windows ↵Mounir IDRASSI46-59/+59
drivers.
2024-11-17Windows Driver: Use system functions directly instead of dynamic loading ↵Mounir IDRASSI6-223/+53
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-17Linux/macOS: make binary symbols visible in crash report.Mounir IDRASSI1-1/+4
2024-11-16Windows Driver: Add Unicode define to build and enhance tracing in debug modeMounir IDRASSI2-151/+83
2024-11-16Windows: Fix driver crash caused by 32-bit leftover code in ↵Mounir IDRASSI1-3/+0
derive_key_blake2s function
2024-11-16Windows: Avoid modifying BootArguments structure and use __unaligned keyword ↵Mounir IDRASSI4-5/+4
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 IDRASSI41-521/+127
remove 32-bit EFI bootloader files. We also fix intermediary files folder for Portable and Setup projects
2024-11-16Windows: Fix output directory configuration of COMREG projectMounir IDRASSI1-4/+4
2024-11-16Windows: Fix regression in self-test of hash algorithms that caused them to failMounir IDRASSI1-2/+2
2024-11-15Windows: Fix VS 2022 projects referencesMounir IDRASSI4-26/+30
2024-11-15Windows: remove VS 2019 solution and project files since we migrated to VS 2022.Mounir IDRASSI28-7285/+0
2024-11-15Windows: Fix delayload link warning about comdlg32.dll not used. Remove ↵Mounir IDRASSI8-866/+29
unused old project files
2024-11-15Windows: move main project files and solution from VS 2010 to VS 2022. ↵Mounir IDRASSI28-6847/+1810
Delete unused files.
2024-11-15Windows: Fix warning when building Setup and Portable. No file elevation is ↵Mounir IDRASSI1-0/+8
used for them.
2024-11-15Windows: Upgrade VS 2019 solution/projects to VS 2022. Remove Win32 ↵Mounir IDRASSI14-1816/+880
configuration for driver and binaries. Only setup remains 32-bit to be compatible with both x64 and arm64 Windows.
2024-11-15Windows: Fix build of MBR bootloaderMounir IDRASSI1-1/+1
2024-11-15Windows: Fix warning in driver build by make get_pkcs5_iteration_count have ↵Mounir IDRASSI1-40/+36
a single return statement at the end
2024-11-15Windows: Use VS builtin __fastfail intrinsic for fatal exception instead of ↵Mounir IDRASSI1-0/+3
affecting NULL pointer
2024-11-15Windows: Fix various compiler warningsMounir IDRASSI17-287/+301
2024-11-15Windows: Fix MBR bootload compilation error following latest changesMounir IDRASSI1-3/+3