containers / containers/bubblewrap

Can't run bubblewrap inside bubblewrap when using --cap-add

Open
#397 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.7k
Forks
386
Avg merge
3d 17h
Merged PRs (30d)
11

Description

These work:
`bwrap --dev-bind / / --cap-add ALL -- chroot / sh`
`bwrap --dev-bind / / -- bwrap --dev-bind / / -- sh`
This doesn't:
`bwrap --dev-bind / / --cap-add ALL -- bwrap --dev-bind / / -- sh`
It tells me: `bwrap: Unexpected capabilities but not setuid, old file caps config?`

I am using bubblewrap from NixOS, so it's not setuid and has no capabilities or other special permissions.

Is this supposed not to work? It seems to be triggered by [this piece of code](https://github.com/containers/bubblewrap/blob/bae85baf7208c4acddd9cf032059d1429f179e4a/bubblewrap.c#L780); is it insecure if bubblewrap somehow has capabilities set by a parent bubblewrap? Can't the capabilities somehow be dropped?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.