-
Notifications
You must be signed in to change notification settings - Fork 125
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
Do we need secure_getenv()? #129
Comments
Well not exactly -- if the process is privileged, Just to frame the discussion, the "threat model" here is based on these assumptions:
Obviously, arbitrary code execution even for an unprivileged process is not great, but at least in the UNIX domain it doesn't let the user do anything they can't already do, and is fait accompli anyway. But in a case like Some options I can think of:
|
I think 2 and 3 are the better choices tbh. More specifically - "if you don't want to do 3, you'll have to do 2". The second one could be helped by some explicit It does somewhat matter for #123 though but only because that needs to be in sync too. |
Relevant for mutter: there's a pull request to move the caps to a separate thread, albeit it appears to have stalled. |
xref #308 - I think we can do 2. |
Came up in #108.
Using
secure_getenv()
basically guarantees that ourgetenv()
calls are useless since they'll always returnNULL
where the caller has capabilities. This is the case for mutter which I guess is a large portion of our use-case.As of 13b30f4 with the changes from #108, our usage of
getenv
is limited to:So the question now is - do we need
secure_getenv()
or are we happy withgetenv()
?The original motivation for not allowing compilation of arbitrary keymaps (109fe70) still stands of course. It's just that we have since added explicit support for arbitrary keymaps (3a91788 and e23f106), so... 🤷♂️
The text was updated successfully, but these errors were encountered: