<?xml version="1.0" encoding="UTF-8"?>
<cvrfdoc xmlns="http://www.icasi.org/CVRF/schema/cvrf/1.1" xmlns:cvrf="http://www.icasi.org/CVRF/schema/cvrf/1.1">
  <DocumentTitle xml:lang="en">Security update for rust, rust1.72</DocumentTitle>
  <DocumentType>SUSE Patch</DocumentType>
  <DocumentPublisher Type="Vendor">
    <ContactDetails>security@suse.de</ContactDetails>
    <IssuingAuthority>SUSE Security Team</IssuingAuthority>
  </DocumentPublisher>
  <DocumentTracking>
    <Identification>
      <ID>SUSE-SU-2023:3722-1</ID>
    </Identification>
    <Status>Final</Status>
    <Version>1</Version>
    <RevisionHistory>
      <Revision>
        <Number>1</Number>
        <Date>2023-09-21T08:53:26Z</Date>
        <Description>current</Description>
      </Revision>
    </RevisionHistory>
    <InitialReleaseDate>2023-09-21T08:53:26Z</InitialReleaseDate>
    <CurrentReleaseDate>2023-09-21T08:53:26Z</CurrentReleaseDate>
    <Generator>
      <Engine>cve-database/bin/generate-cvrf.pl</Engine>
      <Date>2017-02-24T01:00:00Z</Date>
    </Generator>
  </DocumentTracking>
  <DocumentNotes>
    <Note Title="Topic" Type="Summary" Ordinal="1" xml:lang="en">Security update for rust, rust1.72</Note>
    <Note Title="Details" Type="General" Ordinal="2" xml:lang="en">This update for rust, rust1.72 fixes the following issues:

Changes in rust:

- Update to version 1.72.0 - for details see the rust1.72 package

Changes in rust1.72:

- CVE-2023-40030: fix minor non-exploited issue in cargo (bsc#1214689)


Version 1.72.0 (2023-08-24)
==========================

Language
--------

- Replace const eval limit by a lint and add an exponential backoff warning
- expand: Change how `#![cfg(FALSE)]` behaves on crate root
- Stabilize inline asm for LoongArch64
- Uplift `clippy::undropped_manually_drops` lint
- Uplift `clippy::invalid_utf8_in_unchecked` lint
- Uplift `clippy::cast_ref_to_mut` lint
- Uplift `clippy::cmp_nan` lint
- resolve: Remove artificial import ambiguity errors
- Don't require associated types with Self: Sized bounds in `dyn Trait` objects

Compiler
--------

- Remember names of `cfg`-ed out items to mention them in diagnostics
- Support for native WASM exceptions
- Add support for NetBSD/aarch64-be (big-endian arm64).
- Write to stdout if `-` is given as output file
- Force all native libraries to be statically linked when linking a static binary
- Add Tier 3 support for `loongarch64-unknown-none*`
- Prevent `.eh_frame` from being emitted for `-C panic=abort`
- Support 128-bit enum variant in debuginfo codegen
- compiler: update solaris/illumos to enable tsan support.

Refer to Rust's platform support page for more information on Rust's tiered platform support.

Libraries
---------

- Document memory orderings of `thread::{park, unpark}`
- io: soften ‘at most one write attempt’ requirement in io::Write::write
- Specify behavior of HashSet::insert
- Relax implicit `T: Sized` bounds on `BufReader&lt;T&gt;`, `BufWriter&lt;T&gt;` and `LineWriter&lt;T&gt;`
- Update runtime guarantee for `select_nth_unstable`
- Return `Ok` on kill if process has already exited
- Implement PartialOrd for `Vec`s over different allocators
- Use 128 bits for TypeId hash
- Don't drain-on-drop in DrainFilter impls of various collections.
- Make `{Arc,Rc,Weak}::ptr_eq` ignore pointer metadata

Rustdoc
-------

- Allow whitespace as path separator like double colon
- Add search result item types after their name
- Search for slices and arrays by type with `[]`
- Clean up type unification and 'unboxing'

Stabilized APIs
---------------

- `impl&lt;T: Send&gt; Sync for mpsc::Sender&lt;T&gt;`
- `impl TryFrom&lt;&amp;OsStr&gt; for &amp;str`
- `String::leak`

These APIs are now stable in const contexts:

- `CStr::from_bytes_with_nul`
- `CStr::to_bytes`
- `CStr::to_bytes_with_nul`
- `CStr::to_str`

Cargo
-----

- Enable `-Zdoctest-in-workspace` by default. When running each documentation
  test, the working directory is set to the root directory of the package the
  test belongs to.
- Add support of the 'default' keyword to reset previously set `build.jobs`
  parallelism back to the default.

Compatibility Notes
-------------------

- Alter `Display` for `Ipv6Addr` for IPv4-compatible addresses
- Cargo changed feature name validation check to a hard error. The warning was
  added in Rust 1.49. These extended characters aren't allowed on crates.io, so
  this should only impact users of other registries, or people who don't publish
  to a registry.
  </Note>
    <Note Title="Terms of Use" Type="Legal Disclaimer" Ordinal="3" xml:lang="en">The CVRF data is provided by SUSE under the Creative Commons License 4.0 with Attribution (CC-BY-4.0).</Note>
    <Note Title="Patchnames" Type="Details" Ordinal="4" xml:lang="en">Container bci/rust:latest-2023-3722,SUSE-2023-3722,SUSE-SLE-Module-Development-Tools-15-SP4-2023-3722,SUSE-SLE-Module-Development-Tools-15-SP5-2023-3722,openSUSE-SLE-15.4-2023-3722,openSUSE-SLE-15.5-2023-3722</Note>
  </DocumentNotes>
  <DocumentDistribution xml:lang="en">Copyright SUSE LLC under the Creative Commons License 4.0 with Attribution (CC-BY-4.0)</DocumentDistribution>
  <DocumentReferences>
    <Reference Type="Self">
      <URL>https://www.suse.com/support/update/announcement/2023/suse-su-20233722-1/</URL>
      <Description>Link for SUSE-SU-2023:3722-1</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://lists.suse.com/pipermail/sle-updates/2023-September/031626.html</URL>
      <Description>E-Mail link for SUSE-SU-2023:3722-1</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/support/security/rating/</URL>
      <Description>SUSE Security Ratings</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1214689</URL>
      <Description>SUSE Bug 1214689</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/security/cve/CVE-2023-40030/</URL>
      <Description>SUSE CVE CVE-2023-40030 page</Description>
    </Reference>
  </DocumentReferences>
  <ProductTree xmlns="http://www.icasi.org/CVRF/schema/prod/1.1">
    <Branch Type="Product Family" Name="Container bci/rust:latest">
      <Branch Type="Product Name" Name="Container bci/rust:latest">
        <FullProductName ProductID="Container bci/rust:latest">Container bci/rust:latest</FullProductName>
      </Branch>
    </Branch>
    <Branch Type="Product Family" Name="SUSE Linux Enterprise Module for Development Tools 15 SP4">
      <Branch Type="Product Name" Name="SUSE Linux Enterprise Module for Development Tools 15 SP4">
        <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP4" CPE="cpe:/o:suse:sle-module-development-tools:15:sp4">SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
      </Branch>
    </Branch>
    <Branch Type="Product Family" Name="SUSE Linux Enterprise Module for Development Tools 15 SP5">
      <Branch Type="Product Name" Name="SUSE Linux Enterprise Module for Development Tools 15 SP5">
        <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP5" CPE="cpe:/o:suse:sle-module-development-tools:15:sp5">SUSE Linux Enterprise Module for Development Tools 15 SP5</FullProductName>
      </Branch>
    </Branch>
    <Branch Type="Product Family" Name="openSUSE Leap 15.4">
      <Branch Type="Product Name" Name="openSUSE Leap 15.4">
        <FullProductName ProductID="openSUSE Leap 15.4" CPE="cpe:/o:opensuse:leap:15.4">openSUSE Leap 15.4</FullProductName>
      </Branch>
    </Branch>
    <Branch Type="Product Family" Name="openSUSE Leap 15.5">
      <Branch Type="Product Name" Name="openSUSE Leap 15.5">
        <FullProductName ProductID="openSUSE Leap 15.5" CPE="cpe:/o:opensuse:leap:15.5">openSUSE Leap 15.5</FullProductName>
      </Branch>
    </Branch>
    <Branch Type="Product Version" Name="cargo1.72-1.72.0-150400.9.3.1">
      <FullProductName ProductID="cargo1.72-1.72.0-150400.9.3.1">cargo1.72-1.72.0-150400.9.3.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="rust1.72-1.72.0-150400.9.3.1">
      <FullProductName ProductID="rust1.72-1.72.0-150400.9.3.1">rust1.72-1.72.0-150400.9.3.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="cargo-1.72.0-150400.24.24.1">
      <FullProductName ProductID="cargo-1.72.0-150400.24.24.1">cargo-1.72.0-150400.24.24.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="rust-1.72.0-150400.24.24.1">
      <FullProductName ProductID="rust-1.72.0-150400.24.24.1">rust-1.72.0-150400.24.24.1</FullProductName>
    </Branch>
    <Relationship ProductReference="cargo1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="Container bci/rust:latest">
      <FullProductName ProductID="Container bci/rust:latest:cargo1.72-1.72.0-150400.9.3.1">cargo1.72-1.72.0-150400.9.3.1 as a component of Container bci/rust:latest</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="Container bci/rust:latest">
      <FullProductName ProductID="Container bci/rust:latest:rust1.72-1.72.0-150400.9.3.1">rust1.72-1.72.0-150400.9.3.1 as a component of Container bci/rust:latest</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo-1.72.0-150400.24.24.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP4">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP4:cargo-1.72.0-150400.24.24.1">cargo-1.72.0-150400.24.24.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP4">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP4:cargo1.72-1.72.0-150400.9.3.1">cargo1.72-1.72.0-150400.9.3.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust-1.72.0-150400.24.24.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP4">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP4:rust-1.72.0-150400.24.24.1">rust-1.72.0-150400.24.24.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP4">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP4:rust1.72-1.72.0-150400.9.3.1">rust1.72-1.72.0-150400.9.3.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo-1.72.0-150400.24.24.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP5">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP5:cargo-1.72.0-150400.24.24.1">cargo-1.72.0-150400.24.24.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP5</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP5">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP5:cargo1.72-1.72.0-150400.9.3.1">cargo1.72-1.72.0-150400.9.3.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP5</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust-1.72.0-150400.24.24.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP5">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP5:rust-1.72.0-150400.24.24.1">rust-1.72.0-150400.24.24.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP5</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP5">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP5:rust1.72-1.72.0-150400.9.3.1">rust1.72-1.72.0-150400.9.3.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP5</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo-1.72.0-150400.24.24.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:cargo-1.72.0-150400.24.24.1">cargo-1.72.0-150400.24.24.1 as a component of openSUSE Leap 15.4</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:cargo1.72-1.72.0-150400.9.3.1">cargo1.72-1.72.0-150400.9.3.1 as a component of openSUSE Leap 15.4</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust-1.72.0-150400.24.24.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:rust-1.72.0-150400.24.24.1">rust-1.72.0-150400.24.24.1 as a component of openSUSE Leap 15.4</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:rust1.72-1.72.0-150400.9.3.1">rust1.72-1.72.0-150400.9.3.1 as a component of openSUSE Leap 15.4</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo-1.72.0-150400.24.24.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.5">
      <FullProductName ProductID="openSUSE Leap 15.5:cargo-1.72.0-150400.24.24.1">cargo-1.72.0-150400.24.24.1 as a component of openSUSE Leap 15.5</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.5">
      <FullProductName ProductID="openSUSE Leap 15.5:cargo1.72-1.72.0-150400.9.3.1">cargo1.72-1.72.0-150400.9.3.1 as a component of openSUSE Leap 15.5</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust-1.72.0-150400.24.24.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.5">
      <FullProductName ProductID="openSUSE Leap 15.5:rust-1.72.0-150400.24.24.1">rust-1.72.0-150400.24.24.1 as a component of openSUSE Leap 15.5</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.72-1.72.0-150400.9.3.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.5">
      <FullProductName ProductID="openSUSE Leap 15.5:rust1.72-1.72.0-150400.9.3.1">rust1.72-1.72.0-150400.9.3.1 as a component of openSUSE Leap 15.5</FullProductName>
    </Relationship>
  </ProductTree>
  <Vulnerability xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1" Ordinal="1">
    <Notes>
      <Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">Cargo downloads a Rust project’s dependencies and compiles the project. Starting in Rust 1.60.0 and prior to 1.72, Cargo did not escape Cargo feature names when including them in the report generated by `cargo build --timings`. A malicious package included as a dependency may inject nearly arbitrary HTML here, potentially leading to cross-site scripting if the report is subsequently uploaded somewhere. The vulnerability affects users relying on dependencies from git, local paths, or alternative registries. Users who solely depend on crates.io are unaffected.

Rust 1.60.0 introduced `cargo build --timings`, which produces a report of how long the different steps of the build process took. It includes lists of Cargo features for each crate. Prior to Rust 1.72, Cargo feature names were allowed to contain almost any characters (with some exceptions as used by the feature syntax), but it would produce a future incompatibility warning about them since Rust 1.49. crates.io is far more stringent about what it considers a valid feature name and has not allowed such feature names. As the feature names were included unescaped in the timings report, they could be used to inject Javascript into the page, for example with a feature name like `features = ["&lt;img src='' onerror=alert(0)"]`. If this report were subsequently uploaded to a domain that uses credentials, the injected Javascript could access resources from the website visitor.

This issue was fixed in Rust 1.72 by turning the future incompatibility warning into an error. Users should still exercise care in which package they download, by only including trusted dependencies in their projects. Please note that even with these vulnerabilities fixed, by design Cargo allows arbitrary code execution at build time thanks to build scripts and procedural macros: a malicious dependency will be able to cause damage regardless of these vulnerabilities. crates.io has server-side checks preventing this attack, and there are no packages on crates.io exploiting these vulnerabilities. crates.io users still need to excercise care in choosing their dependencies though, as remote code execution is allowed by design there as well.</Note>
    </Notes>
    <CVE>CVE-2023-40030</CVE>
    <ProductStatuses>
      <Status Type="Fixed">
        <ProductID>Container bci/rust:latest:cargo1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>Container bci/rust:latest:rust1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:cargo-1.72.0-150400.24.24.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:cargo1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:rust-1.72.0-150400.24.24.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:rust1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP5:cargo-1.72.0-150400.24.24.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP5:cargo1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP5:rust-1.72.0-150400.24.24.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP5:rust1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>openSUSE Leap 15.4:cargo-1.72.0-150400.24.24.1</ProductID>
        <ProductID>openSUSE Leap 15.4:cargo1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>openSUSE Leap 15.4:rust-1.72.0-150400.24.24.1</ProductID>
        <ProductID>openSUSE Leap 15.4:rust1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>openSUSE Leap 15.5:cargo-1.72.0-150400.24.24.1</ProductID>
        <ProductID>openSUSE Leap 15.5:cargo1.72-1.72.0-150400.9.3.1</ProductID>
        <ProductID>openSUSE Leap 15.5:rust-1.72.0-150400.24.24.1</ProductID>
        <ProductID>openSUSE Leap 15.5:rust1.72-1.72.0-150400.9.3.1</ProductID>
      </Status>
    </ProductStatuses>
    <Threats>
      <Threat Type="Impact">
        <Description>moderate</Description>
      </Threat>
    </Threats>
    <Remediations>
      <Remediation Type="Vendor Fix">
        <Description xml:lang="en">To install this SUSE Security Update use the SUSE recommended installation methods like YaST online_update or "zypper patch".
</Description>
        <URL>https://www.suse.com/support/update/announcement/2023/suse-su-20233722-1/</URL>
      </Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.suse.com/security/cve/CVE-2023-40030.html</URL>
        <Description>CVE-2023-40030</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1214689</URL>
        <Description>SUSE Bug 1214689</Description>
      </Reference>
    </References>
  </Vulnerability>
</cvrfdoc>
