RUSTSEC-2026-0486: xattr functions mark unwritten bytes as initialized when given a zero-length buffer
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 62/100
Línea de trabajo
Empieza comprobando qué versión de rustix resuelve el proyecto: busca rustix en Cargo.toml y Cargo.lock, y ejecuta cargo tree -i rustix. El aviso indica que 1.1.6 es la versión corregida, así que el cambio probable es una actualización de dependencia, por ejemplo cargo update -p rustix, y posiblemente una edición del manifiesto. Ejecuta cargo build y cargo test, y luego confirma que el lockfile muestra rustix en 1.1.6 o posterior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
xattr functions mark unwritten bytes as initialized when given a zero-length buffer
| Details | |
|---|---|
| Status | unsound |
| Package | rustix |
| Version | 1.1.4 |
| URL | https://github.com/bytecodealliance/rustix/commit/8e6aaa6713d2bb64b1fdd8c472e3a32a10a76d70 |
| Date | 2026-10-27 |
The extended-attribute functions in rustix::fs (getxattr, lgetxattr, fgetxattr, listxattr, llistxattr and flistxattr) write into a Buffer and then mark as many bytes initialized as the system call reported. When the buffer has zero length, the operating system treats the call as a size query: it writes nothing and returns the size of the attribute value or of the name list. rustix still marked that many bytes as initialized.
Passing a Vec whose length equals its capacity through spare_capacity gives such a zero-length buffer, and rustix then set the vector's length past its capacity over memory that was never written. This is undefined behavior reachable from safe code. With an empty &mut [MaybeUninit<u8>] the call panics instead.
From 1.1.6 these functions return an empty result for a zero-length buffer, and new getxattr_query, lgetxattr_query, fgetxattr_query, listxattr_query, llistxattr_query and flistxattr_query functions return the size. The 0.38 series did not have the Buffer API and is not affected.
See advisory page for additional details.
- Lenguaje dominante
- Rust
- Estrellas
- 0
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stackabletech/stackable-odbc-sqlite
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 50/100
Todos los issues de stackabletech/stackable-odbc-sqlite
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
storytold/photocraft#14822 ·
Los mantenedores suelen responder en 1 día
-
bug css
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
dginev/latexml-oxide#853 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
[Bug] export_build_environment admits its output directory only after the export ran in the build computerPosiblemente ocupada @viniciusdsandrade la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día