AES-GCM tests failing with wycherproof in Fedora

Abierto
#844 1 comentario 0 reacciones 0 asignados Ver en GitHub

@antoinelochet ya está trabajando en esto.

Desde el 9/11/2026.

  • #918 de @antoinelochet — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
cpp
Área
security

Línea de trabajo

Start by reproducing the failure with the wycheproof integration test on Fedora and SoftHSM 2.6.9 or 2.7.0; the report identifies test 311 as the likely trigger after test 310. Trace the failing AES-GCM invalid-input case through the SoftHSM code that handles its buffers and compare behavior with the passing Ubuntu CI run. Done means the assertion is resolved and the Wycheproof tests pass.

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

Descripción

After trying to update rust-cryptoki in Fedora that got softhsm 2.7.0 I started getting some C++ assertions. They fail in one of the wycherproof test rust-cryptoki introduced in recent release:

test aes_gcm_message_wycheproof ... ok
...
✓ Test 310: Valid - Key: 256-bit, Nonce: 10, Tag: 16, AAD: 0, PT: 16
/usr/include/c++/16/bits/stl_vector.h:1253: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = unsigned char; _Alloc = SecureAllocator<unsigned char>; reference = unsigned char&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
error: test failed, to rerun pass `--test wycheproof`

The same is happening in Fedora 43 with softhsm 2.6.9 (but looks like it does not in upstream CI with Ubuntu):

✓ Test 310: Valid - Key: 256-bit, Nonce: 10, Tag: 16, AAD: 0, PT: 16
/usr/include/c++/15/bits/stl_vector.h:1263: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = unsigned char; _Alloc = SecureAllocator<unsigned char>; reference = unsigned char&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.

I assume the failing input is the next test we are not getting output for (output from testsuite running against kryoptic):

✓ Test 311: Invalid (expected failure) - Key: 128-bit, Nonce: 0, Tag: 16, AAD: 0, PT: 0

I did not dive deeper into the softhsm code, but it sounds like some buffer overrun that should not be there ...

Lenguaje dominante
C++
Estrellas
1.1k
Forks
434
Merge medio
12 d 14 h
PR fusionados (30 d)
2

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 softhsm/SoftHSMv2

Todos los issues de softhsm/SoftHSMv2

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.