[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ptrace and most proc files should be inaccessible to users if binary is not readable #160

Open
amscanne opened this issue Mar 25, 2019 · 4 comments
Labels
area: filesystem Issue related to filesystem exported Issue was exported automatically priority: p3 Low priority revived The Issue has been revived by the issue reviver. type: bug Something isn't working type: cleanup Refactorings and cleanups to improve the code

Comments

@amscanne
Copy link
Contributor

Calling execve on a binary with execute permissions but no read permissions is allowed. However, the resulting task is marked non-dumpable[1] by the kernel.

This affects __ptrace_may_access[2], which enforces access by ptrace and to many proc files.

Basically, execute-no-read binaries are a subset of typical setuid binaries.

[1] https://elixir.bootlin.com/linux/v5.0.4/source/fs/exec.c#L1316
[2] https://elixir.bootlin.com/linux/v5.0.4/source/kernel/ptrace.c#L327

@amscanne amscanne added type: bug Something isn't working type: cleanup Refactorings and cleanups to improve the code exported Issue was exported automatically platform: ptrace Issue related to the ptrace platform priority: p3 Low priority and removed platform: ptrace Issue related to the ptrace platform labels Mar 25, 2019
@prattmic prattmic added the area: filesystem Issue related to filesystem label Apr 3, 2020
@prattmic prattmic removed their assignment Apr 3, 2020
@github-actions
Copy link

A friendly reminder that this issue had no activity for 120 days.

@github-actions github-actions bot added the stale-issue This issue has not been updated in 120 days. label Sep 15, 2023
Copy link

This issue has been closed due to lack of activity.

@github-actions github-actions bot reopened this Dec 15, 2023
@github-actions github-actions bot added the revived The Issue has been revived by the issue reviver. label Dec 15, 2023
Copy link

There are TODOs still referencing this issue:

  1. pkg/sentry/loader/loader.go:103: Linux requires only execute permission,
  2. test/syscalls/linux/exec_binary.cc:1308: gVisor's backing filesystem may prevent the
  3. test/syscalls/linux/exec_binary.cc:1327: A task with a non-readable executable is marked

Search TODO

@github-actions github-actions bot removed auto-closed stale-issue This issue has not been updated in 120 days. labels Dec 15, 2023
Copy link

A friendly reminder that this issue had no activity for 120 days.

@github-actions github-actions bot added stale-issue This issue has not been updated in 120 days. and removed stale-issue This issue has not been updated in 120 days. labels Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: filesystem Issue related to filesystem exported Issue was exported automatically priority: p3 Low priority revived The Issue has been revived by the issue reviver. type: bug Something isn't working type: cleanup Refactorings and cleanups to improve the code
Projects
None yet
Development

No branches or pull requests

2 participants