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

Abierto
#1,869 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
53/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Tranquilo
Stack tecnológico
c, linux
Área
cli, security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C
Estrellas
11.7k
Forks
1.4k
Merge medio
1 d 1 h
PR fusionados (30 d)
28

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de veracrypt/VeraCrypt

Todos los issues de veracrypt/VeraCrypt

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.