| Summary: | Expected behavior of /proc when changing on disk executable permissions during run time. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Travis Gummels <tgummels> |
| Component: | kernel | Assignee: | Eric Sandeen <esandeen> |
| Status: | CLOSED NOTABUG | QA Contact: | Red Hat Kernel QE team <kernel-qe> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.2 | CC: | aviro, bfields |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-11-11 20:05:57 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | |||
| Bug Blocks: | 787799 | ||
|
Description
Travis Gummels
2011-10-25 19:46:42 UTC
Al, any thoughts on this one? In the kernel source, see calls to would_dump() at exec time, which end up setting mm->dumpable differently depending on whether the binary is not readable. This causes the "dumpable" tests at the end of __ptrace_may_access (called from proc_fd_access_allowed, from proc_pid_readlink(), which is readlink method for any symlink under /proc/$pid/) to fail. So, the short version: permissions to readlink() a symlink under /proc/$pid/ may depend on whether the binary was readable at the time it was exec'd. That behavior is by design. I don't know if there exists a well-defined policy that would recheck file permissions here while avoiding other pitfalls; anyone who wants that would need to write an extremely careful description of such a policy and get it vetted upstream before we could think about implementing it. |