<?xml version="1.0" encoding="UTF-8"?>
<cvrfdoc xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cpe="http://cpe.mitre.org/language/2.0" xmlns:cvrf="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/cvrf" xmlns:cvrf-common="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/common" xmlns:cvssv2="http://scap.nist.gov/schema/cvss-v2/1.0" xmlns:cvssv3="https://www.first.org/cvss/cvss-v3.0.xsd" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://purl.org/dc/elements/1.1/" xmlns:prod="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/prod" xmlns:scap-core="http://scap.nist.gov/schema/scap-core/1.0" xmlns:sch="http://purl.oclc.org/dsdl/schematron" xmlns:vuln="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/vuln" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/cvrf">
  <DocumentTitle xml:lang="en">Security update for flatpak</DocumentTitle>
  <DocumentType>SUSE Patch</DocumentType>
  <DocumentPublisher Type="Vendor">
    <ContactDetails>security@suse.de</ContactDetails>
    <IssuingAuthority>SUSE Security Team</IssuingAuthority>
  </DocumentPublisher>
  <DocumentTracking>
    <Identification>
      <ID>openSUSE-SU-2022:0712-1</ID>
    </Identification>
    <Status>Final</Status>
    <Version>1</Version>
    <RevisionHistory>
      <Revision>
        <Number>1</Number>
        <Date>2022-03-04T08:31:01Z</Date>
        <Description>current</Description>
      </Revision>
    </RevisionHistory>
    <InitialReleaseDate>2022-03-04T08:31:01Z</InitialReleaseDate>
    <CurrentReleaseDate>2022-03-04T08:31:01Z</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 flatpak</Note>
    <Note Title="Details" Type="General" Ordinal="2" xml:lang="en">This update for flatpak fixes the following issues:

Update to flatpak 1.10.7:

- CVE-2022-21682: Introduce new option --nofilesystem=host:reset to support flatpak-builder 1.2.2 (bsc#1194611).
- CVE-2021-43860: A malicious repository could hav sent invalid application metadata in a way that hides some of the app permissions displayed during installation (bsc#1194610).
</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">openSUSE-SLE-15.3-2022-712</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://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/T4OG73MX3JPZBHYMUXUULPTVL7ZOOTZ5/</URL>
      <Description>E-Mail link for openSUSE-SU-2022:0712-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/1194610</URL>
      <Description>SUSE Bug 1194610</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://bugzilla.suse.com/1194611</URL>
      <Description>SUSE Bug 1194611</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/security/cve/CVE-2021-43860/</URL>
      <Description>SUSE CVE CVE-2021-43860 page</Description>
    </Reference>
    <Reference Type="Self">
      <URL>https://www.suse.com/security/cve/CVE-2022-21682/</URL>
      <Description>SUSE CVE CVE-2022-21682 page</Description>
    </Reference>
  </DocumentReferences>
  <ProductTree xmlns="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/prod">
    <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 Version" Name="flatpak-1.10.7-4.12.1">
      <FullProductName ProductID="flatpak-1.10.7-4.12.1">flatpak-1.10.7-4.12.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="flatpak-devel-1.10.7-4.12.1">
      <FullProductName ProductID="flatpak-devel-1.10.7-4.12.1">flatpak-devel-1.10.7-4.12.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="flatpak-zsh-completion-1.10.7-4.12.1">
      <FullProductName ProductID="flatpak-zsh-completion-1.10.7-4.12.1">flatpak-zsh-completion-1.10.7-4.12.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="libflatpak0-1.10.7-4.12.1">
      <FullProductName ProductID="libflatpak0-1.10.7-4.12.1">libflatpak0-1.10.7-4.12.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="system-user-flatpak-1.10.7-4.12.1">
      <FullProductName ProductID="system-user-flatpak-1.10.7-4.12.1">system-user-flatpak-1.10.7-4.12.1</FullProductName>
    </Branch>
    <Branch Type="Product Version" Name="typelib-1_0-Flatpak-1_0-1.10.7-4.12.1">
      <FullProductName ProductID="typelib-1_0-Flatpak-1_0-1.10.7-4.12.1">typelib-1_0-Flatpak-1_0-1.10.7-4.12.1</FullProductName>
    </Branch>
    <Relationship ProductReference="flatpak-1.10.7-4.12.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.3">
      <FullProductName ProductID="openSUSE Leap 15.3:flatpak-1.10.7-4.12.1">flatpak-1.10.7-4.12.1 as a component of openSUSE Leap 15.3</FullProductName>
    </Relationship>
    <Relationship ProductReference="flatpak-devel-1.10.7-4.12.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.3">
      <FullProductName ProductID="openSUSE Leap 15.3:flatpak-devel-1.10.7-4.12.1">flatpak-devel-1.10.7-4.12.1 as a component of openSUSE Leap 15.3</FullProductName>
    </Relationship>
    <Relationship ProductReference="flatpak-zsh-completion-1.10.7-4.12.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.3">
      <FullProductName ProductID="openSUSE Leap 15.3:flatpak-zsh-completion-1.10.7-4.12.1">flatpak-zsh-completion-1.10.7-4.12.1 as a component of openSUSE Leap 15.3</FullProductName>
    </Relationship>
    <Relationship ProductReference="libflatpak0-1.10.7-4.12.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.3">
      <FullProductName ProductID="openSUSE Leap 15.3:libflatpak0-1.10.7-4.12.1">libflatpak0-1.10.7-4.12.1 as a component of openSUSE Leap 15.3</FullProductName>
    </Relationship>
    <Relationship ProductReference="system-user-flatpak-1.10.7-4.12.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.3">
      <FullProductName ProductID="openSUSE Leap 15.3:system-user-flatpak-1.10.7-4.12.1">system-user-flatpak-1.10.7-4.12.1 as a component of openSUSE Leap 15.3</FullProductName>
    </Relationship>
    <Relationship ProductReference="typelib-1_0-Flatpak-1_0-1.10.7-4.12.1" RelationType="Default Component Of" RelatesToProductReference="openSUSE Leap 15.3">
      <FullProductName ProductID="openSUSE Leap 15.3:typelib-1_0-Flatpak-1_0-1.10.7-4.12.1">typelib-1_0-Flatpak-1_0-1.10.7-4.12.1 as a component of openSUSE Leap 15.3</FullProductName>
    </Relationship>
  </ProductTree>
  <vuln:Vulnerability xmlns="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/vuln" Ordinal="1">
    <Notes>
      <Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">Flatpak is a Linux application sandboxing and distribution framework. Prior to versions 1.12.3 and 1.10.6, Flatpak doesn't properly validate that the permissions displayed to the user for an app at install time match the actual permissions granted to the app at runtime, in the case that there's a null byte in the metadata file of an app. Therefore apps can grant themselves permissions without the consent of the user. Flatpak shows permissions to the user during install by reading them from the "xa.metadata" key in the commit metadata. This cannot contain a null terminator, because it is an untrusted GVariant. Flatpak compares these permissions to the *actual* metadata, from the "metadata" file to ensure it wasn't lied to. However, the actual metadata contents are loaded in several places where they are read as simple C-style strings. That means that, if the metadata file includes a null terminator, only the content of the file from *before* the terminator gets compared to xa.metadata. Thus, any permissions that appear in the metadata file after a null terminator are applied at runtime but not shown to the user. So maliciously crafted apps can give themselves hidden permissions. Users who have Flatpaks installed from untrusted sources are at risk in case the Flatpak has a maliciously crafted metadata file, either initially or in an update. This issue is patched in versions 1.12.3 and 1.10.6. As a workaround, users can manually check the permissions of installed apps by checking the metadata file or the xa.metadata key on the commit metadata.</Note>
    </Notes>
    <CVE>CVE-2021-43860</CVE>
    <ProductStatuses>
      <Status Type="Fixed">
        <ProductID>openSUSE Leap 15.3:flatpak-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:flatpak-devel-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:flatpak-zsh-completion-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:libflatpak0-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:system-user-flatpak-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:typelib-1_0-Flatpak-1_0-1.10.7-4.12.1</ProductID>
      </Status>
    </ProductStatuses>
    <Threats>
      <Threat Type="Impact">
        <Description>important</Description>
      </Threat>
    </Threats>
    <CVSSScoreSets>
      <ScoreSetV2>
        <BaseScoreV2>6.8</BaseScoreV2>
        <VectorV2>AV:N/AC:M/Au:N/C:P/I:P/A:P</VectorV2>
      </ScoreSetV2>
      <ScoreSetV3>
        <BaseScoreV3>8.2</BaseScoreV3>
        <VectorV3>CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N</VectorV3>
      </ScoreSetV3>
    </CVSSScoreSets>
    <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://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/T4OG73MX3JPZBHYMUXUULPTVL7ZOOTZ5/</URL>
      </Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.suse.com/security/cve/CVE-2021-43860.html</URL>
        <Description>CVE-2021-43860</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1194610</URL>
        <Description>SUSE Bug 1194610</Description>
      </Reference>
    </References>
  </vuln:Vulnerability>
  <vuln:Vulnerability xmlns="http://docs.oasis-open.org/csaf/ns/csaf-cvrf/v1.2/vuln" Ordinal="2">
    <Notes>
      <Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">Flatpak is a Linux application sandboxing and distribution framework. A path traversal vulnerability affects versions of Flatpak prior to 1.12.3 and 1.10.6. flatpak-builder applies `finish-args` last in the build. At this point the build directory will have the full access that is specified in the manifest, so running `flatpak build` against it will gain those permissions. Normally this will not be done, so this is not problem. However, if `--mirror-screenshots-url` is specified, then flatpak-builder will launch `flatpak build --nofilesystem=host appstream-utils mirror-screenshots` after finalization, which can lead to issues even with the `--nofilesystem=host` protection. In normal use, the only issue is that these empty directories can be created wherever the user has write permissions. However, a malicious application could replace the `appstream-util` binary and potentially do something more hostile. This has been resolved in Flatpak 1.12.3 and 1.10.6 by changing the behaviour of `--nofilesystem=home` and `--nofilesystem=host`.</Note>
    </Notes>
    <CVE>CVE-2022-21682</CVE>
    <ProductStatuses>
      <Status Type="Fixed">
        <ProductID>openSUSE Leap 15.3:flatpak-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:flatpak-devel-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:flatpak-zsh-completion-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:libflatpak0-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:system-user-flatpak-1.10.7-4.12.1</ProductID>
        <ProductID>openSUSE Leap 15.3:typelib-1_0-Flatpak-1_0-1.10.7-4.12.1</ProductID>
      </Status>
    </ProductStatuses>
    <Threats>
      <Threat Type="Impact">
        <Description>moderate</Description>
      </Threat>
    </Threats>
    <CVSSScoreSets>
      <ScoreSetV2>
        <BaseScoreV2>4</BaseScoreV2>
        <VectorV2>AV:N/AC:L/Au:S/C:N/I:P/A:N</VectorV2>
      </ScoreSetV2>
      <ScoreSetV3>
        <BaseScoreV3>6.5</BaseScoreV3>
        <VectorV3>CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N</VectorV3>
      </ScoreSetV3>
    </CVSSScoreSets>
    <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://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/thread/T4OG73MX3JPZBHYMUXUULPTVL7ZOOTZ5/</URL>
      </Remediation>
    </Remediations>
    <References>
      <Reference>
        <URL>https://www.suse.com/security/cve/CVE-2022-21682.html</URL>
        <Description>CVE-2022-21682</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1194611</URL>
        <Description>SUSE Bug 1194611</Description>
      </Reference>
      <Reference>
        <URL>https://bugzilla.suse.com/1194703</URL>
        <Description>SUSE Bug 1194703</Description>
      </Reference>
    </References>
  </vuln:Vulnerability>
</cvrfdoc>
