Skip to content

Commit d79547c

Browse files
committed
docs: warn about limitations of landlock
And mark it as experimental. Relates to #6078.
1 parent 04c458c commit d79547c

File tree

2 files changed

+32
-12
lines changed

2 files changed

+32
-12
lines changed

src/man/firejail-profile.5.in

+6-6
Original file line numberDiff line numberDiff line change
@@ -509,30 +509,30 @@ Blacklist all Linux capabilities.
509509
Whitelist given Linux capabilities.
510510
#ifdef HAVE_LANDLOCK
511511
.TP
512-
\fBlandlock.enforce
512+
\fBlandlock.enforce (experimental)
513513
Enforce the Landlock ruleset.
514514
.PP
515515
Without it, the other Landlock commands have no effect.
516516
.TP
517-
\fBlandlock.fs.read path
517+
\fBlandlock.fs.read path (experimental)
518518
Create a Landlock ruleset (if it doesn't already exist) and add a read access
519519
rule for path.
520520
.TP
521-
\fBlandlock.fs.write path
521+
\fBlandlock.fs.write path (experimental)
522522
Create a Landlock ruleset (if it doesn't already exist) and add a write access
523523
rule for path.
524524
.TP
525-
\fBlandlock.fs.makeipc path
525+
\fBlandlock.fs.makeipc path (experimental)
526526
Create a Landlock ruleset (if it doesn't already exist) and add a rule that
527527
allows the creation of named pipes (FIFOs) and Unix domain sockets beneath
528528
the given path.
529529
.TP
530-
\fBlandlock.fs.makedev path
530+
\fBlandlock.fs.makedev path (experimental)
531531
Create a Landlock ruleset (if it doesn't already exist) and add a rule that
532532
allows the creation of block devices and character devices beneath the given
533533
path.
534534
.TP
535-
\fBlandlock.fs.execute path
535+
\fBlandlock.fs.execute path (experimental)
536536
Create a Landlock ruleset (if it doesn't already exist) and add an execution
537537
permission rule for path.
538538
#endif

src/man/firejail.1.in

+26-6
Original file line numberDiff line numberDiff line change
@@ -1236,30 +1236,30 @@ $ firejail --keep-var-tmp
12361236

12371237
#ifdef HAVE_LANDLOCK
12381238
.TP
1239-
\fB\-\-landlock.enforce
1239+
\fB\-\-landlock.enforce (experimental)
12401240
Enforce the Landlock ruleset.
12411241
Without it, the other Landlock commands have no effect.
12421242
See the \fBLANDLOCK\fR section for more information.
12431243
.TP
1244-
\fB\-\-landlock.fs.read=path
1244+
\fB\-\-landlock.fs.read=path (experimental)
12451245
Create a Landlock ruleset (if it doesn't already exist) and add a read access
12461246
rule for path.
12471247
.TP
1248-
\fB\-\-landlock.fs.write=path
1248+
\fB\-\-landlock.fs.write=path (experimental)
12491249
Create a Landlock ruleset (if it doesn't already exist) and add a write access
12501250
rule for path.
12511251
.TP
1252-
\fB\-\-landlock.fs.makeipc=path
1252+
\fB\-\-landlock.fs.makeipc=path (experimental)
12531253
Create a Landlock ruleset (if it doesn't already exist) and add a rule that
12541254
allows the creation of named pipes (FIFOs) and Unix domain sockets beneath
12551255
the given path.
12561256
.TP
1257-
\fB\-\-landlock.fs.makedev=path
1257+
\fB\-\-landlock.fs.makedev=path (experimental)
12581258
Create a Landlock ruleset (if it doesn't already exist) and add a rule that
12591259
allows the creation of block devices and character devices beneath the given
12601260
path.
12611261
.TP
1262-
\fB\-\-landlock.fs.execute=path
1262+
\fB\-\-landlock.fs.execute=path (experimental)
12631263
Create a Landlock ruleset (if it doesn't already exist) and add an execution
12641264
permission rule for path.
12651265
.br
@@ -3372,6 +3372,21 @@ $ firejail --apparmor firefox
33723372

33733373
#ifdef HAVE_LANDLOCK
33743374
.SH LANDLOCK
3375+
Warning: Landlock support in firejail is considered experimental and unstable.
3376+
The contents of landlock-common.inc are likely to change and the feature is
3377+
still being expanded upon in the Linux kernel.
3378+
Also, note that its functionality overlaps with existing firejail features,
3379+
such as the \fBblacklist\fR, \fBread-only\fR and \fBread-write\fR commands.
3380+
Its filesystem access rules can currently only restrict direct access to paths;
3381+
it is not able to make only select paths appear in the sandbox such as with the
3382+
\fBwhitelist\fR and \fBprivate-etc\fR commands (see also unveil(2) on OpenBSD).
3383+
Lastly, note that depending on the Linux kernel version, Landlock may not
3384+
protect all of the relevant syscalls (see the kernel's Landlock documentation
3385+
for details).
3386+
Therefore, it is recommended to treat Landlock as an extra layer of protection,
3387+
to be used together with other firejail features (rather than as a bulletproof
3388+
mechanism by itself).
3389+
.PP
33753390
Landlock is a Linux security module first introduced in version 5.13 of the
33763391
Linux kernel.
33773392
It allows unprivileged processes to restrict their access to the filesystem.
@@ -3386,6 +3401,11 @@ landlock-common.inc) and with a custom set of rules.
33863401
Important notes:
33873402
.PP
33883403
.RS
3404+
- Currently only Landlock ABI version 1 is supported.
3405+
.PP
3406+
- If "lsm=" is used in the kernel command line, it should contain "landlock"
3407+
(such as "lsm=apparmor,landlock"), or else it will be disabled.
3408+
.PP
33893409
- A process can install a Landlock ruleset only if it has either
33903410
\fBCAP_SYS_ADMIN\fR in its effective capability set, or the "No New
33913411
Privileges" restriction enabled.

0 commit comments

Comments
 (0)