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

Unloading programs without CAP_SYS_ADMIN #434

Open
tohojo opened this issue Aug 16, 2024 · 0 comments
Open

Unloading programs without CAP_SYS_ADMIN #434

tohojo opened this issue Aug 16, 2024 · 0 comments

Comments

@tohojo
Copy link
Member

tohojo commented Aug 16, 2024

@mozzieongit requested the ability to unload programs without CAP_SYS_ADMIN, so
that an application can drop privileges after loading (see #432)..

It may be possible to support unloading of XDP programs without having
CAP_SYS_ADMIN, by simply removing the pinned bpf_link of the currently loaded
program in bpffs. This will detach the program from the loaded dispatcher, which
will just skip the slot. And if it's the last program loaded, removing the
dispatcher can be done with just CAP_NET_ADMIN.

In any case, the caveat is that the application needs appropriate permissions to
modify files in bpffs, which may throw a wrench in the whole thing. But it's
worth investigating, as it may enable some uses that are currently not possible
due to the CAP_SYS_ADMIN requirement.

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

No branches or pull requests

1 participant