Skip to content

Two volumes mounted at the same time can fail or end up at the wrong mount point #1960

Open

Description

@curious-rabbit

Expected behavior

Two volumes mounted at the same time both mount correctly, each at its own mount point.

Observed behavior

The auxiliary mount point /tmp/.veracrypt_aux_mntN is chosen from one read of /proc/mounts, then deleted and created again without exclusive creation (src/Core/Unix/CoreUnix.cpp:1273-1309). Two parallel mounts use the same directory. 7 of 40 parallel runs failed ("Permission denied: /tmp/.veracrypt_aux_mnt2/aux-device-info", "ParameterIncorrect at VeraCrypt::CoreUnix::MountVolume:1463"). In one run the filesystem of volume A was mounted at the mount point of volume B. With two users mounting at the same time one user saw the other user's decrypted files. Any local user can block all mounts by creating /tmp/.veracrypt_aux_mnt1 to 256.

Steps to reproduce

  1. Create a.hc and b.hc with a different marker file in each.
  2. veracrypt -t --non-interactive --slot=1 -p PW --pim=0 -k '' a.hc /mnt/a & veracrypt -t --non-interactive --slot=2 -p PW --pim=0 -k '' b.hc /mnt/b & wait
  3. Check the exit codes and the content of /mnt/a and /mnt/b.
  4. Dismount and repeat. Failures appear within a few runs. Sometimes the marker of a.hc appears in /mnt/b.

Screenshots

None

Your Environment

VeraCrypt version: 1.26.30
Operating system and version: Ubuntu 24.04.5 LTS, kernel 6.18
System type: 64-bit (x86_64)

Activity

  1. added 12 commits that reference this issue on Oct 27, 2026
    c0e925d
    355c25f
    ceecf75
    f9fec71
    4d13a3a
    10ca32d
    f6c3117
    f5ae67a
    19fac98
    9a26598
    918b664
    5ed3f04
  2. added 2 commits that reference this issue on Nov 10, 2026
    4b5ae5d
    e6134b7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions