6615 Commits

Author SHA1 Message Date
Simon McVittie
96aafda476 Regenerate .po files for release
Signed-off-by: Simon McVittie <smcv@collabora.com>
1.12.2
2021-10-12 11:16:30 +01:00
Simon McVittie
f4db077a52 Set version number to 1.12.2
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-12 10:54:34 +01:00
Simon McVittie
666dc8dbcd NEWS: Add changes so far for 1.12.2
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-11 14:17:28 +01:00
Simon McVittie
486b978b44 NEWS: Clarify the user-facing feature enabled by improved subsandboxing
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-11 14:11:47 +01:00
Simon McVittie
ff0c48c780 NEWS: Mention CVE-2021-41133
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-11 14:11:23 +01:00
Simon McVittie
89fb54123a NEWS: Clarify what was fixed in 1.12.1
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-11 14:11:02 +01:00
Simon McVittie
72c38fe0bd common: Backport g_get_language_names_with_category() more thoroughly
Even though we are going to check all the `LC_*` environment variables,
if one of them is not set, we still need to consider LANGUAGE, LC_ALL
and LANG; there is no guarantee that *every* `LC_*` environment variable
is set (and in particular, during our build-time tests, they will usually
not be).

Resolves: https://github.com/flatpak/flatpak/issues/4471
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit ae59fb7aca)
2021-10-11 09:52:48 +02:00
Simon McVittie
bd2c58fc27 run: Improve error handling/diagnostics for calls into libseccomp
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 53bde36585)
2021-10-11 09:52:48 +02:00
Simon McVittie
97e128c2c1 Fix handling of syscalls only allowed by --devel
This was incorrectly looking at errno instead of -r.

Fixes: 0b38b0f0 "run: Handle unknown syscalls as intended"
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 3fc8c67267)
2021-10-11 09:52:48 +02:00
Piotr Drąg
946dd5d8a8 Update Polish translation 2021-10-11 09:44:42 +02:00
Phaedrus Leeds
03f525b92d NEWS: Fix typo of 1.12.0 2021-10-08 22:35:21 +01:00
Phaedrus Leeds
cbbe6a106a NEWS: Fix a typo 2021-10-08 22:35:21 +01:00
Alexander Larsson
afb3575d31 Update pofiles for release 1.12.1 2021-10-08 19:12:18 +02:00
Alexander Larsson
f968334ea3 Bump version to 1.2.1 2021-10-08 18:58:28 +02:00
Simon McVittie
270701f900 run: Handle unknown syscalls as intended
The error-handling here was

    if (r < 0 && r == -EFAULT)

but Alex says it was almost certainly intended to be

    if (r < 0 && r != -EFAULT)

so that syscalls not known to libseccomp are not a fatal error.

Instead of literally making that change, emit a debug message on -EFAULT
so we can see what is going on.

This temporarily weakens our defence against CVE-2021-41133
(GHSA-67h7-w3jq-vh4q) in order to avoid regressions: if the installed
version of libseccomp does not know about the recently-added syscalls,
but the kernel does, then we will not prevent non-native executables
from using those syscalls.

Resolves: https://github.com/flatpak/flatpak/issues/4458
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit d419fa6703)
2021-10-08 18:44:18 +02:00
Alexander Larsson
0cfd72442d Update pofiles for release 1.12.0 2021-10-08 13:20:58 +02:00
Alexander Larsson
48b808e4c2 Bump version to 1.12.0 2021-10-08 12:53:20 +02:00
Alexander Larsson
d8b8dff670 Update NEWS for release 2021-10-08 12:53:20 +02:00
Simon McVittie
462fca2c66 run: Don't allow chroot()
If we don't allow pivot_root() then there seems no reason why we should
allow chroot().

Partially fixes GHSA-67h7-w3jq-vh4q.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-08 12:53:20 +02:00
Simon McVittie
1330662f33 run: Don't allow unmounting filesystems
If we don't allow mounting filesystems, we shouldn't allow unmounting
either.

Partially fixes GHSA-67h7-w3jq-vh4q.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-08 12:53:20 +02:00
Simon McVittie
4c34815784 run: Block setns()
If we don't allow unshare() or clone() with CLONE_NEWUSER, we also
shouldn't allow joining an existing (but different) namespace.

