<?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 rust1.62</DocumentTitle>
  <DocumentType>SUSE Patch</DocumentType>
  <DocumentPublisher Type="Vendor">
    <ContactDetails>security@suse.de</ContactDetails>
    <IssuingAuthority>SUSE Security Team</IssuingAuthority>
  </DocumentPublisher>
  <DocumentTracking>
    <Identification>
      <ID>SUSE-SU-2022:3451-1</ID>
    </Identification>
    <Status>Final</Status>
    <Version>1</Version>
    <RevisionHistory>
      <Revision>
        <Number>1</Number>
        <Date>2022-09-28T07:44:28Z</Date>
        <Description>current</Description>
      </Revision>
    </RevisionHistory>
    <InitialReleaseDate>2022-09-28T07:44:28Z</InitialReleaseDate>
    <CurrentReleaseDate>2022-09-28T07:44:28Z</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 rust1.62</Note>
    <Note Title="Details" Type="General" Ordinal="2" xml:lang="en">This update for rust1.62 fixes the following issues:

- CVE-2022-36113: Fixed symlink hijack vulnerability (bsc#1203433).
- CVE-2022-36114: Fixed zip bomb vulnerability (bsc#1203431).
</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:1.62-2022-3451,SUSE-2022-3451,SUSE-SLE-Module-Development-Tools-15-SP3-2022-3451,SUSE-SLE-Module-Development-Tools-15-SP4-2022-3451,openSUSE-SLE-15.3-2022-3451,openSUSE-SLE-15.4-2022-3451</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/2022/suse-su-20223451-1/</URL>
      <Description>Link for SUSE-SU-2022:3451-1</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://lists.suse.com/pipermail/sle-security-updates/2022-September/012440.html</URL>
      <Description>E-Mail link for SUSE-SU-2022:3451-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/1203431</URL>
      <Description>SUSE Bug 1203431</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1203433</URL>
      <Description>SUSE Bug 1203433</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/security/cve/CVE-2022-36113/</URL>
      <Description>SUSE CVE CVE-2022-36113 page</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/security/cve/CVE-2022-36114/</URL>
      <Description>SUSE CVE CVE-2022-36114 page</Description>
    </Reference>
  </DocumentReferences>
  <ProductTree xmlns="http://www.icasi.org/CVRF/schema/prod/1.1">
    <Branch Type="Product Family" Name="Container bci/rust:1.62">
      <Branch Type="Product Name" Name="Container bci/rust:1.62">
        <FullProductName ProductID="Container bci/rust:1.62">Container bci/rust:1.62</FullProductName>
      </Branch>
    </Branch>
    <Branch Type="Product Family" Name="SUSE Linux Enterprise Module for Development Tools 15 SP3">
      <Branch Type="Product Name" Name="SUSE Linux Enterprise Module for Development Tools 15 SP3">
        <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP3" CPE="cpe:/o:suse:sle-module-development-tools:15:sp3">SUSE Linux Enterprise Module for Development Tools 15 SP3</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="openSUSE Leap 15.3">
      <Branch Type="Product Name" Name="openSUSE Leap 15.3">
        <FullProductName ProductID="openSUSE Leap 15.3" CPE="cpe:/o:opensuse:leap:15.3">openSUSE Leap 15.3</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 Version" Name="cargo1.62-1.62.1-150300.7.7.1">
      <FullProductName ProductID="cargo1.62-1.62.1-150300.7.7.1">cargo1.62-1.62.1-150300.7.7.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="rust1.62-1.62.1-150300.7.7.1">
      <FullProductName ProductID="rust1.62-1.62.1-150300.7.7.1">rust1.62-1.62.1-150300.7.7.1</FullProductName>
    </Branch>
    <Relationship ProductReference="cargo1.62-1.62.1-150300.7.7.1" RelationType="Default Component Of" RelatesToProductReference="Container bci/rust:1.62">
      <FullProductName ProductID="Container bci/rust:1.62:cargo1.62-1.62.1-150300.7.7.1">cargo1.62-1.62.1-150300.7.7.1 as a component of Container bci/rust:1.62</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.62-1.62.1-150300.7.7.1" RelationType="Default Component Of" RelatesToProductReference="Container bci/rust:1.62">
      <FullProductName ProductID="Container bci/rust:1.62:rust1.62-1.62.1-150300.7.7.1">rust1.62-1.62.1-150300.7.7.1 as a component of Container bci/rust:1.62</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo1.62-1.62.1-150300.7.7.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP3">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP3:cargo1.62-1.62.1-150300.7.7.1">cargo1.62-1.62.1-150300.7.7.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP3</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.62-1.62.1-150300.7.7.1" RelationType="Default Component Of" RelatesToProductReference="SUSE Linux Enterprise Module for Development Tools 15 SP3">
      <FullProductName ProductID="SUSE Linux Enterprise Module for Development Tools 15 SP3:rust1.62-1.62.1-150300.7.7.1">rust1.62-1.62.1-150300.7.7.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP3</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo1.62-1.62.1-150300.7.7.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.62-1.62.1-150300.7.7.1">cargo1.62-1.62.1-150300.7.7.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.62-1.62.1-150300.7.7.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.62-1.62.1-150300.7.7.1">rust1.62-1.62.1-150300.7.7.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo1.62-1.62.1-150300.7.7.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.3">
      <FullProductName ProductID="openSUSE Leap 15.3:cargo1.62-1.62.1-150300.7.7.1">cargo1.62-1.62.1-150300.7.7.1 as a component of openSUSE Leap 15.3</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.62-1.62.1-150300.7.7.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.3">
      <FullProductName ProductID="openSUSE Leap 15.3:rust1.62-1.62.1-150300.7.7.1">rust1.62-1.62.1-150300.7.7.1 as a component of openSUSE Leap 15.3</FullProductName>
    </Relationship>
    <Relationship ProductReference="cargo1.62-1.62.1-150300.7.7.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:cargo1.62-1.62.1-150300.7.7.1">cargo1.62-1.62.1-150300.7.7.1 as a component of openSUSE Leap 15.4</FullProductName>
    </Relationship>
    <Relationship ProductReference="rust1.62-1.62.1-150300.7.7.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:rust1.62-1.62.1-150300.7.7.1">rust1.62-1.62.1-150300.7.7.1 as a component of openSUSE Leap 15.4</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 is a package manager for the rust programming language. After a package is downloaded, Cargo extracts its source code in the ~/.cargo folder on disk, making it available to the Rust projects it builds. To record when an extraction is successful, Cargo writes "ok" to the .cargo-ok file at the root of the extracted source code once it extracted all the files. It was discovered that Cargo allowed packages to contain a .cargo-ok symbolic link, which Cargo would extract. Then, when Cargo attempted to write "ok" into .cargo-ok, it would actually replace the first two bytes of the file the symlink pointed to with ok. This would allow an attacker to corrupt one file on the machine using Cargo to extract the package. Note that by design Cargo allows code execution at build time, due to build scripts and procedural macros. The vulnerabilities in this advisory allow performing a subset of the possible damage in a harder to track down way. Your dependencies must still be trusted if you want to be protected from attacks, as it's possible to perform the same attacks with build scripts and procedural macros. The vulnerability is present in all versions of Cargo. Rust 1.64, to be released on September 22nd, will include a fix for it. Since the vulnerability is just a more limited way to accomplish what a malicious build scripts or procedural macros can do, we decided not to publish Rust point releases backporting the security fix. Patch files are available for Rust 1.63.0 are available in the wg-security-response repository for people building their own toolchain.
Mitigations We recommend users of alternate registries to 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 implemented server-side checks to reject these kinds of packages years ago, and there are no packages on crates.io exploiting these vulnerabilities. crates.io users still need to exercise care in choosing their dependencies though, as remote code execution is allowed by design there as well.</Note>
    </Notes>
    <CVE>CVE-2022-36113</CVE>
    <ProductStatuses>
      <Status Type="Fixed">
        <ProductID>Container bci/rust:1.62:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>Container bci/rust:1.62:rust1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP3:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP3:rust1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:rust1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>openSUSE Leap 15.3:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>openSUSE Leap 15.3:rust1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>openSUSE Leap 15.4:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>openSUSE Leap 15.4:rust1.62-1.62.1-150300.7.7.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/2022/suse-su-20223451-1/</URL>
      </Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.suse.com/security/cve/CVE-2022-36113.html</URL>
        <Description>CVE-2022-36113</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1203433</URL>
        <Description>SUSE Bug 1203433</Description>
      </Reference>
    </References>
  </Vulnerability>
  <Vulnerability xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1" Ordinal="2">
    <Notes>
      <Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">Cargo is a package manager for the rust programming language. It was discovered that Cargo did not limit the amount of data extracted from compressed archives. An attacker could upload to an alternate registry a specially crafted package that extracts way more data than its size (also known as a "zip bomb"), exhausting the disk space on the machine using Cargo to download the package. Note that by design Cargo allows code execution at build time, due to build scripts and procedural macros. The vulnerabilities in this advisory allow performing a subset of the possible damage in a harder to track down way. Your dependencies must still be trusted if you want to be protected from attacks, as it's possible to perform the same attacks with build scripts and procedural macros. The vulnerability is present in all versions of Cargo. Rust 1.64, to be released on September 22nd, will include a fix for it. Since the vulnerability is just a more limited way to accomplish what a malicious build scripts or procedural macros can do, we decided not to publish Rust point releases backporting the security fix. Patch files are available for Rust 1.63.0 are available in the wg-security-response repository for people building their own toolchain. We recommend users of alternate registries to excercise 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 implemented server-side checks to reject these kinds of packages years ago, 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 the same concerns about build scripts and procedural macros apply here.</Note>
    </Notes>
    <CVE>CVE-2022-36114</CVE>
    <ProductStatuses>
      <Status Type="Fixed">
        <ProductID>Container bci/rust:1.62:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>Container bci/rust:1.62:rust1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP3:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP3:rust1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:rust1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>openSUSE Leap 15.3:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>openSUSE Leap 15.3:rust1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>openSUSE Leap 15.4:cargo1.62-1.62.1-150300.7.7.1</ProductID>
        <ProductID>openSUSE Leap 15.4:rust1.62-1.62.1-150300.7.7.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/2022/suse-su-20223451-1/</URL>
      </Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.suse.com/security/cve/CVE-2022-36114.html</URL>
        <Description>CVE-2022-36114</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1203431</URL>
        <Description>SUSE Bug 1203431</Description>
      </Reference>
    </References>
  </Vulnerability>
</cvrfdoc>
