Skip to content

Fix some security issues#3092

Merged
stgraber merged 9 commits intolxc:mainfrom
stgraber:security
Mar 27, 2026
Merged

Fix some security issues#3092
stgraber merged 9 commits intolxc:mainfrom
stgraber:security

Conversation

@stgraber
Copy link
Copy Markdown
Member

No description provided.

This is a small Go API break which is needed to address a security issue
where we need the ability to re-hash the final image files.

This is part of a fix for CVE-2026-33542.

Reported-by: wl2018
Signed-off-by: Stéphane Graber <[email protected]>
This is part of a fix for CVE-2026-33542.

Reported-by: wl2018
Signed-off-by: Stéphane Graber <[email protected]>
This is part of a fix for CVE-2026-33542.

Reported-by: wl2018
Signed-off-by: Stéphane Graber <[email protected]>
Following download of the files/deltas, compute a full hash to make sure
we have the expected image.

This is part of a fix for CVE-2026-33542.

Reported-by: wl2018
Signed-off-by: Stéphane Graber <[email protected]>
This fixes an issue when running on systems without the protect_symlinks
kernel protection enabled (introduced in 2012).

On such systems, a user could pre-create symlinks to sensitive files on
the system and trick Incus into truncating them and altering their file
mode and ownership.

This addresses CVE-2026-33711

Reported-by: https://7asecurity.com
Signed-off-by: Stéphane Graber <[email protected]>
Properly skip anything that doesn't have the expected path prefix for a
file within the bucket. Then use strings.TrimPrefix rather than a fixed
offset to clear the prefix.

This addresses CVE-2026-33743

Reported-by: https://7asecurity.com
Signed-off-by: Stéphane Graber <[email protected]>
The chroot logic in pongo2 doesn't work and therefore allows all
templates to read and write to arbitrary paths on the host filesystem.

Given the logic seemingly never worked properly, no template out there
should be dependent on the file related functions being functional.

Transition to our standard RenderTemplate logic which specifically block
all file related functions. Introduces a new RenderTemplateFile to
handle cases where we want to directly write to a file (useful for
write quotas).

This addresses CVE-2026-33897

Reported-by: https://7asecurity.com
Signed-off-by: Stéphane Graber <[email protected]>
Fix the logic to validate the token both on initial use and through cookie.
Also add an Origin check for good measure.

This addresses CVE-2026-33898

Reported-by: https://7asecurity.com
Signed-off-by: Stéphane Graber <[email protected]>
systemd credentials name could be abused to escape the credentials
folder and allow for arbitrary writes to the host filesystem allowing
for privilege escalation and denial of service attacks.

We now use Go's OpenRoot (openat2) to restrict all file interactions to
the "credentials" directory, avoiding such attacks.

This addresses CVE-2026-33945

Reported-by: https://7asecurity.com
Signed-off-by: Stéphane Graber <[email protected]>
@stgraber stgraber merged commit ef3abb6 into lxc:main Mar 27, 2026
107 of 108 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants