ACK: [PATCH] [Xenial] procfs: fix pthread cross-thread naming if !PR_DUMPABLE

Seth Forshee seth.forshee at canonical.com
Wed May 17 14:01:23 UTC 2017


On Thu, May 11, 2017 at 06:10:19PM -0300, Breno Leitao wrote:
> From: Janis Danisevskis <jdanis at google.com>
> 
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1690225
> 
> 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.
> 
> [akpm at linux-foundation.org: fix spello in comment]
> Signed-off-by: Janis Danisevskis <jdanis at google.com>
> Acked-by: Kees Cook <keescook at chromium.org>
> Cc: Al Viro <viro at zeniv.linux.org.uk>
> Cc: Cyrill Gorcunov <gorcunov at openvz.org>
> Cc: Alexey Dobriyan <adobriyan at gmail.com>
> Cc: Colin Ian King <colin.king at canonical.com>
> Cc: David Rientjes <rientjes at google.com>
> Cc: Minfei Huang <mnfhuang at gmail.com>
> Cc: John Stultz <john.stultz at linaro.org>
> Cc: Calvin Owens <calvinowens at fb.com>
> Cc: Jann Horn <jann at thejh.net>
> Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
> Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
> (cherry picked from commit 1b3044e39a89cb1d4d5313da477e8dfea2b5232d)
> Signed-off-by: Breno Leitao <breno.leitao at gmail.com>

Clean cherry pick, has been upstream since 4.7.

Acked-by: Seth Forshee <seth.forshee at canonical.com>




More information about the kernel-team mailing list