flatpak: CVE-2023-28100: TIOCLINUX can send commands outside sandbox if running on a virtual console

Related Vulnerabilities: CVE-2023-28100   CVE-2017-5226  

Debian Bug report logs - #1033099
flatpak: CVE-2023-28100: TIOCLINUX can send commands outside sandbox if running on a virtual console

version graph

Reported by: Simon McVittie <smcv@debian.org>

Date: Fri, 17 Mar 2023 09:51:01 UTC

Severity: important

Tags: fixed-upstream, pending, security

Found in version flatpak/0.6.0-1

Fixed in versions flatpak/1.15.4-1, flatpak/1.14.4-1

Forwarded to https://github.com/flatpak/flatpak/security/advisories/GHSA-7qpw-3vjv-xrqp

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, team@security.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>:
Bug#1033099; Package flatpak. (Fri, 17 Mar 2023 09:51:03 GMT) (full text, mbox, link).


Acknowledgement sent to Simon McVittie <smcv@debian.org>:
New Bug report received and forwarded. Copy sent to team@security.debian.org, Utopia Maintenance Team <pkg-utopia-maintainers@lists.alioth.debian.org>. (Fri, 17 Mar 2023 09:51:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Simon McVittie <smcv@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: flatpak: CVE-2023-28100: TIOCLINUX can send commands outside sandbox if running on a virtual console
Date: Fri, 17 Mar 2023 09:49:30 +0000
Package: flatpak
Version: 0.6.0-1
Severity: important
Tags: security pending fixed-upstream
X-Debbugs-Cc: Debian Security Team <team@security.debian.org>
Forwarded: https://github.com/flatpak/flatpak/security/advisories/GHSA-7qpw-3vjv-xrqp
Control: fixed -1 1.14.4-1
Control: fixed -1 1.15.4-1

Jakub Wilk mentioned on the oss-security mailing list that various
projects' mitigations for the problematic design of the TIOCSTI ioctl are
not sufficient in all cases, because Linux virtual terminals implement
copy/paste via the TIOCLINUX ioctl, which can have a similar effect.

If a malicious Flatpak app is run on a Linux virtual console such as
/dev/tty1, it can copy text from the virtual console and paste it back
into the virtual console's input buffer, from which the command might
be run by the user's shell after the Flatpak app has exited. This is
similar to CVE-2017-5226, but using the TIOCLINUX ioctl command instead
of TIOCSTI.

This has been fixed in Flatpak upstream releases 1.14.4, 1.15.4, 1.12.8
and 1.10.8 by preventing the TIOCLINUX ioctl via a seccomp filter,
in the same way that was already done for the TIOCSTI ioctl.

Mitigation: ordinary graphical terminal emulators like xterm,
gnome-terminal and Konsole are unaffected. This vulnerability is specific
to the Linux virtual consoles /dev/tty1, /dev/tty2 and so on, which are
not commonly used to run Flatpak apps: Flatpak is primarily designed
to be used in a Wayland or X11 graphical environment, either with no
controlling terminal (the most common case) or from a graphical terminal
emulator (while debugging or developing).

Workaround: avoid running untrusted Flatpak apps (`flatpak run ...`)
from the text-mode virtual consoles.

I've already asked the security team for permission to upload 1.10.8 as
a security update for bullseye.



Marked as fixed in versions flatpak/1.14.4-1. Request was from Simon McVittie <smcv@debian.org> to submit@bugs.debian.org. (Fri, 17 Mar 2023 09:51:04 GMT) (full text, mbox, link).


Marked as fixed in versions flatpak/1.15.4-1. Request was from Simon McVittie <smcv@debian.org> to submit@bugs.debian.org. (Fri, 17 Mar 2023 09:51:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Mar 17 13:09:04 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.