Giter Site home page Giter Site logo

subuidless-archiv's Introduction

OCI Seccomp Receiver for running Rootless Containers without /etc/subuid and /etc/subgid

subuidless is an implementaion of OCI Seccomp Receiver for running Rootless Containers without /etc/subuid and /etc/subgid.

subuidlesss emulates ID-related system calls using Seccomp User Notification and XAttrs.

Unlike similar projects such as runROOTLESS (PRoot) and remainroot, subuidless can minimize the overhead of system call hooking, as subuidless does not use ptrace.

Status

Early POC. Do not use.

Why do we need subuidless?

  • It is hard to configure /etc/subuid and /etc/subgid in LDAP environments
  • Some container images may require strange UIDs/GIDs that are out of the typical /etc/subuid and /etc/subgid configuration. The typical configuration only allows 65,536 IDs to be available in the container.

Goals and non-goals

Goals:

  • Simplicity
  • Minimal overhead

Non-goals:

  • Provide security boundry across emulated IDs

Requirements

  • Rust Toolchain
  • libseccomp

Note: There is a devbox.json File for easier setup

Usage

Terminal 1:

$ cargo run --bin subuidless
Listening on $XDG_RUNTIME_DIR/subuidless.sock
...

Terminal 2:

$ docker run -it --security-opt seccomp=seccomp.json alpine:latest
/ # touch foo
/ # chown 42:42 foo
/ # ls -ln foo
-rw-r--r--    1 42       42               0 Apr 17 06:19 foo

The UID ang GID are recorded to the user.rootlesscontainers xattr of the target file.

Hooked system calls

  • fchown

  • fchownat

  • lchown

  • fstatat

  • ...

TODO:

https://github.com/rootless-containers/PRoot/blob/081bb63955eb4378e53cf4d0eb0ed0d3222bf66e/src/extension/fake_id0/fake_id0.c#L141-L205
https://github.com/cyphar/remainroot/blob/master/src/ptrace/generic-shims.c

subuidless-archiv's People

Contributors

srylax avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.