Partially fixes GHSA-67h7-w3jq-vh4q.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-08 12:53:20 +02:00
Simon McVittie
9766ee05b1 run: Disallow recently-added mount-manipulation syscalls
If we don't allow mount() then we shouldn't allow these either.

Partially fixes GHSA-67h7-w3jq-vh4q.

Thanks: an anonymous reporter
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-08 12:53:20 +02:00
Simon McVittie
a10f52a756 run: Block clone3() in sandbox
clone3() can be used to implement clone() with CLONE_NEWUSER, allowing
a sandboxed process to get CAP_SYS_ADMIN in a new namespace and
manipulate its root directory. We need to block this so that AF_UNIX-based
socket servers (X11, Wayland, etc.) can rely on
/proc/PID/root/.flatpak-info existing for all Flatpak-sandboxed apps.

Partially fixes GHSA-67h7-w3jq-vh4q.

Thanks: an anonymous reporter
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-08 12:53:20 +02:00
Simon McVittie
26b12484eb common: Add a list of recently-added Linux syscalls
Historically, syscalls could take arbitrarily-different values on
different architectures, but new syscalls are added with syscall numbers
that align on each architecture.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-08 12:53:20 +02:00
Simon McVittie
89ae9fe74c run: Add cross-references for some other seccomp syscall filters
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-08 12:53:20 +02:00
Simon McVittie
e26ac7586c run: Add an errno value to seccomp filters
At the moment, if we block a syscall we always make it fail with EPERM,
but this is risky: user-space libraries can start to use new replacements
for old syscalls at any time, and will often treat EPERM as a fatal error.
For new syscalls, we should make the syscall fail with ENOSYS, which is
indistinguishable from running on an older kernel and will cause fallback
to an older implementation, for example clone3() to clone().

In future we should probably move from EPERM to ENOSYS for some of the
syscalls we already block, but for now keep the status quo.

This is a prerequisite for fixing the vulnerability tracked as
GHSA-67h7-w3jq-vh4q.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-10-08 12:53:20 +02:00
Alexander Larsson
9914dff925 tests: Fix test-sideload.sh if ostree is built with curl backend
The soup backend and the curl backend give slightly different error
messages, so we need to tweak the 404 assert check to match both.
2021-10-08 12:05:22 +02:00
Bartłomiej Piotrowski
3be48f3098 icon-validator: Mount ld.so.cache only if it exists
On musl-based systems, /etc/ld.so.cache does not exist, causing icon validation to fail.

This has been improperly reported at [1] instead of Flatpak repo.

[1] https://github.com/flathub/com.valvesoftware.Steam/issues/638
2021-10-04 09:07:35 +02:00
Philip Withnall
90e6c723d6 Merge pull request #4436 from pwithnall/4418-fix-parental-controls
flatpak-dir: Fix parental controls checks for root
2021-09-29 11:38:45 +01:00
Philip Withnall
8cb27763fc flatpak-dir: Fix parental controls checks for root
These checks were broken in commit d762a2f, as the commit failed to
consider the fact that `flatpak_dir_check_parental_controls()` is run
both in the `flatpak` CLI process run by the user, but also in the
`flatpak-system-helper` process which always runs as root, and which
handles any installations done on the system repository.

As a result, parental controls were not working for the system
repository.

Fix that by limiting the scope of the check to only pass if running
without the system helper. flatpak calls from root never go through the
system helper.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #4418
2021-09-28 13:38:48 +01:00
Alexander Larsson
b4e838a0fd Drop old-glib ci test as ubuntu 16.04 is no longer available
As per https://github.com/actions/virtual-environments/issues/3287
the support for ubuntu-16.04 stopped working on september 20:th, so
our CI job stopped starting.
2021-09-23 13:25:02 +02:00
gasinvein
9962b6bc1a run: Get gai.conf from session helper 2021-09-23 09:58:27 +02:00
gasinvein
38c03dff32 session-helper: Monitor gai.conf 2021-09-23 09:58:27 +02:00
Richard Maw
a96e9af37f Handle /var/tmp mounts when it is a symlink
In Yocto systems /var/tmp is a symlink to /var/volatile/tmp
because in its implementation of read-only rootfs /var is read-only
so /var/volatile is mounted as a tmpfs
and a subset of the paths point into it.

