VeraCrypt
VeraCrypt copied to clipboard
Hidden volume file container size limited to 2TB using GUI wizard
Summary
In the GUI wizard
-
SectorSizeis set toTC_SECTOR_SIZE_FILE_HOSTED_VOLUME(VolumeCreationWizard.cpp:701) - There is a check for
VolumeSize > TC_MAX_FAT_SECTOR_COUNT * SectorSize(VolumeCreationWizard.cpp:976) -
TC_SECTOR_SIZE_FILE_HOSTED_VOLUME = 512 -
TC_MAX_FAT_SECTOR_COUNT = 0x100000000ULL - This result in a cap of 2TiB when creating an outer container since
TC_SECTOR_SIZE_FILE_HOSTED_VOLUME * TC_MAX_FAT_SECTOR_COUNT = 2TiB
Recommendation
Change VolumeCreationWizard.cpp:976 to read: if (SelectedVolumePath.IsDevice() && OuterVolume && VolumeSize > TC_MAX_FAT_SECTOR_COUNT * SectorSize) since the sector check is irrelevant when the container lives in a file
Also this restriction can by bypassed using the command line as noticed by: https://sourceforge.net/p/veracrypt/discussion/technical/thread/383b4bedb0/
VeraCrypt already supports multi TB hidden volumes (on raw disk), so this feature should also be supported in a file container.
If this is acceptable, I can create a PR, please let me know.
Steps to reproduce
- Open Veracrypt GUI
- Create Volume
- Create an encrypted file container -> Next
- Hidden VeraCrypt Volume -> Next
- Select a file on disk
- Encryption Settings -> Next
- Volume Size: 3TB
- Set a password
- Volume format: Any
- I will mount only on Linux
- Format
Your Environment
Please tell us more about your environment
VeraCrypt version: 1.26.24
Operating system and version: Linux
System type: 64 bit