5229 Commits

Author SHA1 Message Date
Michael Vogt
169c60d6f9 Merge pull request #10777 from alfonsosanchezbeato/mm-add-pcie
interfaces/modem-manager: add access to PCIe modems
2021-10-04 17:48:40 +02:00
Michael Vogt
a79e60b1cb Merge pull request #9773 from bboozzoo/bboozzoo/apparmor-no-profile-update-when-no-profile-for-sc
interfaces/apparmor: do not fail during initialization when there is no AppArmor profile for snap-confine
2021-09-28 15:56:54 +02:00
Michael Vogt
c9424519b8 Merge pull request #10571 from jhenstridge/themes-api-access-check
daemon: implement access checkers for themes API
2021-09-28 15:54:39 +02:00
Michael Vogt
d59c6ce1eb Merge pull request #10845 from bboozzoo/bboozzoo/allow-clone3-default-seccomp
interfaces/seccomp: add clone3 to default template
2021-09-28 08:52:05 +02:00
Olivier Tilloy
aa360302c5 interfaces/u2f-devices: add GoTrust Idem Key (https://launchpad.net/bugs/1945182) 2021-09-27 18:33:40 +02:00
Maciej Borzecki
999c2e61f0 interfaces/seccomp: add clone3 to default template
Recent combinations of Go 1.17, glibc 2.34 and Linux 5.14 ended up triggering
pthread_create() code paths that try to use clone3() syscall when executing
snap-exec. Since snap-exec runs under the seccomp profile of the application,
make sure that clone3 is allowed in the default template. Also, applications may
trigger this code path themselves anyway.

The strace output when this fails looks like this:

mprotect(0x7f4ad3ea2000, 8388608, PROT_READ|PROT_WRITE) = 0
rt_sigprocmask(SIG_BLOCK, ~[], ~[KILL STOP RTMIN RT_1], 8) = 0
syscall_435(0x7ffc466b4c60, 0x58, 0x58b300, 0x8, 0x7f4ad46a1640, 0x7ffc466b4d4f) = -1 (errno 1)
rt_sigprocmask(SIG_SETMASK, ~[KILL STOP RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(2, "runtime/cgo: ", 13runtime/cgo: )           = 13
write(2, "pthread_create failed: Operation not permitted", 46pthread_create
failed: Operation not permitted) = 46

Where syscall 435 is also known as clone3:

$ scmp_sys_resolver 435
clone3

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-27 12:00:53 +02:00
Michael Vogt
d27bd613f4 Merge pull request #10841 from anonymouse64/bugfix/dsp-ambarella-moar
interfaces/dsp: add a usb rule to the ambarella flavor
2021-09-27 09:18:48 +02:00
Ian Johnson
8356a8cb69 interfaces/apparmor/template.go: allow inspection of dbus mediation level
This does not leak any information since an app could always try to send dbus
messages and see what fails to perform the same inspection, but this helps
eliminate some messages when using i.e. dbus-run-session legitimately for some
applications.

See also the thread on https://forum.snapcraft.io/t/how-to-use-dbus-run-session-on-ubuntu-core/7077/3

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-24 09:08:32 -05:00
Ian Johnson
3524f9484c interfaces/dsp: add a usb rule to the ambarella flavor
This is needed as per a recent customer ticket, see SF ticket #00319598 for
more details.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-24 09:00:39 -05:00
James Henstridge
97c5d9cd6f Merge remote-tracking branch 'upstream/master' into themes-api-access-check 2021-09-24 12:59:56 +08:00
Michael Vogt
9e0a1807b3 Merge pull request #10803 from bboozzoo/bboozzoo/cgroupv2-test-and-systems
tests, interfaces/builtin: introduce 21.10 cgroupv2 variant, tweak tests for cgroupv2, update builtin interfaces
2021-09-22 16:46:22 +02:00
Ian Johnson
9e9bdee1b5 interfaces/builtin/opengl.go: add libOpenGL.so* too
This was added a long time ago to the NVIDIA mount support in snap-confine, so
we mount it there, but we never added it to the policy allowing it.

See https://forum.snapcraft.io/t/kdenlive-cannot-render-any-projects-stuck-in-waiting/26689/3

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
2021-09-21 11:16:37 -05:00
Maciej Borzecki
2f3b5e5ad9 interfaces/builtin/docker-support: tighten the profile for dockerd operating on a cgroup v2 system
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-21 10:45:40 +02:00
Maciej Borzecki
212ac2660c interfaces/builtin/docker: blanket allow systemd access, tweak peer match
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-20 12:33:04 +02:00
Maciej Borzecki
b6f6a0f388 interfaces/builtin: update docker-support allowing docker to work with cgroup v2
With cgroup v2 docker apparently interacts with systemd to create scopes for
containers. Update the interface to allow communication related to starting
units and reception of signals about unit state.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-17 09:45:00 +02:00
James Henstridge
3425c88b96 interfaces: don't define a new type for snap-themes-control interface 2021-09-16 15:16:34 +08:00
James Henstridge
34a5f5439e Merge remote-tracking branch 'upstream/master' into themes-api-access-check 2021-09-16 15:09:16 +08:00
Alfonso Sánchez-Beato
854873884f interfaces/modem-manager: add access to PCIe modems
Allow access to PCIe modems by using the modem-manager interfaces.
2021-09-14 15:08:35 +02:00
Maciej Borzecki
8affd74370 interfaces/builtin: fix microstack unit tests on distros using /usr/libexec
Some distros such as openSUSE or Fedora use /usr/libexec. Fix unit tests to
behave correctly if one runs them on such system.

Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
2021-09-14 09:41:43 +02:00
Maciej Borzecki
a84b4d979e Merge remote-tracking branch 'upstream/master' into bboozzoo/apparmor-no-profile-update-when-no-profile-for-sc 2021-09-13 07:49:30 +02:00
Michael Vogt
f80c936f38 Merge pull request #10741 from woodrow-shen/add-block-state
interfaces/block-devices: support to access the state of block devices
2021-09-09 16:04:43 +02:00
James Henstridge
1fb316ae7f interfaces, daemon: rename snapd-themes-control interface to snap-themes-control 2021-09-09 13:38:13 +08:00
James Henstridge
58e04e57a2 Merge remote-tracking branch 'upstream/master' into themes-api-access-check 2021-09-09 11:03:28 +08:00
Hsieh-Tseng Shen
e27782abf3 interfaces/block-devices: support to access the state of block devices
This enables the control for the path of block devices that can be removed or
recovered after setting the state of running, so it would be safer to
take block devices to be offline state instead of unplugging the
physical devices.

Signed-off-by: Hsieh-Tseng Shen <woodrow.shen@canonical.com>
2021-09-07 00:05:54 +08:00
Michael Vogt
d04c4e66cb Merge pull request #10701 from MiguelPires/rm-unused-params
many: remove unused parameters
2021-09-06 15:55:56 +02:00