#[non_exhaustive]#[repr(u32)]pub enum Erratum {
TcpSocketIdentification = 1,
ScopedSignalHandling = 2,
DisconnectedDirectoryHandling = 4,
}Expand description
Fixed kernel issues for the running Landlock implementation.
Each variant represents a specific bug fix that may have been
backported to the running kernel. Use Erratum::current()
before building a Ruleset to decide which
features are safe to use.
An ABI version can be converted into the set of applicable errata
with BitFlags::<Erratum>::from(abi).
§Warning
Most applications should not check errata. Disabling a sandboxing feature because an erratum is not fixed could leave the system less secure than using Landlock’s best-effort protection with the buggy feature enabled. Errata should only be used to add features (e.g., enabling a restriction only when its bug is confirmed fixed), never to remove them.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TcpSocketIdentification = 1
Erratum 1 (ABI 4): non-TCP stream sockets (SMC, MPTCP, SCTP)
were incorrectly restricted by TCP access rights during
bind(2) and connect(2).
Affects crate::AccessNet::BindTcp and crate::AccessNet::ConnectTcp.
See erratum 1.
ScopedSignalHandling = 2
Erratum 2 (ABI 6): signal scoping was overly restrictive, preventing sandboxed threads from signaling other threads within the same process in different domains.
Affects crate::Scope::Signal.
See erratum 2.
DisconnectedDirectoryHandling = 4
Erratum 3 (ABI 1): access rights could be widened through
rename or link actions on disconnected directories under
bind mounts, potentially bypassing LANDLOCK_ACCESS_FS_REFER
restrictions.
See erratum 3.
Implementations§
Trait Implementations§
Source§impl BitFlag for Erratum
impl BitFlag for Erratum
§fn empty() -> BitFlags<Self>
fn empty() -> BitFlags<Self>
BitFlags with no flags set (in other words, with a value of 0). Read more§fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
fn from_bits(bits: Self::Numeric) -> Result<BitFlags<Self>, FromBitsError<Self>>
BitFlags if the raw value provided does not contain
any illegal flags. Read more§fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
fn from_bits_truncate(bits: Self::Numeric) -> BitFlags<Self>
BitFlags from an underlying bitwise value. If any
invalid bits are set, ignore them. Read more§unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
unsafe fn from_bits_unchecked(bits: Self::Numeric) -> BitFlags<Self>
BitFlags unsafely, without checking if the bits form
a valid bit pattern for the type. Read more