[GIT PULL] Landlock fix for v6.0

From: Mickaël Salaün
Date: Fri Sep 02 2022 - 10:44:18 EST


Hi Linus,

This change fixes a mis-handling of the LANDLOCK_ACCESS_FS_REFER right
when multiple rulesets/domains are stacked. The expected behaviour was
that an additional ruleset can only restrict the set of permitted
operations, but in this particular case, it was potentially possible to
re-gain the LANDLOCK_ACCESS_FS_REFER right.

Please pull this Landlock fix for v6.0-rc4 . These changes merged
cleanly with your tree, and have been successfully tested in the latest
linux-next releases for a week. This should be backported to v5.19 .

Regards,
Mickaël

--
The following changes since commit 3d7cb6b04c3f3115719235cc6866b10326de34cd:

Linux 5.19 (2022-07-31 14:03:01 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux.git tags/landlock-6.0-rc4

for you to fetch changes up to 55e55920bbe3ccf516022c51f5527e7d026b8f1d:

landlock: Fix file reparenting without explicit LANDLOCK_ACCESS_FS_REFER (2022-09-02 15:29:08 +0200)

----------------------------------------------------------------
Landlock fix for v6.0-rc4

----------------------------------------------------------------
Mickaël Salaün (1):
landlock: Fix file reparenting without explicit LANDLOCK_ACCESS_FS_REFER

security/landlock/fs.c | 48 ++++-----
tools/testing/selftests/landlock/fs_test.c | 155 +++++++++++++++++++++++++++--
2 files changed, 170 insertions(+), 33 deletions(-)