5.7medium
`serde` deserialization for `FamStructWrapper` lacks bound checks that could potentially lead to out-of-bounds memory access
- Severity
- 5.7medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.65% (higher than 52% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-875g-mfp6-g7f9RUSTSEC-2024-0002
Description
vmm-sys-util is a collection of modules that provides helpers and utilities used by multiple rust-vmm components. Starting in version 0.5.0 and prior to version 0.12.0, an issue in the `FamStructWrapper::deserialize` implementation provided by the crate for `vmm_sys_util::fam::FamStructWrapper` can lead to out of bounds memory accesses. The deserialization does not check that the length stored in the header matches the flexible array length. Mismatch in the lengths might allow out of bounds memory access through Rust-safe methods. The issue was corrected in version 0.12.0 by inserting a check that verifies the lengths of compared flexible arrays are equal for any deserialized header and aborting deserialization otherwise. Moreover, the API was changed so that header length can only be modified through Rust-unsafe code. This ensures that users cannot trigger out-of-bounds memory access from Rust-safe code.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| rust-vmm vmm-sys-util | >= 0.5.0, < 0.12.0, from 0.5.0 before 0.12.0 | CVE List, NVD |
| vmm-sys-util (crates.io) | from 0.5.0 before 0.12.0 | GitHub Advisory Database, RustSec Advisory Database |
All scores
| GitHub_M | 5.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L |
| GitHub | 5.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L |
| RustSec Advisory Database | 5.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:L |
| NVD | 9.8critical CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
vmm-sys-util is a collection of modules that provides helpers and utilities used by multiple rust-vmm components. Starting in version 0.5.0 and prior to version 0.12.0, an issue in the `FamStructWrapper::deserialize` implementation provided by the crate for `vmm_sys_util::fam::FamStructWrapper` can lead to out of bounds memory accesses. The deserialization does not check that the length stored in the header matches the flexible array length. Mismatch in the lengths might allow out of bounds memory access through Rust-safe methods. The issue was corrected in version 0.12.0 by inserting a check that verifies the lengths of compared flexible arrays are equal for any deserialized header and aborting deserialization otherwise. Moreover, the API was changed so that header length can only be modified through Rust-unsafe code. This ensures that users cannot trigger out-of-bounds memory access from Rust-safe code.
GitHub Advisory Database
Impact
An issue was discovered in the FamStructWrapper::deserialize implementation provided by the crate for vmm_sys_util::fam::FamStructWrapper, which can lead to out of bounds memory accesses. The deserialization does not check that the length stored in the header matches the flexible array length. Mismatch in the lengths might allow out of bounds memory access through Rust-safe methods.
Impacted versions: >= 0.5.0
Patches
The issue was corrected in version 0.12.0 by inserting a check that verifies the lengths of compared flexible arrays are equal for any deserialized header and aborting deserialization otherwise. Moreover, the API was changed so that header length can only be modified through Rust-unsafe code. This ensures that users cannot trigger out-of-bounds memory access from Rust-safe code.
RustSec Advisory Database
Impact
An issue was discovered in the FamStructWrapper::deserialize implementation
provided by the crate for vmm_sys_util::fam::FamStructWrapper, which can lead
to out of bounds memory accesses. The deserialization does not check that the
length stored in the header matches the flexible array length. Mismatch in the
lengths might allow out of bounds memory access through Rust-safe methods.
Impacted versions: >= 0.5.0
Patches
The issue was corrected in version 0.12.0 by inserting a check that verifies the lengths of compared flexible arrays are equal for any deserialized header and aborting deserialization otherwise. Moreover, the API was changed so that header length can only be modified through Rust-unsafe code. This ensures that users cannot trigger out-of-bounds memory access from Rust-safe code.
NVD (es)
vmm-sys-util es una colección de módulos que proporciona ayudas y utilidades utilizadas por múltiples componentes de Rust-VMM. A partir de la versión 0.5.0 y antes de la versión 0.12.0, un problema en la implementación de `FamStructWrapper::deserialize` proporcionada por la caja para `vmm_sys_util::fam::FamStructWrapper` puede provocar accesos a la memoria fuera de los límites. La deserialización no verifica que la longitud almacenada en el encabezado coincida con la longitud de la matriz flexible. La falta de coincidencia en las longitudes podría permitir el acceso a la memoria fuera de los límites a través de métodos seguros para Rust. El problema se corrigió en la versión 0.12.0 insertando una verificación que verifica que las longitudes de las matrices flexibles comparadas sean iguales para cualquier encabezado deserializado y, en caso contrario, abortando la deserialización. Además, la API se cambió para que la longitud del encabezado solo se pueda modificar mediante código no seguro para Rust. Esto garantiza que los usuarios no puedan activar el acceso a la memoria fuera de los límites desde el código seguro para Rust.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-50711 changed 2025-02-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-875g-mfp6-g7f9 changed 2026-09-10 | CC-BY-4.0 |
| RustSec Advisory Database | RUSTSEC-2024-0002 changed 2026-10-12 | CC0-1.0 |
| NVD | CVE-2023-50711 changed 2026-06-17 | Public domain |