This would result in flatpak emitting mount arguments of
`--symlink ../var/volatile/tmp /var/tmp --bind /var/volatile/tmp /var/volatile/tmp`
which fails because flatpak has already added `--dir /var/tmp`
and the call to symlink fails with EEXIST.

This is fixed by blacklisting /var/tmp from symlink exports
in the same way /tmp is, so the bind is emitted as
`--bind /var/tmp /var/tmp`, which results in /var/volatile/tmp
being mounted into /var/tmp.
2021-09-23 09:57:33 +02:00
Ryan Gonzalez
86659a2bfb repair: Fix incorrect progress when refs are skipped
Issue was shown in this comment:

https://github.com/flatpak/flatpak/issues/3542#issuecomment-917497591
2021-09-17 09:25:29 +02:00
Ryan Gonzalez
f15f926284 Retrieve user languages for all locale categories
g_get_language_names() only returns the language names for the
LC_MESSAGES category, so mixed locale scenarios would result in missing
languages. Now, the languages are listed for each individual category.

Note that this issue was only present with the user installation. For
the system installation, the locales were queried from localed, and all
categories were checked.

In order to work on GLib versions < 2.58, the code to get language
names for a category has been backported.

Fixes #3712.
2021-09-17 09:23:52 +02:00
Kukuh Syafaat
a69f891f26 Update Indonesian translation 2021-09-17 08:59:17 +02:00
Simon McVittie
25e3952923 security policy: Specifically mention not reporting via Matrix
The Matrix room is just as public as the old IRC channel, which makes it
just as unsuitable for reporting security vulnerabilities as IRC.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-09-14 17:25:57 +01:00
Seth Falco
2b2cecb07a fix: link to matrix chat
Resolves: https://github.com/flatpak/flatpak/pull/4413
2021-09-14 17:23:20 +01:00
Simon McVittie
129077493d security policy: Fix capitalization of GitHub
Thanks: @SethFalco
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-09-14 17:21:15 +01:00
Seppo Yli-Olli
a99b748931 Support dynamic export path into scripts
When flatpak-builder is running under flatpak, its
path will be /app/bin/flatpak. This path must not
be in export scripts or desktop file. This change
makes it possible for flatpak-builder flatpak to
tell flatpak what it should write to generated
files
2021-09-10 11:32:51 +02:00
Rodhos
4aa39521a9 Update es.po (#4396)
* Update es.po
2021-09-10 11:14:43 +02:00
AsciiWolf
bb20924f87 Update Czech translation 2021-09-01 08:41:45 +02:00
Phaedrus Leeds
0c68b958e4 Merge pull request #4386 from smcv/autopkgtest-xrd
tests: Don't reset XDG_RUNTIME_DIR locally
2021-08-26 19:53:21 -07:00
Simon McVittie
7bf6ecfaa2 tests: Don't reset XDG_RUNTIME_DIR locally
If we do, it interferes with xdg-dbus-proxy, causing test failure under
some circumstances: the test passes on a development system, but fails
when run on a qemu virtual machine in Debian's autopkgtest framework.

Fixes: 6e5b02e2 "run: Don't let XDG_RUNTIME_DIR from user override the value we set"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-26 21:40:16 +01:00
Phaedrus Leeds
dac93eecbc Merge pull request #4385 from smcv/capsh-path
libtest: Make sure ldconfig and capsh are in the PATH
2021-08-26 09:16:07 -07:00
Phaedrus Leeds
da76e95c91 Merge pull request #4384 from smcv/make-makefiles-ignorable
build: Move Makefile-*.am.inc up one level
2021-08-26 09:08:12 -07:00
Simon McVittie
21a5fe5ff1 libtest: Make sure ldconfig and capsh are in the PATH
This gives us better test coverage on Debian derivatives.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-26 12:55:46 +01:00
Simon McVittie
33bb8a85ec build: Move Makefile-*.am.inc up one level
This takes them out of the directory that is "owned" by the subproject,
which will not be ignoring our Flatpak-specific generated files in
its .gitignore, and puts them in a directory that is "owned" by Flatpak,
which can ignore them.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-26 11:50:05 +01:00
Simon McVittie
b246dc00e5 Fix spelling
Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-08-25 16:58:10 +01:00