• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NVIDIA / nvidia-container-toolkit / 34348389242
44%
main: 44%

Build:
Build:
LAST BUILD BRANCH: dependabot/docker/deployments/container/main/nvidia/distroless/go-v4.1.3
DEFAULT BRANCH: main
Ran 09 Sep 2026 11:59AM UTC
Jobs 1
Files 248
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Sep 2026 11:58AM UTC coverage: 44.04% (+0.02%) from 44.017%
34348389242

Pull #2059

github

klueska
update-ldcache hook: exec ldconfig from a sealed memfd

UpdateLDCache used to mount a fresh /proc inside the container root,
just so it could bind-mount the host ldconfig binary in through a
TOCTOU-safe /proc/self/fd/<n> target and then exec it by that same
path once pivoted.

This breaks under gVisor. Its createContainer hook doesn't have
permission to mount a new /proc inside the container, so mountProc
fails with EPERM. This constitutes a real regression, because this
hook worked fine before the changes described above were introduced.

To address this, UpdateLDCache now clones the host ldconfig binary
into a sealed, anonymous memfd (via libcontainer/exeseal.CloneBinary)
before touching any namespace or pivoting, then execs it by
descriptor with execveat(fd, "", ..., AT_EMPTY_PATH). A memfd has no
path and no mount-namespace membership, so it comes through
pivot_root untouched. We don't need to bind-mount anything into the
container, and we don't need to mount /proc anywhere.

This is also more isolated than before. Since ldconfig has no use
for /proc or /sys, prepareRoot now masks both with an empty tmpfs
before pivoting, if they're present in the container root, instead of
leaving a real working procfs mounted there and trusting ldconfig
never reads it.

We verified all of this against real GPU hardware through gVisor's
runsc runtime, as well as standard runc. `docker run --runtime=runsc
--device nvidia.com/gpu=0` against a non-Debian image resolves the
driver libraries and runs nvidia-smi correctly, confirming the hook
and the /proc/sys masking both work under gVisor's restricted-
namespace gofer process.

Signed-off-by: Kevin Klues <kklues@nvidia.com>
Pull Request #2059: update-ldcache hook: exec ldconfig from a sealed memfd

0 of 54 new or added lines in 2 files covered. (0.0%)

5 existing lines in 2 files now uncovered.

5952 of 13515 relevant lines covered (44.04%)

0.44 hits per line

Uncovered Changes

Lines Coverage ∆ File
38
0.0
0.0% internal/ldconfig/ldconfig_linux.go
16
31.85
-0.36% internal/ldconfig/ldconfig.go

Coverage Regressions

Lines Coverage ∆ File
4
31.85
-0.36% internal/ldconfig/ldconfig.go
1
0.0
0.0% internal/ldconfig/ldconfig_linux.go
Jobs
ID Job ID Ran Files Coverage
1 34348389242.1 09 Sep 2026 11:59AM UTC 248
44.04
GitHub Action Run
Source Files on build 34348389242
  • Tree
  • List 248
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34348389242
  • Pull Request #2059
  • PR Base - main (#34294162008)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc