Commit Graph

2051 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
thurask
a93e5d4214 Update FUSE package version for Debian and Ubuntu (#1736)
libfuse3-3 dropped in Debian 13/Ubuntu 25.10, replaced with libfuse3-4
2026-05-19 07:10:59 +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
80bce77cb9 Fix CMake 4 compatibility for Linux packaging
Keep the executable requirement at CMake 2.8.12 for legacy CentOS 6 package builders while using the version-range syntax to declare policy compatibility up to 3.10. Newer CMake versions use the policy maximum to avoid CMake 4 failures, and older CMake versions ignore the suffix and continue to configure as before.
2026-05-17 13:43:00 +09:00
Mounir IDRASSI
70922afe9b Remove bank transfer donation option 2026-05-16 21:52:58 +09:00
Mounir IDRASSI
46131086e1 Linux/FUSE: honor inodes and map unknown errors to EIO
Enable use_ino for Linux FUSE mounts so stable inode numbers returned by getattr and readdir are reported to userspace. For FUSE3, set fuse_config.use_ino from init; for FUSE2, pass -o use_ino because there is no fuse_config init hook.

Also map otherwise unhandled FUSE exceptions to EIO instead of EINTR, since these failures are not signal interruptions and should not encourage retry loops.
2026-05-16 17:38:56 +09:00
Mounir IDRASSI
cd101433c5 macOS: recover mounted volume mount points
Prefer hdiutil plist entities that carry a mount-point when recording the virtual device. This fixes APFS images where the first dev-entry is not the mounted volume.

Add a macOS mounted-volume refresh hook that recovers VirtualDevice and MountPoint from hdiutil info when FUSE-T SMB auxiliary metadata is missing or stale.
2026-05-15 15:35:28 +02: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
46744db44f macOS: allow overriding deployment target
Add a -t option to build_veracrypt_macosx.sh so VC_OSX_TARGET can be set explicitly while preserving the existing defaults for source and Homebrew builds.

Fixes #1726.
2026-05-12 15:05:28 +02:00
Mounir IDRASSI
a8a10b80eb macOS: Link against wxWidgets 3.2.10 2026-05-12 20:25:07 +09:00
Mounir IDRASSI
c2ba9b5333 Translations: add macOS device validation strings
Move the new English entries to the end of Language.xml and add English fallback entries to all tracked translation XML files.
2026-05-11 23:59:09 +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
e6247fbf2a Windows: avoid duplicate tray notifications
Remove the duplicate Shell_NotifyIconW(NIM_MODIFY) call from the tray balloon helper. On Windows 11, the shell can queue the repeated NIF_INFO request and show the same unmount notification twice.

Fixes #1630
2026-05-11 11:28:56 +09:00
Mounir IDRASSI
404d72de2e Windows: Update LZMA SDK to version 26.01 2026-05-11 11:11:41 +09:00
Diogo Santos
504c94f12c Fix Off-By-One Stack Buffer Overflows in XML Parser (#1717)
* Off-By-One Null Byte Fix

* Add XML parser tests and improve XmlGetAttributeText handling

* Refactor XML testing: integrate XmlTest into AutoTestAlgorithms, add sentinel test for XmlGetNodeText insuficient output size.

* Remove no-op Tests.c change

---------

Co-authored-by: Mounir IDRASSI <mounir.idrassi@amcrypto.jp>
2026-05-10 10:41:10 +09:00
Mounir IDRASSI
f6dcfa2b64 Harden TLV parser bounds checks
Reject empty or truncated TLV buffers, unsupported indefinite lengths, and declared value lengths that exceed the remaining input or uint16 node storage. Parse BER long-form lengths in big-endian order before copying value bytes.
2026-05-09 22:54:47 +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
Marius Kjærstad
338fedc56c Fix whitespace issues in translation files (#1707) 2026-05-02 10:32:52 +09:00
Mounir IDRASSI
b6744b8ed5 Increment version to 1.26.28 2026-04-30 13:39:51 +09:00
Mounir IDRASSI
b88b9bf76d Language files: regroup newly added entries at the bottom for easy tracking 2026-04-29 16:37:32 +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
a9b1d5ce57 Windows: Harden Windows driver input validation
Validate SecRegion password cache offsets before use.
Wipe decrypted SecRegion password-cache data even when cache validation fails.
Clamp encrypted I/O work item counts and check allocation sizing.
Reject invalid boot drive sector writes and initialize decoy wipe data unit.
Validate hidden-system boot offsets and remap arithmetic before use.
2026-04-26 18:42:26 +09:00
Mounir IDRASSI
d841ac63e4 Windows: allow EFI repair to finalize stuck decryption 2026-04-26 18:36:54 +09:00
Mounir IDRASSI
e0555e14f0 Windows: detect VeraCrypt loader before Windows loader 2026-04-26 18:36:26 +09:00
Mounir IDRASSI
df4e755112 Windows: verify EFI loader restoration
Verify restored EFI Microsoft and fallback boot loader paths after system decryption.

Show clearer recovery guidance when EFI file restoration or NVRAM cleanup remains incomplete.

Add a GPT-only EFI boot loader repair menu action for already decrypted systems.
2026-04-26 16:47:04 +09:00
curious-rabbit
e7188c96a4 Fix undefined behavior in StartElevated stderr read loop (#1550) (#1687)
The read loop that captures stderr from the sudo child process used
`vector<char> buffer(4096); buffer.clear();` followed by
`read(fd, &buffer[0], buffer.capacity())`. This has two instances of
undefined behavior:

1. `operator[](0)` on a vector with `size() == 0` violates the C++
   standard precondition `n < size()`. libstdc++ built with
   `-D_GLIBCXX_ASSERTIONS` aborts the process with:

     stl_vector.h:1128: Assertion '__n < this->size()' failed.

2. `buffer.begin() + bytesRead` on the same empty vector constructs
   an iterator past `end()`, also UB.

`-D_GLIBCXX_ASSERTIONS` is in the default build flags of Arch Linux,
Fedora, and several other distributions. On those systems, the
unprivileged helper process aborts as soon as sudo writes anything
to stderr (a password prompt, a 'user is not in the sudoers file'
error, etc.). The main process then sees EOF on the service output
pipe, and throws `InsufficientData`, which renders to the user as
'Not enough data available'. A second mount attempt fails at
`File::Write` because the helper is dead and the pipe is broken,
producing the bare message 'VeraCrypt::File::Write:395'.

Fix by replacing `buffer` with a plain `char[4096]` and using
`reserve(4096)` on `errOutput` to preserve the original
pre-allocation intent. No behavioral change on systems where the UB
happened to work; aborts are eliminated on systems where the
assertions fire.

Reported-by: multiple users, see veracrypt/VeraCrypt#1550,
              veracrypt/VeraCrypt#1446, veracrypt/VeraCrypt#844

Co-authored-by: rabbit <rabbit@github>
2026-04-23 21:03:20 +09:00
Mounir IDRASSI
357ce6bd7a macOS: harden FUSE-T SMB metadata handling
Increase advertised metadata file size, broaden hdiutil path normalization, and make auxiliary device info updates atomic.
2026-04-22 23:20:25 +09:00
Mounir IDRASSI
deb7f55bfb macOS: stabilize FUSE-T SMB mount metadata
Make /aux-device-info readable for SMB, verify that FUSE records hdiutil device info after mount and recover missing virtual devices from hdiutil before dismounting auxiliary mounts.
2026-04-22 16:32:10 +09:00
Mounir IDRASSI
4271b8e6f5 macOS: stabilize FUSE-T SMB auxiliary mounts
Add statfs metadata for the auxiliary FUSE mount, keep /control read-only by sending hdiutil device data through /aux-device-info and tolerate delayed SMB rediscovery during mount completion. Log final control-file retry failures for diagnostics.
2026-04-22 14:37:57 +09:00
Mounir IDRASSI
7cd062c42e Windows: honor EFI boot menu options in PostOOBE repair
Use the same SystemFavorites service flag mapping for /PostOOBE bootloader repair as the non-forced service update path. This prevents Windows upgrade repair from adding VeraCrypt to BootOrder or forcing it first when those actions are disabled, while forced updates keep their previous behavior and still repair the loader.
2026-04-21 12:16:33 +09:00
Mounir IDRASSI
49c68ea1ab Windows: handle Argon2 derivation failures 2026-04-20 19:49:45 +09:00
Mounir IDRASSI
e59eb421fb Linux/macOS: Implement missing Argon2 KDF support on Unix 2026-04-19 17:52:44 +09:00
Mounir IDRASSI
e07bd19f20 Windows: Validate PIM on KDF-only password changes 2026-04-19 17:51:02 +09:00
Mounir IDRASSI
e6adb96b15 Windows: fix favorite volume mount race
Copy selected favorite volumes into mount thread parameters so background mounting does not depend on mutable global vector storage. Also avoid unnecessary FavoriteVolume copies in auto-mount paths and fix mount-on-arrival state updates.

Refs #1661
2026-04-18 15:34:38 +09:00
Mounir IDRASSI
da2198831f Windows bootloader: Add EFI DCS guard for Argon2 support
We don't support yet Argon2 for EFI booloader build
2026-04-17 16:03:42 +09:00
audriusbuika
4fea6403ce Windows: Fix elevated COM format drive validation and device path normalization (#1670)
* Windows: Add input validation whitelists to elevated COM methods

* Windows: Add drive number validation to FormatNtfs and FormatFs COM methods

* Windows: Fix correctness regressions in elevated COM format and device path validation

* Windows: Revert unready COM input validation; keep FormatNtfs/FormatFs return fix
2026-04-16 10:31:02 +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
5055382f08 macOS: fix macOS local arm64 build affecting Volume archive
Local macOS builds disable universal binaries. On Apple Silicon, that means
the regular objects are built for arm64 only, but Volume.make still selected
the macOS assembly bundle. Several of those assembly outputs are x86_64 only,
which makes ranlib reject Volume.a because it contains mixed cputypes.

Make local arm64 macOS builds use the existing arm64 crypto object path and
have the macOS build wrapper export CPU_ARCH/COMPILE_ASM consistently for
local builds.
2026-04-15 10:53:32 +09:00
Mounir IDRASSI
07f0b5fcaf Build: handle removed wxWidgets configure options
wxWidgets 3.3 removed the configure switches for explicitly enabling
Unicode and std_string support. Passing these options now makes configure
fail with "unrecognized options" when option checking is enabled.

Keep the legacy switches for older wxWidgets releases, but only add them
from the wxbuild recipe when the target configure script still supports the
corresponding Autoconf option variables.
2026-04-15 09:34:20 +09:00
audriusbuika
f63c617431 Fix hibernation crash on fresh Windows 11 25H2 (BSOD Event 41) (#1671)
* Fix hibernation crash on fresh Windows 11 25H2 (BSOD Event 41)

* follow up on the hibernation fix review: fix MDL check order and drop the risky sleep.
2026-04-15 09:22:46 +09:00
Mounir IDRASSI
5b4fae60a8 Linux: honor nokernelcrypto during external formatting 2026-04-14 23:37:41 +09:00
Mounir IDRASSI
868dab4fca Windows: fix ARM64 MSI build 2026-04-14 20:22:59 +09:00
Mounir IDRASSI
976bb3767b Windows: Fix MSI traveler disk creation with WHQL-signed drivers
Make MSI-installed VeraCrypt use the IDRIX-signed COMReg package as the
source for traveler files, matching the EXE installer flow. COMReg now
packages the x64 traveler payload, so traveler creation no longer has to
copy the installed x64 driver from appDir\veracrypt.sys and verify it
against a Microsoft WHQL certificate fingerprint.

Keep Microsoft WHQL certificate verification only for the loose portable
driver fallback, where driver files cannot be signed with the IDRIX code
signing certificate. The normal VerifyModuleSignature path now remains
IDRIX-only.

Also validate that an MSI COMReg package actually contains the required
x64 traveler files before reporting success, avoiding partial traveler
directories when the package payload is incomplete.
2026-04-14 18:43:07 +09:00
Mounir IDRASSI
250a488a84 macOS: Use SMB backend for FUSE-T auxiliary mounts 2026-04-14 14:42:36 +09:00