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

オープン
#1,869 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
53/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
c, linux
領域
cli, security

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C
スター
11.7k
フォーク
1.4k
平均マージ
1日 1時間
マージ済み PR(30日)
28

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

veracrypt/VeraCrypt のほかの issue

veracrypt/VeraCrypt の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。