Skip to content

Backports (stable-5.21)#17577

Merged
tomponline merged 13 commits intocanonical:stable-5.21from
tomponline:stable-5.21
Feb 6, 2026
Merged

Backports (stable-5.21)#17577
tomponline merged 13 commits intocanonical:stable-5.21from
tomponline:stable-5.21

Conversation

@tomponline tomponline self-assigned this Feb 6, 2026
@github-actions github-actions bot added Documentation Documentation needs updating 5.21 LTS labels Feb 6, 2026
stgraber and others added 10 commits February 6, 2026 10:11
Signed-off-by: Stéphane Graber <[email protected]>
Suggested-by: Rory McNamara <[email protected]>
(cherry picked from commit a5c1c73b535fb12d2c1ccd1c6b9a933fd312dc79)
Signed-off-by: Thomas Parrott <[email protected]>
License: Apache-2.0
(cherry picked from commit 6e6b022)
Fixes it to actually single-quote.

Signed-off-by: Thomas Parrott <[email protected]>
(cherry picked from commit 6433705)
This avoids potential shell expansion of the strings should some special
characters manage to make it through.

Signed-off-by: Rory McNamara <[email protected]>
(cherry picked from commit 0e0cf45ecdcc902a6f319f11971ed27df81bd29f)
Signed-off-by: Thomas Parrott <[email protected]>
License: Apache-2.0
(cherry picked from commit dbc1323)
…tecture issue

LXD images from CPC have started to include duplicate architecture values, e.g.

```
cat metadata.yaml
architecture: "x86_64
x86_64"
creation_date: 1769772831
properties:
    architecture: "x86_64
x86_64"
```

Signed-off-by: Thomas Parrott <[email protected]>
(cherry picked from commit 09d9034)
…t variables

LXC doesn't currently have a syntax to hold a multi-line environment
variable in its configuration. The use of multi-line environment
variables leads to a corrupted configuration file and to a security
issue where additional lines may be added by an unprivileged user to
escalate their privileges.

This fixes CVE-2026-23953.

Reported-by: Rory McNamara <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit cdf037409fbb35ab0f9fdc4e0e8cc706adbca99e)
Signed-off-by: Thomas Parrott <[email protected]>
License: Apache-2.0
(cherry picked from commit a53d166)
Signed-off-by: Thomas Parrott <[email protected]>
(cherry picked from commit 42d8287)
…targets

This fixes three security issues related to file templates:

 - The template target path could be made to be relative or gothrough
   symlinks in a way that could lead to arbitrary write to the host
   filesystem.

 - The template directory could be relative, allowing for arbitrary read
   from the host filesystem.

 - The template file itself could be made relative, allowing for
   arbitrary reads from the host filesystem.

In the case of the template target path, the new logic makes use of the
kernel's openat2 system call which brings a variety of flags that can be
used to restrict path resolution and detect potential issues.

For the template path itself, we now validate that it is a simple local
file and that the template directory isn't a symlink.

This fixes CVE-2026-23954

Reported-by: Rory McNamara <[email protected]>
Signed-off-by: Stéphane Graber <[email protected]>
(cherry picked from commit c1d90bd34a7ccc224276b87644d7c75437f1cb64)
Signed-off-by: Thomas Parrott <[email protected]>
License: Apache-2.0
(cherry picked from commit d1c8ba1)
…llow error wrapping

Also:
 - Closes rootfs file handle earlier.
 - Handles errors if file handles error when closing.

Signed-off-by: Thomas Parrott <[email protected]>
(cherry picked from commit c981c47)
Signed-off-by: Minae Lee <[email protected]>
(cherry picked from commit ec4aa43)
Signed-off-by: Minae Lee <[email protected]>
(cherry picked from commit 497c63f)
Signed-off-by: Minae Lee <[email protected]>
(cherry picked from commit 5053215)
@tomponline tomponline marked this pull request as ready for review February 6, 2026 10:55
@tomponline
Copy link
Copy Markdown
Member Author

I'll fix the docs failure with routine backports.

@tomponline tomponline requested a review from markylaing February 6, 2026 10:56
@tomponline tomponline merged commit e806737 into canonical:stable-5.21 Feb 6, 2026
31 of 32 checks passed
tomponline added a commit to tomponline/lxd-pkg-snap that referenced this pull request Feb 9, 2026
tomponline added a commit to tomponline/lxd-pkg-snap that referenced this pull request Feb 9, 2026
tomponline added a commit to canonical/lxd-pkg-snap that referenced this pull request Feb 9, 2026
tomponline added a commit to tomponline/lxd-pkg-snap that referenced this pull request Feb 9, 2026
From canonical/lxd#17577

Signed-off-by: Thomas Parrott <[email protected]>
tomponline added a commit to canonical/lxd-pkg-snap that referenced this pull request Feb 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.21 LTS Documentation Documentation needs updating

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants