]> Git Repo - linux.git/commit
procfs: fix pthread cross-thread naming if !PR_DUMPABLE
authorJanis Danisevskis <[email protected]>
Sat, 21 May 2016 00:00:08 +0000 (17:00 -0700)
committerLinus Torvalds <[email protected]>
Sat, 21 May 2016 00:58:30 +0000 (17:58 -0700)
commit1b3044e39a89cb1d4d5313da477e8dfea2b5232d
tree5de9d677464c4fee791a2433848217af005e1342
parent3e42979e65dace1f9268dd5440e5ab096b8dee59
procfs: fix pthread cross-thread naming if !PR_DUMPABLE

The PR_DUMPABLE flag causes the pid related paths of the proc file
system to be owned by ROOT.

The implementation of pthread_set/getname_np however needs access to
/proc/<pid>/task/<tid>/comm.  If PR_DUMPABLE is false this
implementation is locked out.

This patch installs a special permission function for the file "comm"
that grants read and write access to all threads of the same group
regardless of the ownership of the inode.  For all other threads the
function falls back to the generic inode permission check.

[[email protected]: fix spello in comment]
Signed-off-by: Janis Danisevskis <[email protected]>
Acked-by: Kees Cook <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Cyrill Gorcunov <[email protected]>
Cc: Alexey Dobriyan <[email protected]>
Cc: Colin Ian King <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Minfei Huang <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Calvin Owens <[email protected]>
Cc: Jann Horn <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/proc/base.c
This page took 0.054909 seconds and 4 git commands to generate.