Commit Graph

337 Commits

Author SHA1 Message Date
Mounir IDRASSI
964ecde6a1 Linux: add Arch package build support (#1740) 2026-05-20 09:38:38 +09:00
Mounir IDRASSI
dec2bd882f Linux/macOS: suppress wxWidgets sizer consistency checks 2026-05-19 07:52:14 +09:00
Mounir IDRASSI
6bef9e009c Linux: refine in-kernel NTFS driver selection
Keep the NTFS kernel-driver option as a generic in-kernel NTFS path rather than an ntfs3-specific path. Add --filesystem=kernel-ntfs and -m kernelntfs routes that select a registered or loadable kernel NTFS driver and mount with -i so mount.ntfs/ntfs-3g helpers are not invoked.

Preserve --filesystem=ntfs3 as a literal pin to the ntfs3 driver. Treat both ntfs3 and kernel-ntfs as mount-only selectors; volume creation continues to use filesystem type NTFS.

The preference and -m kernelntfs path only select an in-kernel NTFS driver when no explicit filesystem type was supplied and blkid detects NTFS.

Treat ntfs as the preferred in-kernel driver on Linux 7.1 and later, where the upstream read/write driver is expected. On earlier kernels, select ntfs only when module metadata identifies the standalone read/write driver and /sys/module confirms it loaded, avoiding ntfs3 read-only ntfs compatibility registrations. Fall back to ntfs3 otherwise, and report a generic kernel-driver error if neither supported driver is available or loadable.

Rename the internal preference/config field to MountNtfsWithKernelDriver, migrate the old MountNtfsWithNtfs3 preference key, and update UI strings, CLI help, documentation, release notes, and translation placeholders accordingly.

Reference: https://github.com/veracrypt/VeraCrypt/issues/1735
2026-05-18 22:19:23 +09:00
curious-rabbit
9535e65bd8 Ensure reproducible builds on Linux (#1731)
* ensure reproducible builds

* improve patch

* improve patch

* Narrow reproducibility scope to legacy and DEB

Keep the verified Linux legacy Makefile and DEB reproducibility paths, but remove the unverified RPM/openSUSE timestamp changes and AppImage reproducibility behavior from this PR.

The CPack mtime/mode clamp is now installed only for Debian/Ubuntu packaging, matching the scope covered by the provided reproducibility logs.

Retain umask 022 in the RPM/openSUSE wrappers so staged package permissions do not depend on a restrictive caller umask.

* Harden reproducible build cleanup

Validate SOURCE_DATE_EPOCH before interpolating it into Make, CMake or shell packaging paths.

Refuse live DESTDIR values in the CPack mtime clamp and pass makeself options through normal argv construction instead of eval.

---------

Co-authored-by: curious-rabbit <curious-rabbit@local>
Co-authored-by: Mounir IDRASSI <mounir.idrassi@amcrypto.jp>
2026-05-18 20:54:13 +09:00
Mounir IDRASSI
8b1c668b77 Linux: Fix PreferencesDialog build with GCC 4.4
Replace the Linux ntfs3 help icon paint lambda with a small wxWindow
subclass and regular paint event handler.

GCC 4.4, used on CentOS 6, builds with -std=c++0x but does not support
the lambda syntax used in PreferencesDialog.cpp, causing compilation to
fail at the ntfs3 help icon handler.

The drawing behavior is unchanged.
2026-05-17 13:52:45 +09:00
Mounir IDRASSI
70922afe9b Remove bank transfer donation option 2026-05-16 21:52:58 +09:00
Mounir IDRASSI
77e4830c99 macOS: run APFS formatter elevated
APFS volume creation can still fail with Permission denied after preparing the raw and block device aliases because newfs_apfs performs privileged APFS container and volume operations beyond opening the device nodes.

Route APFS formatting through the elevated CoreService path for non-root macOS runs. Keep the elevated interface narrow by sending only the target device and invoking user UID/GID, validate the device path on the privileged side, rebuild the formatter arguments there, and execute /sbin/newfs_apfs by absolute path to avoid PATH shadowing.

Pass -U/-G so the created filesystem preserves the invoking user ownership. Apply the same path to GUI and text-mode creation.
2026-05-15 13:52:21 +09:00
Mounir IDRASSI
960f5993b2 macOS: prepare APFS formatter device aliases
When creating an APFS filesystem inside a newly created device-hosted volume, VeraCrypt prepared only the raw hdiutil device path before invoking newfs_apfs. On macOS, newfs_apfs may resolve or reopen the corresponding block device path, which can fail with Permission denied for non-root GUI runs.

Prepare both raw and block aliases for the temporary formatter device, restore changed owners afterward, and share the helper between GUI and text-mode volume creation. Restore each changed alias independently so one restore failure does not skip the rest.
2026-05-13 14:39:06 +09:00
Mounir IDRASSI
49c8fd3680 macOS: validate format wizard device targets
Keep device selection enumeration unchanged to avoid slow dialog loads.

In the format wizard, inspect only the selected target with diskutil info -plist and reject APFS synthesized devices, macOS system/support targets, read-only targets, and current APFS system stores. Add a read-only APFS hint for creation failures.
2026-05-11 23:47:20 +09:00
Mounir IDRASSI
f8837090b8 Linux/macOS: show volume creation finalization stages
Report explicit progress stages while writing volume data, writing backup headers, and flushing data to disk so the wizard does not appear stuck at 100%.

Keep the wizard in progress during Unix post-creation formatting and show status for temporary mount/device setup, mkfs invocation, and dismount.
2026-05-03 11:26:20 +09:00
Mounir IDRASSI
abd089140b Linux: add emergency cleanup for stale unmounts
When normal filesystem unmount fails, the Linux path could stop before cleaning VeraCrypt mapper, loop and FUSE objects. Add an explicit emergency dismount request that is only reached after interactive confirmation.

The recovery path lazy-detaches mounted filesystems, uses deferred dmsetup removal for VeraCrypt mapper devices, detaches loop devices, and keeps normal force/ignoreOpenFiles behavior unchanged.
2026-05-02 23:03:29 +09:00
Mammoth
771acf5951 Linux: allow mounting NTFS volumes with ntfs3 (#1695)
* Linux: allow mounting volumes with ntfs3

* Linux: add ntfs3 preference for NTFS mounts

* Linux: wrap ntfs3 preference help text

* Add Linux ntfs3 mount preference

* Remove Russian translation changes from ntfs3 PR

* XML Translations: Add English fallback entries for ntfs3 preference

---------

Co-authored-by: Mounir IDRASSI <mounir.idrassi@amcrypto.jp>
2026-04-29 10:11:22 +09:00
Mounir IDRASSI
e59eb421fb Linux/macOS: Implement missing Argon2 KDF support on Unix 2026-04-19 17:52:44 +09:00
Mounir IDRASSI
3e9c47d256 Linux/macOS: collect mouse entropy from nested controls
wxWidgets does not propagate mouse motion events from child controls to parent windows. The Linux/macOS GUI was binding the random-pool mouse handlers only to the dialog/page and its direct children, which left nested controls such as static-box contents and the wizard image as dead zones.

Add a reusable recursive child-window event binder and use it in the keyfile generator, random pool enrichment dialog, and volume creation wizard. The root windows keep their existing generated bindings, while descendants are bound explicitly, avoiding duplicate handling on the root while covering all nested controls.

This makes the entropy gauge and the random pool update consistently no matter where the pointer moves inside the affected windows.

Fixes #1656.
2026-04-15 16:38:08 +09:00
Mounir IDRASSI
631d0cc420 Build: fix macOS text self-test with wxWidgets 3.3.2 2026-04-15 14:58:43 +09:00
Mounir IDRASSI
5b4fae60a8 Linux: honor nokernelcrypto during external formatting 2026-04-14 23:37:41 +09:00
Ragdoll
2ed98b50d3 Fix erroneous 2 TiB limit for hidden file containers in GUI wizard (#1672) 2026-04-13 16:55:37 +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
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
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
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
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
44a9f8bcff Remove SM4 support! 2025-05-18 18:31:39 +09:00
Mounir IDRASSI
e1c7f2f043 Silence compiler warning in HasTranslatedDocumentation function 2025-05-15 10:29:59 +09:00
Mounir IDRASSI
a6f734ae2b Linux: cleanup old build artifacts before performing new build 2025-05-15 10:29:09 +09:00
Mounir IDRASSI
009d189768 Linux/macOS: Fix build error cause by missing conversion 2025-05-12 17:30:38 +09:00
Mounir IDRASSI
5ae263e6e6 Linux: Update local documentation logic to the new organization of folders under "docs/html" 2025-05-12 16:23:49 +09:00
Mounir IDRASSI
b673901503 Move copyright and links to "AM Crypo", amcrypto.jp and veracrypt.jp 2025-05-11 16:02:20 +09:00
Mounir IDRASSI
4944477b5a Linux: implement automatic creation of AppImage bundle during build of generic binaries 2025-05-10 23:32:55 +09:00
Mounir IDRASSI
3edae48717 Linux: Correct handling of documentation in case of AppImage. Code refactoring. 2025-05-10 19:09:31 +09:00
Mounir IDRASSI
7924f06e39 Initial support of SM4 cipher for normal volumes 2025-05-04 02:27:05 +09:00
Jertzukka
004fdc2a45 Linux/FreeBSD: Improvements on installation scripts (#1514)
This patch moves away from gnome-terminal -e options which is deprecated
and subject to possibly be removed in the future. The -- option is nearly
equivalent in behaviour. Also ensures that uninstallation script has correct
privileges, adds window title to xmessage and ensures correct files are
used during installation.
2025-03-24 13:16:08 +01:00
Mounir IDRASSI
56301ea64b Linux/macOS: Fix failure to use Hungarian language cause by issue in XML parser.
The method GetNodes implementation didn't parse multiple attributes correctly and it failed with Hungarian XML because of the presence of '>' character in an attribute value.

Issue reported in https://github.com/veracrypt/VeraCrypt/pull/1516
2025-03-24 07:55:03 +01:00
Mounir IDRASSI
c69ba240c4 Complete replacement of Dismount references by Unmount in various files 2025-02-02 23:37:36 +01:00
Helmut K. C. Tessarek
498dff9013 refactor: use the term unmount instead of dismount (#1478)
* refactor: use UNMOUNT instead of DISMOUNT in code

This change updates the term DISMOUNT in constants to UNMOUNT.
Other occurrences (e.g. variable names) are left alone for now.

* refactor(ui): use unmount instead of dismount

This change updates the GUI text and replaces dismount with unmount.

* docs: update term dismount -> unmount

* refactor(cmdline): add unmount

This change adds an argument 'unmount' for command line usage, while
trying to deprecate the old disnount argument.
The current dismount argument/flag will still work to not introduce
a breaking change.

* docs: mention that /dismount is deprecated

This change fixes the shorthand version of the argument /unmount
It also adds back the info for /dismount and that it is deprecated.
2025-01-31 23:18:26 +01:00
Mounir IDRASSI
eeebbf74f9 macOS: fix wxWidgets 3.2.6 assert for undefined switch use-dummy-sudo-password (GH #1470) 2025-01-23 17:18:57 +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
078d1410dd Linux/FreeBSD: Prevent mounting volumes on system directories and PATH (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
2025-01-14 14:59:45 +01:00
Mounir IDRASSI
2cca2e1daf Linux/FreeBSD: Add absolute paths for system binaries to prevent path 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
2025-01-14 14:59:40 +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
ca331b8b34 Linux/macOS: Simplify sudo session detection logic and extend it to macOS
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-25 11:29:32 +01:00
Mounir IDRASSI
341411e935 Linux: Fix "Password too long" error message not expanded to include max length (#1456) 2024-12-24 09:24:23 +01:00
Mounir IDRASSI
b6e698b376 Linux/macOS: check if volume doesn't exist before starting the mount operation. 2024-12-23 23:10:37 +01:00
Mounir IDRASSI
92ad97ef33 Linux: Improve directory opening logic by prioritizing xdg-open and adding fallback mechanisms (#1420)
- Use xdg-open as the primary method for opening directories, ensuring compatibility with most Linux environments.
- Implemented fallback logic to try other known file managers (e.g., nautilus, dolphin, caja, thunar) if xdg-open is unavailable or fails.

Based on proposal by @bugtracker2019
2024-09-24 03:55:33 +02:00
Mounir IDRASSI
aaf42a84a7 Linux: fix assert by wxWidgets library included in Ubuntu. 2024-09-18 15:08:31 +02:00
Mounir IDRASSI
5c485e80b6 macOS: restrict --allow-screencapture switch to macOS only since screen protection doesn't work on Linux
In the code we also enable it for TC_WINDOWS but actually we don't use wxWidgets for Windows build.
2024-09-17 00:12:28 +02:00
Deniz Türkoglu
e0a46f6b2b Add Option to Enable/Disable Screen Capture (#1418)
Veracrypt currently appears in screenshots and screen captures,
which can unintentionally expose sensitive information, such as
the fact that Veracrypt is running or the location of your volumes.

Both Windows and macOS offer mechanisms to exclude specific windows
from being captured. While not foolproof, this is a useful preventative
measure. The method is a no-op for Linux/FreeBSD.

For more details on the wxWidgets API, see:
https://docs.wxwidgets.org/3.2/classwx_top_level_window.html#a337b9cec62b0cbd3b1b1545a83270f64
2024-09-17 00:05:21 +02:00
Mounir IDRASSI
d6f0250901 Linux/MacOSX: Only load valid XML language files (Language.langid.xml format with langid one of the predefined language identifiers) 2024-08-25 09:36:38 +02:00
Mounir IDRASSI
25c88fe3d3 Revert "Add Hausa translation (#1404)" (#1407)
This reverts commit ce9537f2b8.
2024-08-22 06:53:26 +02:00
Marius Kjærstad
ce9537f2b8 Add Hausa translation (#1404) 2024-08-21 20:20:46 +02:00