CVE-2021-38188
JSON

9.8critical

Incorrect buffer size calculation in iced-x86

Severity
9.8critical CVSS:3.1 by NVD
Exploit likelihood
1.27% (higher than 70% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-jjx5-3f36-6927RUSTSEC-2021-0068

Description

An issue was discovered in the iced-x86 crate through 1.10.3 for Rust. In Decoder::new(), slice.get_unchecked(slice.length()) is used unsafely.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
iced-x86 (crates.io)before 1.11.0, from 0.0.0-0 before 1.10.4-0GitHub Advisory Database, RustSec Advisory Database
iced-x86_project iced-x86up to 1.10.3NVD

All scores

GitHub9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD7.5high CVSS:2.0AV:N/AC:L/Au:N/C:P/I:P/A:P

Classification

What each source says

CVE List

An issue was discovered in the iced-x86 crate through 1.10.3 for Rust. In Decoder::new(), slice.get_unchecked(slice.length()) is used unsafely.

RustSec Advisory Database

Versions of iced-x86 <= 1.10.3 invoke undefined behavior which may cause soundness issues in crates using the iced_x86::Decoder struct. The Decoder::new() function made a call to slice.get_unchecked(slice.length()) to get the end position of the input buffer. The flaw was fixed with safe logic that does not invoke undefined behavior.

More details can be found at https://github.com/icedland/iced/issues/168.

NVD (es)

Se ha detectado un problema en la crate iced-x86 versiones hasta 1.10.3 para Rust. En la función Decoder::new(), slice.get_unchecked(slice.length()) es usado de forma no segura

References

Sources

SourceRecordLicence
CVE ListCVE-2021-38188 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-jjx5-3f36-6927 changed 2023-11-08CC-BY-4.0
RustSec Advisory DatabaseRUSTSEC-2021-0068 changed 2023-11-08CC0-1.0
NVDCVE-2021-38188 changed 2026-06-17Public domain