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

feat(security): integrate libseccomp #81

Open
ghost opened this issue Jul 23, 2024 · 4 comments
Open

feat(security): integrate libseccomp #81

ghost opened this issue Jul 23, 2024 · 4 comments
Labels
C-security Issues or tasks related to security vulnerabilities, improvements, or audits.

Comments

@ghost
Copy link

ghost commented Jul 23, 2024

I suggest integrating libseccomp to further enhance the security of the builder app.
libseccomp is a BPF application in Linux that filters the kind of syscalls the application can make. For example: if the attacker somehow can run arbitrary code ( we ignore how they can do it ) through a bug within the application, they can make malicious syscalls like fork, execve. Think of it like a lightweight sandbox around the current application.
TDX provides an overall secure VM blackbox, but it doesn't prevent bad code being exploited within the application. There will be a small performance hit since BPF is very lightweight, need to measure how much it is to work with TDX.

@ferranbt
Copy link
Contributor

Hey, I do not have a lot of context on libseccomp. Is this something you enable on the VMs or in the Rust program?

@ferranbt ferranbt added the C-security Issues or tasks related to security vulnerabilities, improvements, or audits. label Aug 20, 2024
@ghost
Copy link
Author

ghost commented Aug 22, 2024

Hey, it's something we use along with rust app to limit syscall to kernel from the app itself.

@ferranbt
Copy link
Contributor

How is it configured/enabled in this specific repo?

@ghost
Copy link
Author

ghost commented Aug 23, 2024

You can check an example imlpementation here in cloudflare's foundation:
https://github.com/cloudflare/foundations/blob/afd9094db7581f6db79b64f2eee79458997bd1f0/foundations/build.rs#L96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-security Issues or tasks related to security vulnerabilities, improvements, or audits.
Projects
None yet
Development

No branches or pull requests

1 participant