Fedora Account System
Red Hat Associate
Red Hat Customer
If an app, runtime or extension installed system-wide uses the Flatpak extra-data mechanism, and its apply_extra program creates a very deeply nested directory hierarchy, flatpak-system-helper can fail while canonicalizing permissions (for example with EMFILE when exceeding open-file limits). In affected versions, that failure path can still be treated as success, leaving a setuid-root executable under /var/lib/flatpak whose setuid bit was not cleared. A local user cooperating with a malicious or compromised system-wide app/runtime/extension, or an app that can already run code as the user, can use that executable to escalate to root. Fixed in Flatpak 1.18.6 and 1.19.4 (1.18.5/1.19.3 tags also contain the fix but those releases failed and were superseded). Backports exist on the unsupported flatpak-1.16.x git branch; there is no formal upstream 1.16.x security release.