Skip to content

Non-setuid lxc-user-nic for no_new_privs. #4703

Description

@Skyb0rg007

The NO_NEW_PRIVS flag is used to prevent setuid/setcap binaries from gaining capabilities at runtime. Its a common security tool, as setuid binaries can be vulnerable in ways that local services cannot.

Because of the simplicity of the lxc-user-nic configuration file, the functionality could be easily provided over a Unix domain socket.
A privileged service can listen on a path such as /run/lxc/user-nic.sock and use SO_PEERCRED to determine if the process its communicating with has the proper rights.
Using systemd's socket activation with Accept=yes makes this feature even easier to implement.

Is this something that would be considered for inclusion?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions