veracrypt / VeraCrypt

Disk encryption with strong security based on TrueCrypt
https://www.veracrypt.fr
Other
6.71k stars 936 forks source link

After mounting a Volume the Mount Directory property is empty #1353

Open aism opened 3 months ago

aism commented 3 months ago

Expected behavior

The Mount Directory in the Volume properties in UI and CLI should contain the directory, where the volume is mounted.

Observed behavior

The Mount Directory is empty in the Volume properties - neither in UI nor in CLI.

Steps to reproduce

  1. Select a slot and Mount a Volume to it with the Mount directory in user folder. It doesn't matter if I mount in UI or in CLI as /Applications/VeraCrypt.app/contents/MacOS/VeraCrypt -k "" --pim=0 --protect-hidden=no $XDG_CONFIG_HOME/volume_name.hc $HOME/test or the same in text mode. The mount directory is located in $HOME, and contains only ASCII chars, e.g., /Users/johndoe/test. Placing the volume also into $HOME doesn't affect the result.
  2. Observe the corresponding field Mount Directory column in UI - it's empty (see screenshots)
  3. Right-click -> Properties on the slot with the mounted volume - there's no Mount Directory property shown at all (see screenshots)
  4. Query the properties in text mode using CLI - the Mount Directory field is shown, but empty:
    $ /Applications/VeraCrypt.app/contents/MacOS/VeraCrypt --text --volume-properties /Users/username/.config/volume_name.hc
    Slot: 1
    Volume: /Users/username/.config/volume_name.hc
    Virtual Device: /dev/disk2
    Mount Directory:
    Size: 5.0 GiB
    Type: Normal
    Read-Only: No
    Hidden Volume Protected: No
    Encryption Algorithm: AES-Twofish
    Primary Key Size: 512 bits
    Secondary Key Size (XTS Mode): 512 bits
    Block Size: 128 bits
    Mode of Operation: XTS
    PKCS-5 PRF: HMAC-SHA-512
    Volume Format Version: 2
    Embedded Backup Header: Yes
    Data Read since Mount: 4.3 MiB
    Data Written since Mount: 216 KiB
  5. Same goes in UI mode (see screenshots)

Screenshots

veracrypt_volume_props_UI veracrypt_volume_props_UI_general veracrypt_volume_props_CLI_nontext

Your Environment

Please tell us more about your environment

VeraCrypt version: 1.26.7

Operating system and version: macOS Sonoma 14.4.1 (23E224)

System type: 64-bit, Intel-based Macbook Pro 2019

Background and Impact

I want to use this field in some scripting that at some point checks that the volume is indeed mounted to the proper directory, before launching the app that's gonna use it as a workdir. This bug doesn't allow to do that (I can check that the volume is mounted and I can check that the directory is a mount point, but I don't see an easy way to check that the volume is mounted to the particular mount point w/o parsing a lot of diskutil outputs.

Jertzukka commented 3 months ago

Can't reproduce on master in Monterey 12.7.1. Might be something specific to the new OS version, but I couldn't get Sonoma VM to work last time I tried. The volume data comes through the FUSE control file, and there has been a lot of reported problems with Sonoma and FUSE, as they seem to have introduced System Integrity Protection (SIP) and other limitations to kernel extensions. Not sure if related.

aism commented 3 months ago

Can't reproduce on master in Monterey 12.7.1. Might be something specific to the new OS version, but I couldn't get Sonoma VM to work last time I tried. The volume data comes through the FUSE control file, and there has been a lot of reported problems with Sonoma and FUSE, as they seem to have introduced System Integrity Protection (SIP) and other limitations to kernel extensions. Not sure if related.

I know it's a long shot but if you'll venture to provide me some instructions on what info I need to pull and from where, I can try to do that.