Skip to content

key memory is not locked and the volume service can be core dumped #1958

Open

Description

@curious-rabbit

Expected behavior

Memory that holds the master key is locked (mlock) and excluded from core dumps (MADV_DONTDUMP or prctl(PR_SET_DUMPABLE, 0)). Key material never reaches swap or a core file.

Observed behavior

SecureBuffer (src/Platform/Buffer.cpp:111-133) only wipes memory on free. The FUSE service process that holds the master key shows "VmLck: 0 kB" and PR_GET_DUMPABLE returns 1. A kernel core file of this process contained the first master key half 3 times and the second half 4 times.

Steps to reproduce

  1. Mount a file container: veracrypt -t --non-interactive -p PW --pim=0 -k '' test.hc /mnt/t
  2. Find the FUSE service process (the veracrypt process with /dev/fuse open). grep VmLck /proc/<pid>/status prints "VmLck: 0 kB".
  3. prlimit --pid <pid> --core=unlimited then kill -SEGV <pid>
  4. Search the core file for the master key (decrypted from the volume header). Both key halves are found.

Screenshots

None

Your Environment

VeraCrypt version: 1.26.30 (console build from tag VeraCrypt_1.26.30)
Operating system and version: Ubuntu 24.04.5 LTS, kernel 6.18
System type: 64-bit (x86_64)

Activity

  1. added 2 commits that reference this issue on Oct 27, 2026
    7872271
    355c25f
  2. added 4 commits that reference this issue on Oct 28, 2026
    5ab678d
    002cc09
    3154d7b
    49f4b39
  3. added 2 commits that reference this issue on Nov 10, 2026
    4b4bf5f
    40679ea
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