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

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

Build:
Build:
LAST BUILD BRANCH: pull-request/2063
DEFAULT BRANCH: main
Ran 10 Sep 2026 05:57AM 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

10 Sep 2026 05:38AM UTC coverage: 44.03% (+0.01%) from 44.02%
34443089629

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 56 new or added lines in 2 files covered. (0.0%)

6 existing lines in 3 files now uncovered.

5952 of 13518 relevant lines covered (44.03%)

0.44 hits per line

Uncovered Changes

Lines Coverage ∆ File
38
0.0
0.0% internal/ldconfig/ldconfig_linux.go
18
31.5
-0.71% internal/ldconfig/ldconfig.go

Coverage Regressions

Lines Coverage ∆ File
4
31.5
-0.71% internal/ldconfig/ldconfig.go
1
42.11
0.51% cmd/nvidia-ctk/config/config.go
1
0.0
0.0% internal/ldconfig/ldconfig_linux.go
Jobs
ID Job ID Ran Files Coverage
1 34443089629.1 10 Sep 2026 05:57AM UTC 248
44.03
GitHub Action Run
Source Files on build 34443089629
  • Tree
  • List 248
  • Changed 5
  • Source Changed 5
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34443089629
  • Pull Request #2059
  • PR Base - main (#34408742234)
  • 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