summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorGünther Noack <gnoack3000@gmail.com>2026-11-13 21:23:23 +0100
committerMickaël Salaün <mic@digikod.net>2026-11-16 14:23:46 +0100
commit0ad8ea7fa7dc0f0d0e45f7ed4933d5433dac4291 (patch)
treefe07214cae63455c597d68e3aa2a15068408da1d /tools/perf/scripts/python
parentaebb7274476403040d582c61478df8f4a7bf9cd3 (diff)
landlock: Fix layer composition of LANDLOCK_ACCESS_FS_REFER
In landlock_get_fs_access_mask(), only add the LANDLOCK_ACCESS_FS_REFER right if any filesystem access rights are handled at all. This prevents us from accidentally treating non-filesystem layers as if they handled LANDLOCK_ACCESS_FS_REFER. landlock_get_fs_access_mask() is used when initializing the layer masks for doing access right checks, so this bug meant that we unintentionally denied "refer" (e.g., link, rename) operations in layered cases, where the same operation would have been accepted if only either one of the two layers had been enforced. If the rulesets individually allow an operation, the composition of these rulesets should also allow it. The bug only manifests as soon as one other layer handles filesystem access rights. Otherwise, Landlock filesystem path walk is guarded by an early exit for the case that no filesystem-enforcing layer exists. Reported-by: Dwi Siswanto <me@dw1.io> Closes: https://github.com/landlock-lsm/linux/issues/67 Closes: https://github.com/landlock-lsm/go-landlock/issues/66 Fixes: fff69fb03dde ("landlock: Support network rules with TCP bind and connect") Cc: stable@vger.kernel.org Signed-off-by: Günther Noack <gnoack3000@gmail.com> Link: https://patch.msgid.link/20261113-b4-landlock-refer-nonfs-layer-v3-1-02d7e42bcdfd@gmail.com Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions