Bug 1180996 (CVE-2021-21261)

Summary: VUL-0: CVE-2021-21261: flatpak: sandbox escape via spawn portal
Product: [Novell Products] SUSE Security Incidents Reporter: Alexandros Toptsoglou <atoptsoglou>
Component: IncidentsAssignee: E-mail List <gnome-bugs>
Status: NEW --- QA Contact: Security Team bot <security-team>
Severity: Major    
Priority: P3 - Medium CC: gabriele.sonnu, gnome-bugs, smash_bz
Version: unspecifiedFlags: gabriele.sonnu: needinfo? (gnome-bugs)
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/275609/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-21261:7.3:(AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Alexandros Toptsoglou 2021-01-15 17:12:12 UTC

Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. A bug was discovered in the `flatpak-portal` service that can allow sandboxed applications to execute arbitrary code on the host system (a sandbox escape). This sandbox-escape bug is present in versions from 0.11.4 and before fixed versions 1.8.5 and 1.9.4. The Flatpak portal D-Bus service (`flatpak-portal`, also known by its D-Bus service name `org.freedesktop.portal.Flatpak`) allows apps in a Flatpak sandbox to launch their own subprocesses in a new sandbox instance, either with the same security settings as the caller or with more restrictive security settings. For example, this is used in Flatpak-packaged web browsers such as Chromium to launch subprocesses that will process untrusted web content, and give those subprocesses a more restrictive sandbox than the browser itself. In vulnerable versions, the Flatpak portal service passes caller-specified environment variables to non-sandboxed processes on the host system, and in particular to the `flatpak run` command that is used to launch the new sandbox instance. A malicious or compromised Flatpak app could set environment variables that are trusted by the `flatpak run` command, and use them to execute arbitrary code that is not in a sandbox. As a workaround, this vulnerability can be mitigated by preventing the `flatpak-portal` service from starting, but that mitigation will prevent many Flatpak apps from working correctly. This is fixed in versions 1.8.5 and 1.9.4.

Comment 1 Alexandros Toptsoglou 2021-01-15 17:13:39 UTC
Tracked SLE15-SP1 and 15-SP2 as affected. Also Factory needs to be upgraded to 1.8.5
Comment 2 OBSbugzilla Bot 2021-01-26 11:20:08 UTC
This is an autogenerated message for OBS integration:
This bug (1180996) was mentioned in
https://build.opensuse.org/request/show/866804 Factory / flatpak
Comment 6 Swamp Workflow Management 2021-04-07 16:15:51 UTC
SUSE-SU-2021:1094-1: An update that solves one vulnerability, contains one feature and has three fixes is now available.

Category: security (important)
Bug References: 1133120,1133124,1175899,1180996
CVE References: CVE-2021-21261
JIRA References: SLE-7171
Sources used:
SUSE Linux Enterprise Module for Desktop Applications 15-SP2 (src):    flatpak-1.10.2-4.6.1, libostree-2020.8-3.3.2, xdg-desktop-portal-1.8.0-5.3.2, xdg-desktop-portal-gtk-1.8.0-3.3.1
SUSE Linux Enterprise Module for Basesystem 15-SP2 (src):    libostree-2020.8-3.3.2

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 7 Swamp Workflow Management 2021-04-09 04:19:09 UTC
openSUSE-SU-2021:0520-1: An update that solves one vulnerability and has three fixes is now available.

Category: security (important)
Bug References: 1133120,1133124,1175899,1180996
CVE References: CVE-2021-21261
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    flatpak-1.10.2-lp152.3.6.1, libostree-2020.8-lp152.2.3.1, xdg-desktop-portal-1.8.0-lp152.4.3.1, xdg-desktop-portal-gtk-1.8.0-lp152.2.3.1