<?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 libgit2</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:3283-1</ID>
    </Identification>
    <Status>Final</Status>
    <Version>1</Version>
    <RevisionHistory>
      <Revision>
        <Number>1</Number>
        <Date>2022-09-15T13:33:57Z</Date>
        <Description>current</Description>
      </Revision>
    </RevisionHistory>
    <InitialReleaseDate>2022-09-15T13:33:57Z</InitialReleaseDate>
    <CurrentReleaseDate>2022-09-15T13:33:57Z</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 libgit2</Note>
    <Note Title="Details" Type="General" Ordinal="2" xml:lang="en">This update for libgit2 fixes the following issues:

- CVE-2022-24765: Fixed potential command injection via git worktree (bsc#1198234).
- CVE-2022-29187: Fixed incomplete fix for CVE-2022-24765 (bsc#1201431).
</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">SUSE-2022-3283,SUSE-SLE-Module-Development-Tools-15-SP4-2022-3283,openSUSE-SLE-15.4-2022-3283</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-20223283-1/</URL>
      <Description>Link for SUSE-SU-2022:3283-1</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://lists.suse.com/pipermail/sle-security-updates/2022-September/012252.html</URL>
      <Description>E-Mail link for SUSE-SU-2022:3283-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/1198234</URL>
      <Description>SUSE Bug 1198234</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1201431</URL>
      <Description>SUSE Bug 1201431</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/security/cve/CVE-2022-24765/</URL>
      <Description>SUSE CVE CVE-2022-24765 page</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/security/cve/CVE-2022-29187/</URL>
      <Description>SUSE CVE CVE-2022-29187 page</Description>
    </Reference>
  </DocumentReferences>
  <ProductTree xmlns="http://www.icasi.org/CVRF/schema/prod/1.1">
    <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.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="libgit2-1_3-1.3.0-150400.3.3.1">
      <FullProductName ProductID="libgit2-1_3-1.3.0-150400.3.3.1">libgit2-1_3-1.3.0-150400.3.3.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="libgit2-1_3-32bit-1.3.0-150400.3.3.1">
      <FullProductName ProductID="libgit2-1_3-32bit-1.3.0-150400.3.3.1">libgit2-1_3-32bit-1.3.0-150400.3.3.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="libgit2-1_3-64bit-1.3.0-150400.3.3.1">
      <FullProductName ProductID="libgit2-1_3-64bit-1.3.0-150400.3.3.1">libgit2-1_3-64bit-1.3.0-150400.3.3.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="libgit2-devel-1.3.0-150400.3.3.1">
      <FullProductName ProductID="libgit2-devel-1.3.0-150400.3.3.1">libgit2-devel-1.3.0-150400.3.3.1</FullProductName>
    </Branch>
    <Relationship ProductReference="libgit2-1_3-1.3.0-150400.3.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:libgit2-1_3-1.3.0-150400.3.3.1">libgit2-1_3-1.3.0-150400.3.3.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
    </Relationship>
    <Relationship ProductReference="libgit2-devel-1.3.0-150400.3.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:libgit2-devel-1.3.0-150400.3.3.1">libgit2-devel-1.3.0-150400.3.3.1 as a component of SUSE Linux Enterprise Module for Development Tools 15 SP4</FullProductName>
    </Relationship>
    <Relationship ProductReference="libgit2-1_3-1.3.0-150400.3.3.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:libgit2-1_3-1.3.0-150400.3.3.1">libgit2-1_3-1.3.0-150400.3.3.1 as a component of openSUSE Leap 15.4</FullProductName>
    </Relationship>
    <Relationship ProductReference="libgit2-1_3-32bit-1.3.0-150400.3.3.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:libgit2-1_3-32bit-1.3.0-150400.3.3.1">libgit2-1_3-32bit-1.3.0-150400.3.3.1 as a component of openSUSE Leap 15.4</FullProductName>
    </Relationship>
    <Relationship ProductReference="libgit2-devel-1.3.0-150400.3.3.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.4">
      <FullProductName ProductID="openSUSE Leap 15.4:libgit2-devel-1.3.0-150400.3.3.1">libgit2-devel-1.3.0-150400.3.3.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">Git for Windows is a fork of Git containing Windows-specific patches. This vulnerability affects users working on multi-user machines, where untrusted parties have write access to the same hard disk. Those untrusted parties could create the folder `C:\.git`, which would be picked up by Git operations run supposedly outside a repository while searching for a Git directory. Git would then respect any config in said Git directory. Git Bash users who set `GIT_PS1_SHOWDIRTYSTATE` are vulnerable as well. Users who installed posh-gitare vulnerable simply by starting a PowerShell. Users of IDEs such as Visual Studio are vulnerable: simply creating a new project would already read and respect the config specified in `C:\.git\config`. Users of the Microsoft fork of Git are vulnerable simply by starting a Git Bash. The problem has been patched in Git for Windows v2.35.2. Users unable to upgrade may create the folder `.git` on all drives where Git commands are run, and remove read/write access from those folders as a workaround. Alternatively, define or extend `GIT_CEILING_DIRECTORIES` to cover the _parent_ directory of the user profile, e.g. `C:\Users` if the user profile is located in `C:\Users\my-user-name`.</Note>
    </Notes>
    <CVE>CVE-2022-24765</CVE>
    <ProductStatuses>
      <Status Type="Fixed">
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:libgit2-1_3-1.3.0-150400.3.3.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:libgit2-devel-1.3.0-150400.3.3.1</ProductID>
        <ProductID>openSUSE Leap 15.4:libgit2-1_3-1.3.0-150400.3.3.1</ProductID>
        <ProductID>openSUSE Leap 15.4:libgit2-1_3-32bit-1.3.0-150400.3.3.1</ProductID>
        <ProductID>openSUSE Leap 15.4:libgit2-devel-1.3.0-150400.3.3.1</ProductID>
      </Status>
    </ProductStatuses>
    <Threats>
      <Threat Type="Impact">
        <Description>important</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-20223283-1/</URL>
      </Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.suse.com/security/cve/CVE-2022-24765.html</URL>
        <Description>CVE-2022-24765</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1198234</URL>
        <Description>SUSE Bug 1198234</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1199109</URL>
        <Description>SUSE Bug 1199109</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1200119</URL>
        <Description>SUSE Bug 1200119</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1200201</URL>
        <Description>SUSE Bug 1200201</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1201431</URL>
        <Description>SUSE Bug 1201431</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1201794</URL>
        <Description>SUSE Bug 1201794</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">Git is a distributed revision control system. Git prior to versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5, is vulnerable to privilege escalation in all platforms. An unsuspecting user could still be affected by the issue reported in CVE-2022-24765, for example when navigating as root into a shared tmp directory that is owned by them, but where an attacker could create a git repository. Versions 2.37.1, 2.36.2, 2.35.4, 2.34.4, 2.33.4, 2.32.3, 2.31.4, and 2.30.5 contain a patch for this issue. The simplest way to avoid being affected by the exploit described in the example is to avoid running git as root (or an Administrator in Windows), and if needed to reduce its use to a minimum. While a generic workaround is not possible, a system could be hardened from the exploit described in the example by removing any such repository if it exists already and creating one as root to block any future attacks.</Note>
    </Notes>
    <CVE>CVE-2022-29187</CVE>
    <ProductStatuses>
      <Status Type="Fixed">
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:libgit2-1_3-1.3.0-150400.3.3.1</ProductID>
        <ProductID>SUSE Linux Enterprise Module for Development Tools 15 SP4:libgit2-devel-1.3.0-150400.3.3.1</ProductID>
        <ProductID>openSUSE Leap 15.4:libgit2-1_3-1.3.0-150400.3.3.1</ProductID>
        <ProductID>openSUSE Leap 15.4:libgit2-1_3-32bit-1.3.0-150400.3.3.1</ProductID>
        <ProductID>openSUSE Leap 15.4:libgit2-devel-1.3.0-150400.3.3.1</ProductID>
      </Status>
    </ProductStatuses>
    <Threats>
      <Threat Type="Impact">
        <Description>important</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-20223283-1/</URL>
      </Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.suse.com/security/cve/CVE-2022-29187.html</URL>
        <Description>CVE-2022-29187</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1201431</URL>
        <Description>SUSE Bug 1201431</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1201794</URL>
        <Description>SUSE Bug 1201794</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1203448</URL>
        <Description>SUSE Bug 1203448</Description>
      </Reference>
    </References>
  </Vulnerability>
</cvrfdoc>
