bytecodealliance / bytecodealliance/rustix

`set_secure_computing_mode(SecureComputingMode::Filter)` has no filter argument

Open
#1,451 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.1k
Forks
294
Avg merge
4h 7m
Merged PRs (30d)
2

Description

The C interface looks like

```C
[[deprecated]]
int prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, struct sock_fprog *filter);
```

however rustix' iterface looks like

```Rust
set_secure_computing_mode(SecureComputingMode::Filter)
```

so `filter` will be some garbage, mostly likely failing with `EFAULT`.

Since `PR_SET_SECCOMP` (but not `PR_GET_SECCOMP`) is deprecated and superseded by `seccomp` anyway. Do you see a good reason to fix the prctl variant? Or should we just deprecated and later remove the prctl variant in rustix and add support for `seccomp(2)` as `seccomp_set_mode_strict()` and `seccomp_set_mode_filter(flags, args)`?

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.