Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2024-42472

Опубликовано: 14 авг. 2024
Источник: redhat
CVSS3: 7.4

Описание

Flatpak is a Linux application sandboxing and distribution framework. Prior to versions 1.14.0 and 1.15.10, a malicious or compromised Flatpak app using persistent directories could access and write files outside of what it would otherwise have access to, which is an attack on integrity and confidentiality. When persistent=subdir is used in the application permissions (represented as --persist=subdir in the command-line interface), that means that an application which otherwise doesn't have access to the real user home directory will see an empty home directory with a writeable subdirectory subdir. Behind the scenes, this directory is actually a bind mount and the data is stored in the per-application directory as ~/.var/app/$APPID/subdir. This allows existing apps that are not aware of the per-application directory to still work as intended without general home directory access. However, the application does have write access to the application directory ~/.var/app/$APPID where this directory is stored. If the source directory for the persistent/--persist option is replaced by a symlink, then the next time the application is started, the bind mount will follow the symlink and mount whatever it points to into the sandbox. Partial protection against this vulnerability can be provided by patching Flatpak using the patches in commits ceec2ffc and 98f79773. However, this leaves a race condition that could be exploited by two instances of a malicious app running in parallel. Closing the race condition requires updating or patching the version of bubblewrap that is used by Flatpak to add the new --bind-fd option using the patch and then patching Flatpak to use it. If Flatpak has been configured at build-time with -Dsystem_bubblewrap=bwrap (1.15.x) or --with-system-bubblewrap=bwrap (1.14.x or older), or a similar option, then the version of bubblewrap that needs to be patched is a system copy that is distributed separately, typically /usr/bin/bwrap. This configuration is the one that is typically used in Linux distributions. If Flatpak has been configured at build-time with -Dsystem_bubblewrap= (1.15.x) or with --without-system-bubblewrap (1.14.x or older), then it is the bundled version of bubblewrap that is included with Flatpak that must be patched. This is typically installed as /usr/libexec/flatpak-bwrap. This configuration is the default when building from source code. For the 1.14.x stable branch, these changes are included in Flatpak 1.14.10. The bundled version of bubblewrap included in this release has been updated to 0.6.3. For the 1.15.x development branch, these changes are included in Flatpak 1.15.10. The bundled version of bubblewrap in this release is a Meson "wrap" subproject, which has been updated to 0.10.0. The 1.12.x and 1.10.x branches will not be updated for this vulnerability. Long-term support OS distributions should backport the individual changes into their versions of Flatpak and bubblewrap, or update to newer versions if their stability policy allows it. As a workaround, avoid using applications using the persistent (--persist) permission.

A sandbox escape vulnerability was found in Flatpak due to a symlink-following issue when mounting persistent directories. This flaw allows a local user or attacker to craft a symbolic link that can bypass the intended restrictions, enabling access to and modification of files outside the designated sandbox. As a result, the attacker could potentially manipulate the file system, leading to unauthorized actions that compromise the security and integrity of the system.

Отчет

This vulnerability in Flatpak represents a significant severity issue due to its potential to undermine the core principles of application sandboxing, which are designed to isolate applications and protect the integrity and confidentiality of the system. By exploiting the persistent=subdir option, a malicious or compromised application can manipulate bind mounts via symlinks, thereby escaping the confines of its designated sandbox. This allows unauthorized access to the host filesystem, enabling the potential for unauthorized data manipulation, exfiltration, or system compromise. The risk is further exacerbated by the presence of a race condition, which can be exploited by running multiple instances of a malicious app concurrently.

Меры по смягчению последствий

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Ansible Automation Platform 1.2bubblewrapUnder investigation
Red Hat OpenShift Container Platform 4rhcosNot affected
Red Hat Enterprise Linux 7 Extended Lifecycle SupportflatpakFixedRHSA-2024:641705.09.2024
Red Hat Enterprise Linux 8bubblewrapFixedRHSA-2024:642205.09.2024
Red Hat Enterprise Linux 8flatpakFixedRHSA-2024:642205.09.2024
Red Hat Enterprise Linux 8bubblewrapFixedRHSA-2024:642205.09.2024
Red Hat Enterprise Linux 8flatpakFixedRHSA-2024:642205.09.2024
Red Hat Enterprise Linux 8.2 Advanced Update SupportbubblewrapFixedRHSA-2024:642005.09.2024
Red Hat Enterprise Linux 8.2 Advanced Update SupportflatpakFixedRHSA-2024:642005.09.2024
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update SupportbubblewrapFixedRHSA-2024:641805.09.2024

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-74
https://bugzilla.redhat.com/show_bug.cgi?id=2305202flatpak: Access to files outside sandbox for apps using persistent= (--persist)

7.4 High

CVSS3

Связанные уязвимости

CVSS3: 10
ubuntu
10 месяцев назад

Flatpak is a Linux application sandboxing and distribution framework. Prior to versions 1.14.0 and 1.15.10, a malicious or compromised Flatpak app using persistent directories could access and write files outside of what it would otherwise have access to, which is an attack on integrity and confidentiality. When `persistent=subdir` is used in the application permissions (represented as `--persist=subdir` in the command-line interface), that means that an application which otherwise doesn't have access to the real user home directory will see an empty home directory with a writeable subdirectory `subdir`. Behind the scenes, this directory is actually a bind mount and the data is stored in the per-application directory as `~/.var/app/$APPID/subdir`. This allows existing apps that are not aware of the per-application directory to still work as intended without general home directory access. However, the application does have write access to the application directory `~/.var/app/$APPI...

CVSS3: 10
nvd
10 месяцев назад

Flatpak is a Linux application sandboxing and distribution framework. Prior to versions 1.14.0 and 1.15.10, a malicious or compromised Flatpak app using persistent directories could access and write files outside of what it would otherwise have access to, which is an attack on integrity and confidentiality. When `persistent=subdir` is used in the application permissions (represented as `--persist=subdir` in the command-line interface), that means that an application which otherwise doesn't have access to the real user home directory will see an empty home directory with a writeable subdirectory `subdir`. Behind the scenes, this directory is actually a bind mount and the data is stored in the per-application directory as `~/.var/app/$APPID/subdir`. This allows existing apps that are not aware of the per-application directory to still work as intended without general home directory access. However, the application does have write access to the application directory `~/.var/app/$APPID`

CVSS3: 10
debian
10 месяцев назад

Flatpak is a Linux application sandboxing and distribution framework. ...

suse-cvrf
9 месяцев назад

Security update for bubblewrap and flatpak

suse-cvrf
10 месяцев назад

Security update for bubblewrap and flatpak

7.4 High

CVSS3