]> git.baikalelectronics.ru Git - kernel.git/commit
Documentation: Clarify f_cred vs current_cred() use
authorKees Cook <keescook@chromium.org>
Fri, 3 Jul 2020 17:44:22 +0000 (10:44 -0700)
committerJonathan Corbet <corbet@lwn.net>
Sun, 5 Jul 2020 20:04:45 +0000 (14:04 -0600)
commit53335925b35fa60aa75b964f871c6e64fc0dd708
tree3dc0035777144d17213d56a2115a6c6e77c5e6d8
parentbdb35ceb7b4dfd6b20cb667f762bfcb0006a2968
Documentation: Clarify f_cred vs current_cred() use

When making access control choices from a file-based context, f_cred
must be used instead of current_cred() to avoid confused deputy attacks
where an open file may get passed to a more privileged process. Add a
short paragraph to explicitly state the rationale.

Cc: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/202007031038.8833A35DE4@keescook
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/security/credentials.rst