CVEfocus › CVE database › CVE-2020-36317

CVE-2020-36317

CVSS 7.5 HighEPSS 1.5% (higher than 74% of CVEs)Published 2021-04-11Updated 2024-08-04Assigner: mitre

In the standard library in Rust before 1.49.0, String::retain() function has a panic safety problem. It allows creation of a non-UTF-8 Rust string when the provided closure panics. This bug could result in a memory safety violation when other string APIs assume that UTF-8 encoding is used on the same string.

What to do

Fixed builds are available from Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

20Fixed
2Fix pending
18Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 24.04rustcNot affected
vulnerable_code_not_present
Ubuntu 22.04rustcNot affected
vulnerable_code_not_present
Ubuntu 20.04rustcFixed1.51.0+dfsg1+llvm-1~exp3ubuntu1~20.04.2UBUNTU-CVE-2020-36317
Ubuntu 16.04rustcFix pendingUBUNTU-CVE-2020-36317
Ubuntu 14.04rustcFix pendingUBUNTU-CVE-2020-36317
Debian 14rustcFixed1.53.0+dfsg1-1DEBIAN-CVE-2020-36317
Debian 13rustcFixed1.53.0+dfsg1-1DEBIAN-CVE-2020-36317
Debian 12rustcFixed1.53.0+dfsg1-1DEBIAN-CVE-2020-36317
Red Hat Enterprise Linux 9cargoNot affected
Red Hat Enterprise Linux 9clippyNot affected
Red Hat Enterprise Linux 9rustNot affected
Red Hat Enterprise Linux 9rust-analysisNot affected
Red Hat Enterprise Linux 9rust-analyzerNot affected
Red Hat Enterprise Linux 9rust-debugger-commonNot affected
Red Hat Enterprise Linux 9rust-docNot affected
Red Hat Enterprise Linux 9rust-gdbNot affected
Red Hat Enterprise Linux 9rust-lldbNot affected
Red Hat Enterprise Linux 9rust-srcNot affected
Red Hat Enterprise Linux 9rust-std-staticNot affected
Red Hat Enterprise Linux 9rust-std-static-wasm32-unknown-unknownNot affected
Red Hat Enterprise Linux 9rust-std-static-wasm32-wasiNot affected
Red Hat Enterprise Linux 9rust-std-static-wasm32-wasip1Not affected
Red Hat Enterprise Linux 9rust-toolsetNot affected
Red Hat Enterprise Linux 9rustfmtNot affected
Red Hat Enterprise Linux 8cargoFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8cargo-docFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8clippyFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rlsFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rustFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rust-analysisFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rust-debugger-commonFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rust-docFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rust-gdbFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rust-lldbFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rust-srcFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rust-std-staticFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rust-toolsetFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Red Hat Enterprise Linux 8rustfmtFixed0:1.49.0-1.module+el8.4.0+9446+1a463e08RHSA-2021:1935
Rocky Linux 8rustFixed0:1.49.0-1.module+el8.4.0+416+259a129aRLSA-2021:1935
Rocky Linux 8rust-toolsetFixed0:1.49.0-1.module+el8.4.0+416+259a129aRLSA-2021:1935

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.