From within a Landlock sandbox, it is still possible to infer the presence of files whose name can be guessed by the sandboxed process, even when all file system rights are denied on the affected directory.
Example:
gnoack:/tmp/xxx$ ls
foobar.txt
gnoack:/tmp/xxx$ landlock-restrict -rofiles /proc /usr /bin /etc/ -- /bin/cat foobar.txt
cat: foobar.txt: Permission denied
gnoack:/tmp/xxx$ landlock-restrict -rofiles /proc /usr /bin /etc/ -- /bin/cat nonexistent.txt
cat: nonexistent.txt: No such file or directory
gnoack:/tmp/xxx$ landlock-restrict -rofiles /proc /usr /bin /etc/ -- /bin/ls
ls: cannot open directory '.': Permission denied
Whether this is a bug or intended is up for interpretation.
(But we should probably at least document it more clearly.)
From within a Landlock sandbox, it is still possible to infer the presence of files whose name can be guessed by the sandboxed process, even when all file system rights are denied on the affected directory.
Example:
Whether this is a bug or intended is up for interpretation.
(But we should probably at least document it more clearly.)