--no-size-check ignored when creating sparse/Quick Format container larger than available disk space

Đang mở
#1,869 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
53/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
c, linux
Lĩnh vực
cli, security

Hướng nghiên cứu

Start by tracing the CLI volume-creation validation for --size and --no-size-check, then follow where available filesystem space is checked during Quick Format creation. Reproduce on Debian Linux with a filesystem whose free space is below the requested size, using the provided 52 GiB and 75 GiB commands. Done when the larger sparse container is accepted with --no-size-check while ordinary size validation still behaves as intended.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

Expected behavior

When creating a Quick Format file container with --no-size-check, VeraCrypt should allow the logical container size to exceed the currently available free space on the host filesystem.

Observed behavior

VeraCrypt 1.26.29 rejects the requested container size when it exceeds the currently available host filesystem space, even when --no-size-check is specified.

The host filesystem has approximately 53 GiB available:

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 143G 83G 53G 61% /

A 52 GiB Quick Format container is accepted, while a 75 GiB container is rejected with:

Error: Incorrect volume size

The behavior appears to track the amount of available disk space despite --no-size-check.

Steps to reproduce

  1. Use a filesystem with less free space than the desired logical VeraCrypt container size. In my case, / has approximately 53 GiB available:
    df -h
    /dev/sda1 143G 83G 53G 61% /
  2. Create a Quick Format container smaller than the available space:
    veracrypt --text --create vault.hc
    --size=52G
    --volume-type=normal
    --encryption=AES
    --hash=SHA-512
    --filesystem=ext4
    --quick
    --no-size-check
    --random-source=/dev/urandom

The 52 GiB size is accepted.

  1. Remove the test container if necessary and attempt to create a 75 GiB Quick Format container:
    veracrypt --text --create vault.hc
    --size=75G
    --volume-type=normal
    --encryption=AES
    --hash=SHA-512
    --filesystem=ext4
    --quick
    --no-size-check
    --random-source=/dev/urandom

  2. VeraCrypt immediately returns:
    Error: Incorrect volume size

Removing --filesystem=ext4 does not appear necessary to trigger the issue; the rejection occurs while validating the requested volume size.

The documented purpose of --no-size-check is to disable the check of container size against available disk free space, so I would expect the 75 GiB sparse/Quick Format container to be permitted.

Screenshots

Your Environment

Please tell us more about your environment

VeraCrypt version: 1.26.29

Operating system and version: Debian Linux 13

System type: 64-Bit

Ngôn ngữ chính
C
Star
11.7k
Fork
1.4k
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
28

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của veracrypt/VeraCrypt

Tất cả issue của veracrypt/VeraCrypt

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.