Skip to content
Commit 7303515a authored by Kees Cook's avatar Kees Cook Committed by Jonathan Corbet
Browse files

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: default avatarKees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/202007031038.8833A35DE4@keescook


Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 559394d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment