Summary
VeraCrypt's elevated CoreService on Linux may allow a same-UID attacker with access to an active service session to change ownership of files outside the intended scope. If the attacker can reopen the service's request pipe through the process file descriptors, the issue could enable ownership changes to sensitive system files and lead to root compromise.
Affected context
The vulnerability occurs in VeraCrypt's elevated CoreService on Linux when it processes a SetFileOwnerRequest. The risk exists when the service passes the supplied path and owner UID to chown() without validating that the target is within an authorized scope. Exploitation also depends on access to an active elevated service session and its request pipe.
Exploit preconditions
- Attack surface: The elevated CoreService request pipe on Linux
- Required access: Same-UID access to an active elevated CoreService session
- Trigger point: Processing a
SetFileOwnerRequestinCoreUnix::SetFileOwner - Additional condition: The attacker can reopen the request pipe through
/proc/<pid>/fd/<n> - Why exploitation is possible: The requested path and owner UID are passed to
chown()without target validation
Why this happens
The service treats a caller-supplied filesystem path as authorized input and uses it in a privileged ownership-changing operation without verifying that the target is permitted. This is an improper control of a file name or path, corresponding to CWE-73. The security boundary fails because path selection is not adequately constrained before the elevated operation.
Potential impact
- An attacker may change ownership of arbitrary system files.
- Sensitive files, including account or authentication files, could be exposed to unauthorized modification.
- The attacker could gain root-level control of the affected system.
- System integrity and availability may be compromised.
General mitigation guidance
Defensive patterns include restricting ownership changes to an explicit set of authorized targets and validating both the requested path and owner against trusted policy before privileged operations. Avoid relying on caller-provided paths as proof of authorization; reduce input trust and use filesystem operations that safely constrain resolution to approved locations. The service should also minimize its privileges and limit which callers can access its request channel.
How teams detect issues like this
- Use static analysis to identify privileged calls such as
chown()that consume externally supplied paths or ownership values. - Review service request handlers for missing authorization checks, path-scope validation, and safe filesystem resolution.
- Monitor for unexpected ownership changes to sensitive files and for unusual access to process file descriptors under
/proc. - Enforce policies that restrict privileged services' filesystem write and ownership-change capabilities.

