Commit Graph

7233 Commits

Author SHA1 Message Date
AsciiWolf
0ecd2d2657 Update Czech translation 2024-09-20 17:52:41 +01:00
Simon McVittie
5a2503f1e8 Update translation files for 1.14.10 release
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.14.10
2024-08-14 14:57:39 +01:00
Simon McVittie
9ad26d7e32 NEWS, configure.ac: Update for version 1.14.10
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-14 14:45:28 +01:00
Simon McVittie
7c63e53bb2 persist directories: Pass using new bwrap --bind-fd option
Instead of passing a /proc/self/fd bind mount we use --bind-fd, which
has two advantages:
 * bwrap closes the fd when used, so it doesn't leak into the started app
 * bwrap ensures that what was mounted was the passed in fd (same dev/ino),
   as there is a small (required) gap between symlink resolve and mount
   where the target path could be replaced.

Please note that this change requires an updated version of bubblewrap.

Resolves: CVE-2024-42472, GHSA-7hgv-f2j8-xw87
[smcv: Make whitespace consistent]
Co-authored-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-14 13:45:33 +01:00
Simon McVittie
847dfb88ce build: Require a version of bubblewrap with the --bind-fd option
We need this for the --bind-fd option, which will close a race
condition in our solution to CVE-2024-42472.

In the bundled subproject, upgrade bubblewrap to version 0.6.3, which
has a backport from 0.10.0 of the required option.

For this stable branch, check the --help output for a --bind-fd option
instead of requiring a specific version number, to accommodate possible
backports in LTS distributions.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-14 13:45:04 +01:00
Alexander Larsson
db3a785241 Add test coverage for --persist
This adds three "positive" tests: the common case --persist=.persist, the
deprecated spelling --persist=/.persist, and the less common special case
--persist=. as used by Steam.

It also adds "negative" tests for CVE-2024-42472: if the --persist
directory is a symbolic link or contains path segment "..", we want that
to be rejected.

Reproduces: CVE-2024-42472, GHSA-7hgv-f2j8-xw87
[smcv: Add "positive" tests]
[smcv: Exercise --persist=..]
[smcv: Assert that --persist with a symlink produces expected message]
Co-authored-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-14 13:43:54 +01:00
Alexander Larsson
8a18137d7e Don't follow symlinks when mounting persisted directories
These directories are in a location under application control, so we
can't trust them to not be a symlink outside of the files accessibe to
the application.

Continue to treat --persist=/foo as --persist=foo for backwards compat,
since this is how it (accidentally) worked before, but print a warning.

Don't allow ".." elements in persist paths: these would not be useful
anyway, and are unlikely to be in use, however they could potentially
be used to confuse the persist path handling.

This partially addresses CVE-2024-42472. If only one instance of the
malicious or compromised app is run at a time, the vulnerability
is avoided. If two instances can run concurrently, there is a
time-of-check/time-of-use issue remaining, which can only be resolved
with changes to bubblewrap; this will be resolved in a separate commit,
because the bubblewrap dependency might be more difficult to provide in
LTS distributions.

Helps: CVE-2024-42472, GHSA-7hgv-f2j8-xw87
[smcv: Make whitespace consistent]
[smcv: Use g_warning() if unable to create --persist paths]
[smcv: Use stat() to detect symlinks and warn about them]
[smcv: Use glnx_steal_fd() for portability to older GLib]
Co-authored-by: Simon McVittie <smcv@collabora.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-14 13:43:29 +01:00
Simon McVittie
8580f3f9f8 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-08-12 18:49:32 +01:00
Simon McVittie
ddff07c6a8 doc: 1.12.x, 1.10.x are no longer security-supported
We should do a new 1.16.x soon, but after releasing that, we certainly
won't have the resources to backport security fixes beyond 1.14.x.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 251f1d58c8)
2024-08-09 17:30:53 +01:00
Georges Basile Stavracas Neto
c75855d1cd Fix typo in the NEWS file 2024-04-30 15:23:55 +01:00
Georges Basile Stavracas Neto
10a5d6e37b Update translation files for 1.14.8 1.14.8 2024-04-30 10:52:59 -03:00
Georges Basile Stavracas Neto
a2c22d772d Prepare v1.14.8 2024-04-30 10:52:59 -03:00
Georges Basile Stavracas Neto
8f4f1f6c3f Update translation files for 1.14.7 1.14.7 2024-04-29 14:15:43 -03:00
Georges Basile Stavracas Neto
0dba4fdc1b Prepare v1.14.7 2024-04-29 14:15:43 -03:00
Simon McVittie
56d37646fe Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-24 18:21:18 +01:00
Chris Williams
9c056ce8ac tests: Add a test for a leftover eol-rebase symlink
This tests the fix in the previous commit.

