eBPF-based security platform
docs: put the policy label's size check where the seal makes it
Daniel Borkmann17b6a91bb1f3
diff --git a/Documentation/internals/enforcement.rst b/Documentation/internals/enforcement.rstindex c8e10212..0e66a215 100644--- a/Documentation/internals/enforcement.rst+++ b/Documentation/internals/enforcement.rst@@ -484,8 +484,8 @@ when the record it needs is missing.``lsm.s/bprm_committed_creds`` (``seal``)- Seed with the task's committed bits, accumulate the originalexecutable and each interpreter, then commit. An absent policy or- a file system without xattrs contributes zero bits; a malformed- or unreadable policy xattr refuses exec.+ a file system without xattrs contributes zero bits; a policy value+ other than 8 bytes, or one that cannot be read, refuses the exec.- ``EACCES``- Uncounted- Failed exec leaves committed policy unchanged.@@ -593,8 +593,7 @@ when the record it needs is missing.- Setting ``security.bpf.shirudo``,``security.bpf.shirudo.policy`` or``security.bpf.shirudo.ancestor`` on any inode, and any other name- on a labeled inode, to a task without authority. Policy values- must be exactly 8 bytes.+ on a labeled inode, to a task without authority.- ``EACCES``- ``SealLabel``, ``SealXattr``- See the label verdict below.diff --git a/Documentation/internals/seal.rst b/Documentation/internals/seal.rstindex 8c04e289..9e20680a 100644--- a/Documentation/internals/seal.rst+++ b/Documentation/internals/seal.rst@@ -322,7 +322,12 @@ Label reads on an upstream kerneltakes part. A read that fails for the caller, through an idmappedmount, an ACL or another LSM's policy, makes a labeled inodewithout a mark look unlabeled to the seal; a marked one is refused,- and the same failure on an open leaves the mark.+ and the same failure on an open leaves the mark. The policy label+ read at exec fails the same way for a caller that may run a file+ but not read it, such as an unprivileged user running a ``--x``+ binary, and the exec is refused: a policy that cannot be read is+ not taken for none, since root could make the read fail to shed+ the bits.Bind mountsNo mount guard covers the state file system, and shirudo's opens