facebook / facebook/zstd

Use OS APIs to Sandbox Zstd

Open
#1,969 0 comments 3 reactions 1 assignee Claimed by @felixhandte View on GitHub
feature request long-term
Dominant language
C
Stars
27.9k
Forks
2.6k
Avg merge
1d 3h
Merged PRs (30d)
8

Description

Some Operating Systems provide tools that let processes give up their ability to perform various kinds of actions. If the process is hijacked somehow, this limits the ability of an attacker to cause damage to the system. It would be nice for the CLI to take advantage of this proactive privilege dropping, since (a) we don't need access to very many system features, and (b) although we are careful, we are doing classically dangerous things (handling untrusted input, doing partially unchecked array accesses and copies, interacting with uninitialized memory, etc.).

Examples we would integrate with would include:

- Linux: the [`seccomp()`](https://www.kernel.org/doc/Documentation/prctl/seccomp_filter.txt) API, which lets you install a BPF program that gets called for each syscall you make, deciding whether to allow it to proceed or not.
- OpenBSD: the [`pledge()`](https://man.openbsd.org/pledge) API defines classes of operations you can reserve the right to use, disabling all the others.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.