(cherry picked from commit be862f4989)
2024-04-24 18:20:07 +01:00
Chris Williams
46efefbf44 run: Ignore leftover eol-rebase data dir symlink
If the current app data dir is removed, flatpak would try to migrate the
symlink that it had previously created, creating a symlink loop.

Fixes: #5668
(cherry picked from commit d900529a24)
2024-04-24 18:20:07 +01:00
Simon McVittie
3f996dd822 flatpak-prune: Make sure to calculate hash in the unsigned domain
Otherwise, an out-of-bounds left shift can occur, as diagnosed by
UBSan here:

    ../../../../src/flatpak/common/flatpak-prune.c:387:14: runtime error: left shift of 253 by 24 places cannot be represented in type 'int'

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit f9cbfe1fd6)
2024-04-24 18:20:07 +01:00
Sebastian Wick
a2cad41922 dir: Reload DBus daemon config to ensure services get picked up
This is best effort. There is a 2s timeout and if something fails
everything continues on.

This is called from flatpak_dir_run_triggers because it gets called
whenever we might have changes to the exported service files.

Fixes #3342

Signed-off-by: Sebastian Wick <sebastian.wick@redhat.com>
(cherry picked from commit 9532c8d333)
2024-04-24 18:20:07 +01:00
Hubert Figuière
8ab5e9132c doc: Fix multiple validation errors in docbook.
Signed-off-by: Hubert Figuière <hub@figuiere.net>
(cherry picked from commit 56438bf542)
2024-04-24 18:20:07 +01:00
Chris Williams
b310fcee67 ps: Add gnome to background portal backend list
This is used for the active and background columns.

(cherry picked from commit cf76cb61ba)
2024-04-24 18:20:07 +01:00
Chris Williams
ee0a0f0096 profile: Unset temporary variable
Fixes: #5574
(cherry picked from commit 955d0c091a)
2024-04-24 18:20:07 +01:00
Dan Nicholson
776f89a879 run: Ensure container environment variable is used
If flatpak is run within a container manager that sets the `container`
environment variable, it will override the attempted `flatpak` value.

(cherry picked from commit 9e58442804)
2024-04-24 18:20:07 +01:00
Dan Nicholson
52b7e384a5 run: Ignore system bus failures in parental controls check
Currently if the parental controls check can't connect to the system
bus, apps are not allowed to run. However, apps are also allowed to run
if the malcontent (or accounts-service) D-Bus services aren't available.
Since it's trivial to meet that requirement by starting a temporary
dbus-daemon and setting `DBUS_SYSTEM_BUS_ADDRESS` to use it, not being
able to access the system bus at all is no less secure.

This primarily affects flatpak running in a container where D-Bus is
generally not available.

Fixes: #5076
(cherry picked from commit 3afdfd298b)
2024-04-24 18:20:07 +01:00
Dan Nicholson
45b05d1c79 tests: Skip more tests when FUSE isn't available
These tests try to install flatpaks, which fails in the system case when
FUSE isn't available to mount revokefs-fuse.

(cherry picked from commit 65bc369a9f)
2024-04-24 18:20:07 +01:00
Alice Mikhaylenko
27fceff554 dir: Fix glib criticals
(cherry picked from commit 1a5fd13ca5)
2024-04-24 18:20:07 +01:00
Simon McVittie
8a6545e1c9 tests: Fix a double-free when exercising argument parsing
g_option_context_add_group() takes ownership of the group that it's
given, so we can't also free it.

Fixes: fab0f8ed "test-context: Exercise some corner cases for merging filesystems"
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 80c1fc5f78)
2024-04-24 18:20:07 +01:00
Simon McVittie
1e4f3adaec Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-24 18:19:14 +01:00
Daniel Stone
020d279397 run: Unset more Vulkan layer/driver paths
Following on from b8d8d80c61, add more environment variables used by
the Vulkan loader which expect paths to be provided.

These paths are typically referencing the host filesystem; if the user
is referencing paths only available in the sandbox, they can use --env
or overrides for them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 18b85083b9)
2024-04-24 18:15:15 +01:00
Daniel Stone
77a7933124 run: Unset EGL driver paths
Similar to how b8d8d80c61 inhibited passthrough of environment
variables pointing the Vulkan loader towards a specific ICD, do the same
for the EGL paths used by libglvnd to discover the GL driver to use, as
well as for NVIDIA's EGLStream shim.

These paths are typically referencing the host filesystem; if the user
is referencing paths only available in the sandbox, they can use --env
or overrides for them.

Signed-off-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 0f2661045d)
2024-04-24 18:15:06 +01:00
Patrick Griffis
e93a6a439a run: Don't inherit LD_PRELOAD/LD_AUDIT from the host
I don't think this env var makes much sense to pass into the sandbox
for similar reasons to LD_LIBRARY_PATH. Libraries from the host
just aren't relevant.

Users can still pass `--env=LD_PRELOAD=/foo` to use this functionality.

(cherry picked from commit abcc001da8)
2024-04-24 18:14:53 +01:00
Simon McVittie
510b30ade5 workflows: Disable Microsoft-specific apt repository
We don't need anything from here, and its secure-apt signing is
currently broken.

Workaround-for: https://github.com/orgs/community/discussions/120966
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit d828116a12)
2024-04-24 18:14:43 +01:00
Simon McVittie
b5ee7614f0 NEWS: Retroactively add 1.14.6 release date
The release was prepared under embargo and it wasn't immediately obvious
which day it was going to be released, so I left out the release date
at the time.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-19 11:06:03 +01:00
Simon McVittie
26948d65a9 tests: Fix a misleading comment
Arguably bwrap should exit with status 127 if it can't find the
executable, but right now it exits 1, so we accept any nonzero status.
The implementation was correct, but the comment was wrong.

Fixes: 84984e49 "test-run: Add a reproducer for CVE-2024-32462"
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 0982a4a93f)
2024-04-19 11:03:15 +01:00
Simon McVittie
02c9b5cb1d workflows: Remove confusing relic from Ubuntu 18.04
Before commits 97768cea and cb655ab3, we were upgrading GLib to a
post-Ubuntu-18.04 version before running tests, to work around a GLib
bug. We no longer need to do that now that we're running everything on
Ubuntu 20.04 or later.

Fixes: cb655ab3 "check.yml: remove glib260 ppa"
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 5114df1fcb)
(cherry picked from commit 19b5e1394e67642d5d350173db5dae13e1faccc2)
2024-04-18 20:09:29 +01:00
Simon McVittie
3e1de83085 Revert "CI: Add mono apt repo to fix build"
We added this entirely unrelated apt repo to make CI work, but in fact
it now makes CI fail.

This reverts commit b6d5e20857.

(cherry picked from commit d5f891e003)
2024-04-18 20:09:20 +01:00
Simon McVittie
3344a7a72f Update translation files for 1.14.6
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.14.6
2024-04-17 19:21:14 +01:00
Simon McVittie
95168c73fe Prepare v1.14.6
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:28:27 +01:00
Simon McVittie
4dc55a80c8 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:13:14 +01:00
Simon McVittie
4fa5156efb test-run: Add a reproducer for CVE-2024-32462
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:12:30 +01:00
Alexander Larsson
b7c1a558e5 When starting non-static command using bwrap use "--"
This ensures that the command is not taken to be a bwrap option.

Resolves: CVE-2024-32462
Resolves: GHSA-phv6-cpc2-2fgj
Signed-off-by: Alexander Larsson <alexl@redhat.com>
[smcv: Fix DISABLE_SANDBOXED_TRIGGERS code path]
[smcv: Make flatpak_run_maybe_start_dbus_proxy() more obviously correct]
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-04-17 18:12:01 +01:00
Simon McVittie
2a9a668fe8 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-03-15 18:26:04 +00:00
Chris Williams
bcf0480e94 tests: Check appdata name parsing via flatpak info
Add a basic test for the extraction of appdata name and summary values
that are displayed in the flatpak UI. Also use the new developer name
syntax in the test app. This tests the fix made in previous commit.
2024-03-12 08:32:30 -05:00
Chris Williams
2cba9e3db3 appdata: exclude <name> element inside <developer>
<developer_name> has been deprecated in favor of <developer> with a
<name> child. We need to ensure that this developer name isn't parsed
as the application name.

Fixes: #5700
2024-03-12 08:32:21 -05:00
Simon McVittie
17455f97fc Automated update of translation files for 1.14.5
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.14.5
2023-12-08 12:16:10 +00:00
Simon McVittie
c68219cd71 Prepare v1.14.5
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-12-08 12:15:18 +00:00
Simon McVittie
bfa9d0fff8 Update NEWS
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-11-14 21:36:56 +00:00
Simon McVittie
4870e6ad03 portal, session-helper: Save original environment and use it for child
Otherwise, the child process will inherit GIO_USE_VFS=local, breaking
its ability to use GVfs and other GIO plugin interfaces.

Resolves: https://github.com/flatpak/flatpak/issues/5567
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 6e7eb1e19a)
2023-11-14 21:33:37 +00:00
Alberto Garcia
3ac2d5278e data: Remove all /var/tmp/flatpak-cache-* directories on boot
No one is clearing those directories so they pile up and can take a
significant amount of disk space.

Resolves: https://github.com/flatpak/flatpak/issues/1119
Signed-off-by: Alberto Garcia <berto@igalia.com>
(cherry picked from commit 14d735bfda)
2023-11-14 21:32:43 +00:00
bbhtt
1352613380 Make flatpak-metadata sections linkable
(cherry picked from commit ec3989def6)
2023-11-14 21:32:25 +00:00