VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Platform
AgeCommit message (Collapse)AuthorFilesLines
9 daysLinux/FreeBSD: Prevent mounting volumes on system directories and PATH ↵Mounir IDRASSI1-1/+3
(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 IDRASSI2-1/+64
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 IDRASSI61-61/+61
Update Windows drivers.
2024-06-12Avoid conflict with C++17 features std::byte by using uint8 type instead of byteMounir IDRASSI13-55/+55
2023-10-01Linux: use "-std=c++11" for gcc 4.8 and adapt code to old compilersMounir IDRASSI1-1/+1
2023-08-19Linux: try use IOCTL BLKGETSIZE64 to get size of device instead of lseekMounir IDRASSI1-0/+11
2023-07-24Linux/macOS: Remove TrueCrypt supportMounir IDRASSI1-2/+0
2023-06-01Fix issues launching fsck via terminal on Linux (#1086)Jertzukka1-0/+1
Currently on a system without xterm or konsole (like fresh Ubuntu install) the fsck check will not launch. Added gnome-terminal as an alternative and fixed an issue where konsole will always error out as --title and --caption are no longer valid arguments. Previously the error message was simply "xterm not found", so new LangString LINUX_EX2MSG_TERMINALNOTFOUND was added to let the user knows which programs they need to get the feature working.
2022-02-18Linux: Fix code dump when built with -D_GLIBCXX_ASSERTIONS caused by an ↵Mounir IDRASSI1-1/+0
assert in libstdc++. The variable has enough capacity so pointer &buffer[0] is valid but since clear method was called, we are not supposed to access element at index 0. Related to Github issue #896
2021-07-14Make system devices work under FreeBSD (#777)MrLightningBolt2-2/+34
We query the kern.geom.conftxt sysctl for the GEOM configuration to find the partition offset. Technically speaking it would probably be better to link against libgeom but this is less overall intrusive. Also includes a small fix to find the parent device of an encrypted partition when it is a GPT partition rather than a BSD slice.
2021-07-14Add support for OpenBSD (#779)kokokodak3-1/+18
* OpenBSD: add basic support modified: Build/Include/Makefile.inc modified: Driver/Fuse/FuseService.cpp modified: Main/FatalErrorHandler.cpp modified: Makefile modified: Platform/Unix/File.cpp modified: Platform/Unix/FilesystemPath.cpp modified: Platform/Unix/SystemInfo.cpp * OpenBSD: some necessary files were missing new file: Core/Unix/OpenBSD/CoreOpenBSD.cpp new file: Core/Unix/OpenBSD/CoreOpenBSD.h new file: Core/Unix/OpenBSD/System.h
2020-06-28Linux/MacOSX: Erase sensitive memory explicitly instead of relying on the ↵Mounir IDRASSI4-9/+3
compiler not optimizing calls to method Memory::Erase
2020-06-26Linux/MacOSX: use standard std::shared_ptr instead of our custom ↵Mounir IDRASSI1-0/+17
implementation which is kept for compatibility with older compilers. We also introduce compatibility code for old compilers that don't define std::unique_ptr
2020-06-26Linux/MacOSX: fix warning reported by static code analysis tool about ↵Mounir IDRASSI1-1/+5
possible undefined output value in UserPreferences::SetValue and missing initialization of member variables in File constructor
2020-06-11Switch from auto_ptr to unique_ptr (#638)Christopher Bergqvist1-1/+1
2019-12-01UNIX: make sector size mismatch error more verbose (#552) (#561)alt3r 3go1-0/+1
Signed-off-by: alt3r 3go <alt3r.3go@protonmail.com>
2019-11-12Fix off by one overflow with 31 args (#541)Hanno Böck1-1/+1
2019-06-06Some cleanup related to "Invalid characters..." on mount issue. (#453)Alexander Karzhenkov1-23/+3
* Revert previous commit * Fix "Invalid characters..." issue by not using "foreach" macro The "foreach" macro creates a copy of the container. This copy is destroyed immediately after the iteration is completed. C-strings pointers passed to the local array were invalidated with destroying of "std::string"s contained in the copy.
2018-04-04FreeBSD/MacOSX: fix for missing <sys/sysmacros.h> headerMounir IDRASSI1-0/+2
2018-04-04Platform/Unix: include <sys/sysmacros.h> for major/minor macros (#303)Gokturk Yuksek1-0/+1
Starting with glibc 2.26, macros "major" and "minor" are only available from <sys/sysmacros.h> [0]. The build fails with the following without including this header: Unix/FilesystemPath.cpp:84:49: error: ‘major’ was not declared in this scope Unix/FilesystemPath.cpp:84:113: error: ‘minor’ was not declared in this scope [0] https://sourceware.org/ml/libc-alpha/2017-02/msg00079.html
2017-12-09Linux: fix compilation error with older versions of gcc (e.g. 4.x)Mounir IDRASSI1-3/+3
2017-11-28Linux: autodetect host drive name using sysfs (closes #233)gv54701-0/+23
2017-06-23Update IDRIX copyright yearMounir IDRASSI62-62/+62
2016-10-17Use properly aligned memory in code using Streebog hash implementation that ↵Mounir IDRASSI4-20/+61
uses SSE.
2016-05-10Remove trailing whitespaceDavid Foerster62-114/+114
2016-05-10Normalize all line terminatorsDavid Foerster45-3580/+3580
2016-03-18Linux: Completely fix gcc-5 "Invalid characters encountered" issue on mount. ↵Mounir IDRASSI1-2/+22
It was caused by an issue of gcc-5 STL implementation that is causing char* pointers retrieved from std::string using c_str method to become invalid in the child of a child process (after two fork calls). The workaround is to first copy the std:string values in the child before calling the second fork.
2016-01-20Copyright: update dates to include 2016.Mounir IDRASSI62-62/+62
2015-11-30Linux/MacOSX: Implement Unicode passwords suppport. Make validation of ↵Mounir IDRASSI1-2/+6
parameters in GUI more robust.
2015-08-06Update license information to reflect the use of a dual license Apache 2.0 ↵Mounir IDRASSI62-344/+592
and TrueCrypt 3.0.
2015-06-24Linux/MacOSX: first dynamic mode implementationMounir IDRASSI2-2/+54
2014-12-30Linux/MacOSX: Implement TrueCrypt conversion and loading support. Correct ↵Mounir IDRASSI1-1/+3
many GTK issues linked to multi-threaded origine of events by implementing an automatic mechanism for handling such requests in the main thread.
2014-11-08Change namespace from TrueCrypt to VeraCrypt. Rename method from Resources ↵Mounir IDRASSI57-59/+59
Resources::GetTrueCryptIcon to Resources::GetVeraCryptIcon.
2014-11-08Replace TrueCrypt from Linux/MacOSX mount point namesMounir IDRASSI1-1/+1
2014-11-08Replace TrueCrypt references in added sources and resources by VeraCrypt ones.Mounir IDRASSI2-3/+3
2014-11-08Add TrueCrypt 7.1a MacOSX/Linux specific source files.Mounir IDRASSI17-0/+1322
2014-11-08Add original TrueCrypt 7.1a sourcesMounir IDRASSI45-0/+3790