summaryrefslogtreecommitdiff
path: root/tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-07-21 16:13:43 +0200
committerChristian Brauner <brauner@kernel.org>2026-08-03 10:08:44 +0200
commit7830e96d001c86c3dd34a2434277d86bba14c8c6 (patch)
treeb580d0784baec6169b2b56e8900217a1e816ca64 /tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git
parente566d0625876b699ee0e752d672c4de73a440764 (diff)
binfmt_misc: require an absolute interpreter path with 'C'
A 'C' entry computes the credentials from the matched binary instead of from the interpreter. So a set*id binary hands its credentials to whatever the entry names as its interpreter. Without 'F' that interpreter is not opened until the exec happens and open_exec() resolves the path relative to the current working directory. The working directory at that point belongs to whoever runs the binary not to whoever registered the entry. So :x:M::\x7fELF::interp:C lets every user who execs a matching set*id binary from a directory they control run their own interp with that binary's credentials. A relative interpreter has no sensible use here to begin with. The registering task cannot know what the working directory will be. Make the register string reject the combination at registration time. This does refuse register strings that used to be accepted. The 'F' flag covers the case where the interpreter really is meant to be resolved in the registrant's context, and it resolves it once, at registration. Link: https://patch.msgid.link/20260721-work-bpf-binfmt_misc-ptinterp-v2-1-e57866e4ae0f@kernel.org Reviewed-by: Farid Zakaria <farid.m.zakaria@gmail.com> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/tracing/rtla/tests/scripts/lib/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions