Skip to content

Unix: wipe the hidden volume protection password after opening the volume - #1964

Open
flatstik wants to merge 2 commits into
veracrypt:masterfrom
flatstik:fix-1961-protection-password
Open

flatstik wants to merge 2 commits into
veracrypt:masterfrom
flatstik:fix-1961-protection-password

Conversation

@flatstik

@flatstik flatstik commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1961.

MountVolume released the outer volume password once the volume was open, but kept the protection password referenced by the mount request, and the forked FUSE service inherited it. It is now released at the same points as the outer volume password.

Tested:

  • OpenWrt 25.12.6 mipsel (FUSE3, root), memory of the FUSE service after mounting with hidden volume protection: 1.26.30 has the hidden volume password in anonymous heap memory and in the command line ([stack]), with this change only in the command line, where the test passes it.
  • Tests/test_linux_protection_password_memory.py (new, run in the Linux workflow): passes on ubuntu-24.04 and ubuntu-26.04, https://github.com/flatstik/VeraCrypt/actions/runs/40497973687.
  • Not tested: the non-root user with the sudo core service of the report.

The new test adds lines next to test_mount_helper.py in .github/workflows/build-linux.yml, as do the other PRs split from #1963, so whichever is merged later conflicts there; I will rebase it.

Split from #1963, with #1968 (#1958), #1967 (#1959), #1966 (#1960), #1965 (#1962).

…lume

MountVolume released the outer volume password once the volume was
open, but kept the protection password referenced by the mount request.
The forked FUSE service inherited it, so the hidden volume password
stayed in plaintext in both service processes until dismount.

Release it at the same points as the outer volume password.

Fixes veracrypt#1961
Tests/test_linux_protection_password_memory.py checks the hidden
volume protection password in the FUSE service memory against the
installed package in the Linux workflow.
@flatstik
flatstik force-pushed the fix-1961-protection-password branch from bff5df3 to d33487c Compare October 29, 2026 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hidden volume protection password stays in memory while the outer volume is mounted

1 participant