[PATCH 07/12] procfs: add permission checks on the file's opener of /proc/*/stack

2013-09-25 Thread Djalal Harouni
/proc file descriptors can be passed to a more privileged process (e.g. a suid-exec) which will pass the classic ptrace_may_access() permission check during read(). Use proc_same_open_cred() to detect if the cred of current between ->open() and ->read() have changed, if so then call

[PATCH 07/12] procfs: add permission checks on the file's opener of /proc/*/stack

2013-09-25 Thread Djalal Harouni
/proc file descriptors can be passed to a more privileged process (e.g. a suid-exec) which will pass the classic ptrace_may_access() permission check during read(). Use proc_same_open_cred() to detect if the cred of current between -open() and -read() have changed, if so then call