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
[Bug]: incorrect plugin permissions in RPM packages #14132
Comments
The exact permissions are indeed not entirely correct, but the reliance on file capabilities instead of SUID is intentional and expected. I’m not sure what’s up with the eBPF plugin here though (@thiagoftsm any thoughts on this?). |
@Ferroin I think the ebpf.plugin should have setuid bit (which we set and later unset).
I didn't mean it was a problem, the problem is permissions overwriting. |
@ilyam8 is right, eBPF needs root permission to run. Updating, this is the normal installation permission: root@hades:~# ls -l /usr/libexec/netdata/plugins.d/ebpf.plugin
-rwsr-x--- 1 root netdata 3322216 Dec 12 13:36 /usr/libexec/netdata/plugins.d/ebpf.plugin*
root@hades:~# @Ferroin it is necessary to use root permission because we are loading data (ebpf programs) inside kernel ring. |
@thiagoftsm Are we absolutely certain it needs to be root specifically and that some combination of capabilities will not work? I’m really trying to move us away from SUID whenever possible as capabilities are more secure. |
It is possible to load some eBPF programs without root permission, but our plugin loads all possible eBPF programs, this is the main reason we need root permissions. |
Bug description
I guess because we are setting permissions (
install -m ...
) which are later overwritten with%defattr(0750,root,netdata,0750)
netdata/netdata.spec.in
Lines 488 to 492 in d127c10
As you can see all the plugins have
0750
:Expected behavior
Plugins permissions don't get overwritten. I didn't check all the plugins, but from what I see all of them work (because of capabilities) except the ebpf plugin which fails to start
Steps to reproduce
Installation method
native binary packages (.deb/.rpm)
System info
Netdata build info
Additional info
No response
The text was updated successfully, but these errors were encountered: