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

Use pledge(2) on OpenBSD #1451

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

estrogently
Copy link
Contributor

pledge(2) restricts which system calls can be called, terminating the process on a violation.

Probably not very essential for micro, but nice to have.

@zyedidia
Copy link
Owner

zyedidia commented Feb 8, 2020

What sort of system calls does this disallow and how are you sure that micro doesn't violate the pledges? Sorry I'm just worried that this could cause a crash because micro pledges the wrong set of system calls.

@deliciouslytyped
Copy link

I like the idea here.

FWIW, if you're considering adding something like this, you might want to abstract it a bit or something to add multi-platform capability because stuff like seccomp on linux might be interesting.

But then you kind of have to start thinking about "what should be the threat model for a text editor?" and I don't know.

You might also want to make the call list flexible depending on what someone is doing with their plugins, but then at that point a question is how do you secure the configuration?

And if you allow exec, can't someone just run an executable that has less restrictions?

Disclaimer: I am an armchair security engineer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants