Skip to content

DNM: fix: add support for cap add/drop in QEMU's SSH session #55742

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

89luca89
Copy link
Member

chroot will break nested unshares
bwrap uses pivot_root which works for unshares, but will not work inside a ramfs

as a workaround, we switch_root from ramfs into a tmpfs, then pivot_root will work, and we can use bwrap-shell instead of the ChrootDirectory option of sshd

This needs to be tested thoroughly as it's a potentially big change compared to the "simple" ssh+chroot current situation

Fixes: https://github.com/chainguard-dev/prodsec/issues/282

Goes in hand with Melange PR: chainguard-dev/melange#2032
for passing the caps add/drop via env variables

Signed-off-by: Luca Di Maio <[email protected]>
@octo-sts octo-sts bot added the bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages. label Jun 10, 2025
@89luca89 89luca89 changed the title DNM: fix: add support for cap add/drop in QEMU's SSH session fix: add support for cap add/drop in QEMU's SSH session Jun 12, 2025
@89luca89 89luca89 changed the title fix: add support for cap add/drop in QEMU's SSH session DNM: fix: add support for cap add/drop in QEMU's SSH session Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bincapz/pass bincapz/pass Bincapz (aka. malcontent) scan didn't detect any CRITICALs on the scanned packages.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant