Skip to content

Conversation

apostasie
Copy link
Contributor

See README for detailed rationale.

TL;DR:
This indirect dependency has an unavoidable init() routine that will systematically openat and fcntl (reading /proc/sys/kernel/cap_last_cap), even / while it is not necessary.
gomodjail will (righfully) block this, resulting in a series of loud warnings - or we would have to unconfine this dependency.
Precisely because this project has been abandoned for multiple years and the maintainer seem to have vanished, marking it unconfined feels exactly like the kind of things we should not do - as a likely candidate for a supply chain compromise.

This PR suggests we replace it.
The only part we do need is mundane (the mere list of linux capabilities), which is what we implement here from https://github.com/torvalds/linux/blob/master/include/uapi/linux/capability.h

Note that the state of this dependency has already raised concerns enough that most recent contributors have closed their PRs over there, and at least RH Kolyshkin did fork it: https://github.com/kolyshkin/capability

An alternative future / better solution would be for opencontainers/runtime-tools to address this on their side, since the dependency is getting pulled by them:

graph-main

@apostasie
Copy link
Contributor Author

apostasie commented May 2, 2025

This was uncovered while working on #4180
Gomodjail is really cool ❤️

@apostasie
Copy link
Contributor Author

Failures are docker hub 429, gomodjail concurrency issue, and one of the EL8 flakes.

@apostasie apostasie marked this pull request as ready for review May 2, 2025 17:32
@apostasie apostasie closed this May 2, 2025
@apostasie apostasie reopened this May 2, 2025
@AkihiroSuda
Copy link
Member

An alternative future / better solution would be for opencontainers/runtime-tools to address this on their side, since the dependency is getting pulled by them:

👍

Also CDI shouldn't depend on runtime-tools as runtime-tools is also relatively inactive

@AkihiroSuda AkihiroSuda closed this May 3, 2025
@apostasie
Copy link
Contributor Author

@AkihiroSuda you did mean to close this, right? (just checking if you are saying "this problem must go upstream", or if you closed accidentally - either way is fine with me).

@AkihiroSuda
Copy link
Member

Let me close this. I don't think we should fork the repo just for eliminating the single //gomodjail:unconfined line.

Thanks anyway for heading this up.

@apostasie
Copy link
Contributor Author

Sure. No problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants