Affected by GO-2025-3781
and 10 other vulnerabilities
GO-2025-3781 : Incus Allocation of Resources Without Limits allows firewall rule bypass on managed bridge networks in github.com/lxc/incus
GO-2025-3782 : Incus creates nftables rules that partially bypass security options in github.com/lxc/incus
GO-2025-4115 : Incus vulnerable to local privilege escalation through custom storage volumes in github.com/lxc/incus
GO-2026-4357 : Incus container image templating arbitrary host file read and write in github.com/lxc/incus
GO-2026-4359 : Incus container environment configuration newline injection in github.com/lxc/incus
GO-2026-4879 : Local Incus UI web server vulnerable to nuthentication bypass in github.com/lxc/incus
GO-2026-4881 : Incus vulnerable to arbitrary file read and write through pongo templates in github.com/lxc/incus
GO-2026-4882 : Incus does not verify combined fingerprint when downloading images from simplestreams servers in github.com/lxc/incus
GO-2026-4884 : Incus has an abitrary file write through its systemd-creds options in github.com/lxc/incus
GO-2026-4885 : Incus vulnerable to local privilege escalation through VM screenshot path in github.com/lxc/incus
GO-2026-4886 : Incus vulnerable to denial of source through crafted bucket backup file in github.com/lxc/incus
The highest tagged major version is
v7 .
Discover Packages
github.com/lxc/incus
internal
revert
package
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Oct 27, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Hook is a function that can be added to the revert via the Add() function.
These will be run in the reverse order that they were added if the reverter's Fail() function is called.
Reverter is a helper type to manage revert functions.
package main
import (
"fmt"
"github.com/lxc/incus/internal/revert"
)
func main() {
revert := revert.New()
defer revert.Fail()
revert.Add(func() { fmt.Println("1st step") })
revert.Add(func() { fmt.Println("2nd step") })
// Revert functions are run in reverse order on return.
Output:
package main
import (
"fmt"
"github.com/lxc/incus/internal/revert"
)
func main() {
revert := revert.New()
defer revert.Fail()
revert.Add(func() { fmt.Println("1st step") })
revert.Add(func() { fmt.Println("2nd step") })
revert.Success() // Revert functions added are not run on return.
}
Output:
New returns a new Reverter.
Add adds a revert function to the list to be run when Revert() is called.
Clone returns a copy of the reverter with the current set of revert functions added.
This can be used if you want to return a reverting function to an external caller but do not want to actually
execute the previously deferred reverter.Fail() function.
Fail runs any revert functions in the reverse order they were added.
Should be used with defer or when a task has encountered an error and needs to be reverted.
Success clears the revert functions previously added.
Should be called on successful completion of a task to prevent revert functions from being run.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.