[PATCH v2 1/9] procfs: add proc_same_open_cred() to check if the cred have changed

2013-10-01 Thread Djalal Harouni
Since /proc entries varies at runtime, permission checks need to happen during each system call. However even with that /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. The open() call will be

[PATCH v2 1/9] procfs: add proc_same_open_cred() to check if the cred have changed

2013-10-01 Thread Djalal Harouni
Since /proc entries varies at runtime, permission checks need to happen during each system call. However even with that /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. The open() call will be