snappy:release/2.63

Last commit made on 2024-04-24
Get this branch:
git clone -b release/2.63 https://git.launchpad.net/snappy

Branch merges

Branch information

Name:
release/2.63
Repository:
lp:snappy

Recent commits

40efd81... by Ernest Lotter

release: 2.63

b32dcdc... by Valentin David

interfaces/udev: generate rules with deprecated command line (#13882)

Snapd from the snap generate udev rules that executes snap-device-helper
from the host. In cases when the snap is newer than the package, the
new command line is rejected by the old snap-device-helper from the
package. Because the new snap-device-helper accepts old command-line,
but just ignores the extra parameters, it is safer for now to generate
rules with the old command line.

e56b10f... by jcat

interfaces/opengl: enable use of nvidia container toolkit CDI config generation (#13847)

The nvidia container toolkit needs to traverse the top level libs
directory in order to discover the libraries and generate a CDI config.

b6f8ab3... by Zygmunt Krynicki

tests/regression: skip lp-1848567 if internal parser is used (#13874)

The test uses host parser unconditionally, which may not understand
future syntax that is present in cases when apparmor is carried
by snapd snap package.

Signed-off-by: Zygmunt Krynicki <email address hidden>

bf3af32... by Maciej Borzecki

data/selinux: update policy to allow stat of /run/systemd/container (#13872)

Since 3cfa28a0fc snap-confine checks if the system is running in a container. It
does so by reading /run/systemd/container. Extend the SELinux to allow basic
search operations within /run/systemd. It is unlikely anyone runs snapd in a
container where the SELinux is enabled on the host, so the actual file read
permissions are likely not needed.

Signed-off-by: Maciej Borzecki <email address hidden>

e63665a... by Maciej Borzecki

cmd/snap-confine: skip device cgroup setup when running inside a container (#13859)

* cmd/libsnap-confine-private: helper for detecting if executing inside a container

Add a helper which attempts to detect if the current process is executing inside
a container environment. Specifically, look for /run/systemd/container and check
whether it is non empty.

Signed-off-by: Maciej Borzecki <email address hidden>

* cmd/snap-confine: do not setup device cgroup if running inside a container

Do not set up a device cgroup filter, if we're running inside the container. The
rationale is that the container environment has already shut down device access
sufficiently, and especially if running in unprivileged container, we may not be
able to set it up correctly anyway.

Signed-off-by: Maciej Borzecki <email address hidden>

* cmd/snap-confine: allow reading of /run/systemd/container

Allow snap-confine to read /run/system/container to implement container
execution check.

Signed-off-by: Maciej Borzecki <email address hidden>

* cmd/snap-confine: use strnlen for sc_is_container

Signed-off-by: Zygmunt Krynicki <email address hidden>

---------

Signed-off-by: Maciej Borzecki <email address hidden>
Signed-off-by: Zygmunt Krynicki <email address hidden>
Co-authored-by: Zygmunt Krynicki <email address hidden>

9baeee4... by Zygmunt Krynicki

i/apparmor: allow snap-update-ns to traverse to /var/lib/snapd (#13858)

I've noticed this denial in one of my test systems:

  kwi 19 10:54:52 ubuntu-2204-cryptfs kernel: audit: type=1400
  audit(1713516892.723:323): apparmor="DENIED" operation="open" class="file"
  profile="snap-update-ns.chromium" name="/var/lib/snapd /" pid=8425 comm="5"
  requested_mask="r" denied_mask="r" fsuid=0 ouid=0

Given that snap-update-ns must access mount profiles and contains code to
safely traverse a path without any symbolic links, I think the extra
permissions is acceptable.

I did not audit the code to pinpoint the exact cause.

Signed-off-by: Zygmunt Krynicki <email address hidden>

e95b801... by Zygmunt Krynicki

i/apparmor: fix snap-update-ns with ecrypfs home (#13857)

Ever since snapd 2.62 was released, snap-update-ns requires opening the home
directory of the user for some validation and sanity checking. This is now
affected by a bug in base policy regarding ecryptfs. Add the similar workaround
we have in other templates.

Fixes: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2062330
Fixes: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2062173

Signed-off-by: Zygmunt Krynicki <email address hidden>

35fed3f... by Ernest Lotter

overlord/snapstate: fix calls to compMntDir

63324f0... by Ernest Lotter

overlord/snapstate: fix calls to createTestComponent