This whole mess just makes me think we should try harder to kick suid/fcaps out of general purpose Linux distributions. The whole concept is fundamentally backwards, and one of the major weaknesses of traditional UNIX I am sure. The idea behind suid/fcaps of first granting the privileges, inheriting some major, uncontrolled part of the execution environment/resource context/security context and then expecting the binary to securely gate its misuse is just a major mistake: https://www.openwall.com/lists/oss-security/2023/10/03/2
@pid_eins Make systemd set prctl PR_SET_NO_NEW_PRIVS in pid 1.
@dalias We actually have an option for that in /etc/systemd/system.conf.
But I am not aware of any general purpose distro setting that.
And ideally we'd turn off the suid/fcaps logic already in kernel, i.e. compile the whole thing out.