[Pkg-utopia-maintainers] Bug#1033099: flatpak: CVE-2023-28100: TIOCLINUX can send commands outside sandbox if running on a virtual console

Simon McVittie smcv at debian.org
Fri Mar 17 09:49:30 GMT 2023


Package: flatpak
Version: 0.6.0-1
Severity: important
Tags: security pending fixed-upstream
X-Debbugs-Cc: Debian Security Team <team at 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.



More information about the Pkg-utopia-maintainers mailing list