CVE-2025-55159
JSON

5.1medium

slab allows out-of-bounds access in `get_disjoint_mut` due to incorrect bounds check

Severity
5.1medium CVSS:4.0 by GitHub_M
Exploit likelihood
0.28% (higher than 13% of CVEs)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-qx2v-8332-m4fvRUSTSEC-2025-0047

Description

slab is a pre-allocated storage for a uniform data type. In version 0.4.10, the get_disjoint_mut method incorrectly checked if indices were within the slab's capacity instead of its length, allowing access to uninitialized memory. This could lead to undefined behavior or potential crashes. This has been fixed in slab 0.4.11. A workaround for this issue involves to avoid using get_disjoint_mut with indices that might be beyond the slab's actual length.

Affected

Product or packageVersionsReported by
tokio-rs slab>= 0.4.10, < 0.4.11CVE List
slab (crates.io)from 0.4.10 before 0.4.11GitHub Advisory Database, RustSec Advisory Database

All scores

GitHub_M5.1medium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N

Classification

CWE-119

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

slab is a pre-allocated storage for a uniform data type. In version 0.4.10, the get_disjoint_mut method incorrectly checked if indices were within the slab's capacity instead of its length, allowing access to uninitialized memory. This could lead to undefined behavior or potential crashes. This has been fixed in slab 0.4.11. A workaround for this issue involves to avoid using get_disjoint_mut with indices that might be beyond the slab's actual length.

GitHub Advisory Database
Impact

The get_disjoint_mut method in slab v0.4.10 incorrectly checked if indices were within the slab's capacity instead of its length, allowing access to uninitialized memory. This could lead to undefined behavior or potential crashes.

Patches

This has been fixed in slab v0.4.11.

Workarounds

Avoid using get_disjoint_mut with indices that might be beyond the slab's actual length, or upgrade to v0.4.11 or later.

References
RustSec Advisory Database

Impact

The get_disjoint_mut method in slab v0.4.10 incorrectly checked if indices were within the slab's capacity instead of its length, allowing access to uninitialized memory. This could lead to undefined behavior or potential crashes.

Patches

This has been fixed in slab v0.4.11.

Workarounds

Avoid using get_disjoint_mut with indices that might be beyond the slab's actual length, or upgrade to v0.4.11 or later.

References

NVD (es)

slab es un almacenamiento preasignado para un tipo de dato uniforme. En la versión 0.4.10, el método get_disjoint_mut verificaba incorrectamente si los índices estaban dentro de la capacidad del slab en lugar de su longitud, lo que permitía acceder a memoria no inicializada. Esto podía provocar un comportamiento indefinido o posibles fallos. Esto se ha corregido en slab 0.4.11. Una solución alternativa consiste en evitar el uso de get_disjoint_mut con índices que puedan superar la longitud real del slab.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-55159 changed 2025-08-12CVE Terms of Use
GitHub Advisory DatabaseGHSA-qx2v-8332-m4fv changed 2026-09-10CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2025-0047 changed 2026-10-12CC0-1.0
NVDCVE-2025-55159 changed 2026-06-17Public domain