Hunting TOCTOU Races and Memory-Safety Bugs in NVIDIA’s Native Toolchain
The author describes a time-of-check/time-of-use race in libnvidia-container's mount setup, where library paths are resolved and later mounted, letting an attacker who controls a container image swap what those paths point to. Using the public CVE-2024-0132 as the worked example, a symlink swap could reach the host filesystem and lead to host takeover.
Cybersecurity
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
I spent a chunk of this year doing native and local vulnerability research against NVIDIA's stack under their public bounty program on Intigriti, starting 2026-06-23. This is not web hunting: it is source-level auditing and dynamic PoC-building against C and Go codebases that run with real host privilege, scoped AV:Local. Two findings from that work are closed and paid, and I can walk through those with real dates and real commands. A separate line of memory-safety research against NVIDIA's compiler-toolchain CLI tooling is still sitting with their team, unresolved, and I am not naming the tools, the bug class specifics or anything else about it here. Publishing that before a fix ships is not research, it is just handing out a weapon.
What I can give you is the actual process, because the process is the reusable part.
Context
The target is NVIDIA's native toolchain: libnvidia-container and the container-toolkit hooks that sit underneath it, plus a separate line of compiler-toolchain CLI work that stays out of this post. These are C and Go codebases that run with real host privilege, and the bounty scope is AV:Local. The worked example is the mount-setup path: the library resolves a set of library paths, then mounts them into the container. That resolve-then-mount split is the whole story.
Two findings are closed and paid. A third line of memory-safety work against the compiler-toolchain CLI tooling is still open with the vendor and stays out of this post.
The two closed findings
H-1: TOCTOU in libnvidia-container's mount core
Class: a time-of-check/time-of-use race in the mount-setup path of libnvidia-container's C core, the same general family as the publicly disclosed CVE-2024-0132 container-escape class. I use that CVE as the teaching example below, since it is fully public and makes a better worked example than my own writeup of my own bug.
Timeline, as it actually happened:
- 2026-06-23, 5:21 PM: filed on Intigriti.
- 2026-06-23, 10:40 PM: closed Informative the same night. The triager disputed my version-dating.
- 2026-07-02 to 2026-07-08: rebuttal thread, clarifying the exact version and config I had tested against.
- 2026-07-04: built and posted a live-exploit proof against the real, unmodified production binary, with zero physical GPU hardware required to demonstrate it. First honest run: 11/100 trials.
- 2026-07-04, 10:11 PM: triager replies that the PoC does not reproduce on their end.
- 2026-07-05 to 2026-07-23: I go find out why. Three environment and harness gaps on my side, fixed one at a time, re-verified at 4/50 trials. Lower raw count, but a consistent rate once the harness was actually correct, which matters more than the raw number. Posted a corrected, portable harness.
- 2026-07-28 to 2026-08-20: no further movement through normal channels, so I escalated directly to
[redacted]. They acknowledged and said they had raised it with the Intigriti triage side. - 2026-08-21 to 2026-08-22: reopened, then closed Informative again.
- 2026-08-22: I pushed back with a statistical argument (11/100 and 4/50 with a fixed harness is not noise) and asked for a larger trial run on their side instead of taking my word for it.
- 2026-08-25, 12:16 PM: status flips from Informative back to Triage.
- 2026-08-25, 9:41 PM: closed as Duplicate of NVIDIA-G9G72YJS, severity cut from the Critical I had filed at down to Medium, bounty $1,500.
Two months, two Informative closes, a PSIRT escalation and a rewritten harness before it landed as a paid duplicate. I am including that whole arc on purpose. The useful lesson is not the bug: it is that a real race condition against a real binary can still get closed twice before triage catches up to it, and the thing that turned it around was not a better payload. It was a more reliable reproduction and a statistical argument for why 11/100 was not noise.
L-1: chmod hook follows symlinks
Class: a symlink-follow issue in a chmod-related container-toolkit hook. The filing date is not precisely recorded in my notes, somewhere between 2026-06-24, when I initially held off submitting it over reachability concerns, and its resolution. Closed 2026-07-03 as Duplicate of NVIDIA-0LEYP7D7, no bounty.
I am keeping the root-cause detail on both at the class level above. They closed as duplicates of two existing internal reports, NVIDIA-G9G72YJS and NVIDIA-0LEYP7D7, that I did not file myself, so the deeper technical writeup on those specific root causes belongs to whoever did file them, not to me.
Setup
This is not web hunting, so the tooling list is different from a Burp plus ffuf setup. One lab environment, a specific stack of utilities that each step below actually depends on, and a hard rule about where any of this runs.
The VM
I never test against my host machine. A race harness or a fuzzer crash can leave a box in a bad state, and a container-escape PoC is, by definition, trying to break an isolation boundary. You do not want to find out the hard way that it worked a little too well. Everything runs inside a disposable Linux VM:
brew install lima
limactl start --name=nvlab template:
limactl shell nvlab
Lima gets you a real Linux VM (not a container) on a Mac host in a couple of minutes, with the project directory auto-mounted. That is good enough for this class of work when you do not have spare bare metal: the TOCTOU class here lives in the mount and container-setup logic, not inside the GPU driver itself, so you do not need physical GPU hardware in the loop to audit or race it. If a later step needs real hardware, swap this for bare metal or a cloud GPU instance and keep everything else the same.
Base toolchain, inside the VM:
sudo apt update
sudo apt install -y build-essential git curl ripgrep gdb strace ltrace \
tmux python3-pip python3-venv pkg-config bmake libelf-dev
ripgrep(rg): the resolve-then-use sweep in Step 2 lives or dies on how fast you can re-run it across a big C/Go tree.gdb,strace,ltrace: for confirming, syscall by syscall, exactly where the check happens and where the use happens, before you build a race harness around a guess.strace -f -e trace=stat,lstat,open,mount,rename,symlink <target>is usually the first command I run against anything new.tmux: a race harness needs at least two terminals running concurrently, the stalled victim process in one pane and the filesystem swap in another. tmux panes beat juggling separate SSH sessions.bmake,libelf-dev: specific to buildinglibnvidia-containeritself. Its Makefile expects BSD-make semantics in places, andWITH_LIBELF=yes(used in Step 1) needs the system libelf headers present.
Container-runtime pieces
To drive the toolkit end to end instead of only reading the source, you need a real container runtime underneath it, plus the packaged toolkit alongside your own from-source build so you can diff behaviour directly rather than reading two commits side by side:
curl -fsSL https:
sudo usermod -aG docker $USER
distribution=$(. /etc/os-release; echo $ID$VERSION_ID)
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt update && sudo apt install -y nvidia-container-toolkit
Race-harness pieces
python3 -m venv ~/venvs/fuse
source ~/venvs/fuse/bin/activate
pip install fusepy
sudo apt install -y fuse3 libfuse3-dev
fusepy is what the stall_fuse.py harness in Step 3 is built on. You also want unshare and nsenter (from util-linux, installed by default on Ubuntu) whenever you are reasoning about mount-namespace boundaries directly instead of only through the container runtime's own CLI.
Fuzzing and memory-safety pieces
sudo apt install -y clang lld llvm
git clone https://github.com/AFLplusplus/AFLplusplus
cd AFLplusplus && make distrib && sudo make install
clang: you want a reasonably current Clang for-fsanitize=address,undefined,fuzzersupport and AFL++'safl-clang-fastinstrumentation mode. The stock GCC on most distros will not give you libFuzzer at all.- AFL++ built via
make distrib, not plainmake: that target pulls inafl-clang-fast,qemu_modeand the extra triage utilities (afl-tmin,afl-cmin) used in the crash-triage step later. The bare build skips them. - Past a handful of unique crashes,
casr(cargo install casr, needs a Rust toolchain) auto-clusters crashes by root cause and gives a rough exploitability estimate. Worth adding once you need to prioritise which crash to triage first instead of reading every ASan report by eye.
None of this is exotic. It is close to the full environment for both lanes of the work: a disposable Linux VM, a normal build toolchain, strace and gdb to confirm timing before you automate it, FUSE to force a race deterministically, and AFL++/libFuzzer plus sanitizers for the memory-safety side. The research is what takes the time, not the setup.
Finding it
The public worked example: CVE-2024-0132
Since Wiz Research already published the complete technical breakdown of CVE-2024-0132, I use it as the worked example instead of my own private candidates. This is the exact shape of bug I was hunting for, and Wiz's writeup is detailed enough to teach the whole pattern honestly.
The bug, per Wiz's own disclosure: libnvidia-container (pre-1.17.4) resolves a set of library paths with find_library_paths(), which globs /usr/local/cuda/compat/lib*.so.*. That is the check. Later, mount_files() iterates that already-resolved list and mounts root + paths[i] into the container. That is the use. Between the two, an attacker who controls the container image's filesystem can substitute what those paths resolve to: first a directory shadows an expected library file on one mount pass, which changes what the next resolution step sees; then a symlink dropped at the next expected name, pointing at ../../../../../../, gets walked by the kernel when the second mount pass reaches it. A read-only host root mounted into the container is still enough to reach docker.sock and go from there to full host takeover. Fixed in 1.17.4.
That is a textbook two-pass check-then-use gap, and it is the pattern I go looking for everywhere I work on this class of software.
Exploitation
Step 1: pin the source, do not guess at a binary
Real commands from my own build, on a Lima VM (nvlab, Ubuntu aarch64, 4 vCPU / 6GB RAM / 20GB disk, gcc-15 + Go 1.26.4):
git -C libnvidia-container describe # v1.19.1
# pinned exact source commit for this audit pass:
# [redacted]
make WITH_LIBELF=yes
# without this flag the vendored elftoolchain build fights modern GNU ld's
# -soname syntax; WITH_LIBELF=yes routes it through the system libelf instead
apt install libtirpc-dev
cp /usr/include/tirpc/rpc/*.h /usr/include/rpc/
make LDLIBS=-ltirpc
# Sun-RPC headers were stripped from modern glibc; libnvidia-container's
# build still expects them at /usr/include/rpc, so you either vendor them
# back in or link against libtirpc and copy the headers manually
nvidia-container-cli --version
# 1.19.1+20.g0d1d749 <- confirms you built what you think you built
That last line matters more than it looks. I burned real time on H-1's first Informative close arguing about exactly which version I had tested, because I had not nailed down git describe output as evidence up front. Get the version string into your report before anyone asks for it.
Step 2: sweep for the resolve-then-use idiom, mechanically
You are grepping for pairs: something that resolves a path (stat, lstat, realpath, readlink, a cached glob result) and, anywhere later in the same control flow, not necessarily the next line, something that acts on that same value in a privileged way (open, mount, chmod, chown, unlink, or the value getting handed to a subprocess or hook).
rg -n '\b(stat|lstat|realpath|readlink|glob)\s*\(' --type=c
# then for each candidate variable, find every later use in the same file
rg -n '\b(open|mount|chmod|chown|unlink|symlink)\s*\(' --type=c
That is crude on its own. The real work is reading each pair by hand and asking whether anything reachable by an attacker sits between the two calls. But it is how you generate the candidate list before you spend real time on any single one. If the codebase has shipped a TOCTOU CVE before (and container runtimes usually have, see also runc's CVE-2019-5736), pull the fix commit first and grep every other function for the same idiom the fix only patched in one place. Vendor fixes are almost never as surgical as the report that prompted them.
Step 3: stop relying on timing luck, force the race deterministically
A PoC that wins "eventually, in a loop" is weak evidence, and it is exactly the kind of thing that gets you a "does not reproduce" reply from a triager, which is what happened to me on 2026-07-04. The fix is not a faster loop. It is removing timing from the equation entirely: stall the check syscall under your control, swap the filesystem state while it is stalled, then let it resume into the use step pointed somewhere else. FUSE is the standard way to do the stall. Here is the generic shape of that harness (illustrative, not tied to any specific target's code):
import os, time, errno
from fuse import FUSE, FuseOSError, Operations
STALL_TARGET = "/watched/target.so"
STALL_SECONDS = 2.0
class StallFS(Operations):
def getattr(self, path, fh=None):
if path == STALL_TARGET:
time.sleep(STALL_SECONDS) # <-- the deterministic window
st = os.lstat("." + path)
return {k: getattr(st, k) for k in (
'st_mode','st_ino','st_dev','st_nlink','st_uid',
'st_gid','st_size','st_atime','st_mtime','st_ctime')}
# readdir/open/read passthrough omitted for brevity
if __name__ == '__main__':
FUSE(StallFS(), '/mnt/stallfs', foreground=True, allow_other=True)
python3 stall_fuse.py &
run-victim-tool --target /mnt/stallfs/watched/target.so
# terminal 2: during the STALL_SECONDS window, win the race every time
ln -sfn /evil/redirect /mnt/stallfs/watched/target.so
Every run, 100% of the time, instead of 11/100. That is the difference between "here is a theory" and "here is a reproduction", and it is the single change that would have saved three weeks of back-and-forth on H-1.
Step 4: build the reachability matrix before you get excited
Before treating anything as a finding, answer four questions. What privilege level does the victim process run at? Does the vulnerable path require a non-default flag or config? Does it fire on every invocation or only on some admin subcommand? And, critically for a container runtime, is there even an attacker-controllable filesystem in play at the moment the check happens? A container image you control is a very different precondition from a local user racing another local user's files. This is where most candidates die, and it is supposed to be where most candidates die.
Memory-safety testing: the methodology, without the findings
Compiler-adjacent CLI tooling (linkers, demanglers, anything that parses attacker-shaped symbol or object data) is a classic, under-tested memory-corruption surface, because everyone treats it as "just a build tool" when it often runs with real trust and consumes data an attacker can shape: a package, a precompiled object, a crafted input file.
Harness shape (libFuzzer, generic target signature):
#include <stdint.h>
#include <stddef.h>
// LLVMFuzzerTestOneInput is the entry point libFuzzer drives directly —
// isolate just the parsing/decoding function so you pay no process-
// startup cost per iteration.
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size < 4) return 0;
parse_target_format(data, size); // the function under test
return 0;
}
Build with sanitizers on. This is non-negotiable: a crash without ASan just tells you it crashed, a crash with ASan tells you what kind of memory violation it was and roughly where:
clang -fsanitize=address,undefined,fuzzer -g -O1 \
-o fuzz_harness fuzz_harness.c target_parser.c
mkdir -p corpus
# seed with REAL samples of the format, not empty/random input —
# coverage-guided fuzzing converges far faster from realistic seeds
cp /usr/lib/real-sample-inputs/* corpus/
./fuzz_harness -max_len=4096 -jobs=4 corpus/
Or the AFL++ persistent-mode equivalent when the target's build system fits that better:
AFL_USE_ASAN=1 afl-clang-fast -o target_afl target_parser.c
afl-fuzz -i corpus/ -o findings/ -- ./target_afl @@
Triage, once it finds something:
afl-tmin -i findings/crashes/id:000001 -o min_crash -- ./target_afl @@
# then run it once under ASan directly and read the report.
./fuzz_harness min_crash
From the ASan report, the question that actually matters for severity: is this an out-of-bounds read (often "just" info disclosure or a crash) or a write (much closer to exploitable)? Is the out-of-bounds offset attacker-influenced, or is it a fixed one-past-the-end that never moves regardless of input? Dedupe every unique crash by its actual faulting stack before you count anything, and reproduce each one manually with a hand-built minimal input outside the fuzzer before it goes anywhere near a report. Fuzzer output is a lead, not evidence.
I ran this exact process (harness, sanitizers, corpus, triage) against a set of NVIDIA's compiler-toolchain CLI binaries. It surfaced results that are currently still with NVIDIA's team, unresolved. That is as far as this post goes on that thread: no tool names, no function names, no crash details, no repro inputs. If a fix ships and a disclosure window opens, that is a different post.
Root cause
The mistake is the split between check and use. In the CVE-2024-0132 shape, find_library_paths() resolves the paths once, and mount_files() later re-resolves and mounts root + paths[i]. Between the two, the attacker controls what the name resolves to, because the container image's filesystem is attacker-controlled. A directory shadows an expected library file on one mount pass, changing what the next resolution step sees, and a symlink dropped at the next expected name is walked by the kernel on the second mount pass. The check and the use are two separate resolutions of the same name, and the name can change in between.
Existing defences did not stop it because the mount path is privileged by design: a read-only host root mounted into the container is still enough to reach docker.sock and go from there to full host takeover. The fix in 1.17.4 closed that instance, but the idiom is what recurs.
Impact
For the CVE-2024-0132 class, the impact is container escape: an attacker who controls the container image's filesystem can turn a read-only host root mount into access to docker.sock and from there to full host takeover. The precondition is that the attacker controls the container image's filesystem at the moment the check happens.
For H-1, the filed severity was Critical, cut to Medium on triage, with a $1,500 bounty as a duplicate of NVIDIA-G9G72YJS. For L-1, the symlink-follow in the chmod-related hook closed as a duplicate of NVIDIA-0LEYP7D7 with no bounty. The memory-safety line against the compiler-toolchain CLI binaries is unresolved and its impact is not described here.
Fix
For the CVE-2024-0132 class, the fix shipped in 1.17.4.
Variants to test
- Every other function with the same idiom. Pull the fix commit for any TOCTOU CVE the codebase has already shipped, then grep every other function for the resolve-then-use pair the fix only patched in one place. A positive result is a function that resolves a path with
stat,lstat,realpath,readlinkor a cached glob, and later acts on the same value withopen,mount,chmod,chown,unlinkor a subprocess handoff, with attacker-reachable state in between. - Compiler-adjacent parsers. Linkers, demanglers and anything that parses attacker-shaped symbol or object data. A positive result is an ASan report from a hand-built minimal input, reproduced outside the fuzzer, with a faulting stack that dedupes as unique.
What actually mattered
Looking back at the H-1 timeline, the thing that moved it from a second Informative close to a paid duplicate was not a sharper payload. It was making the race deterministic instead of probabilistic, and having a version-pinned build with git describe output ready before anyone asked. On the memory-safety side, the thing that separates a real finding from fuzzer noise is exactly the same discipline: reproduce it by hand, outside the tool that found it, before you believe it yourself.
Reference: Wiz Research: NVIDIA AI Vulnerability: Deep Dive into CVE-2024-0132

A decade of working for others, an year of working for the love of subject
FAQ
What happened, in plain words
Over part of 2026 I did security research on NVIDIA's software, through their public bug bounty programme hosted on a platform called Intigriti. A bug bounty programme is a deal: a company says "if you find a flaw in our software and report it to us privately, we may pay you a reward". Intigriti is the website where those reports are filed and tracked.
This was not the usual kind of hunting where you poke at websites in a browser. It was the deeper kind: reading the actual source code of programs written in the C and Go programming languages, and building small demonstrations that prove a flaw is real. Those programs run with real power on the machine they sit on, which is what the scope label AV:Local means: the attacker has to already be on, or able to run something on, the same machine.
Two of my findings were accepted, closed and paid. A third line of work, about a class of bug called memory safety in NVIDIA's compiler tooling, is still open with NVIDIA's team and I am deliberately not describing it. Publishing an unfixed bug is not research, it is handing out a weapon.
What follows is the process, because the process is the part you can reuse.
Context
The target is NVIDIA's native toolchain. That means libnvidia-container, a library that helps set up containers so they can see NVIDIA hardware, plus the container-toolkit hooks that sit underneath it, plus a separate line of compiler-toolchain CLI work that stays out of this post.
A container is a lightweight, sealed-off box on a computer: a program inside it sees its own little filesystem and its own processes, not the whole machine. The whole point is isolation. A container escape is when something inside the box breaks out and reaches the real machine.
A hook, in this context, is a small program the container toolkit runs at a particular moment during setup, for example to fix file permissions.
The worked example is the mount-setup path. Mounting means attaching a folder or file from one place so it appears at another place. In CVE-2024-0132 the library first works out a list of library file paths (the check), then later mounts those paths into the container (the use). That split between resolving a name and acting on it is the whole story.
Two findings are closed and paid. A third line of memory-safety work against the compiler-toolchain command-line tools is still open with the vendor and stays out of this post.
The two closed findings
H-1: TOCTOU in libnvidia-container's mount core
Class: a time-of-check/time-of-use race, usually shortened to TOCTOU, in the mount-setup path of libnvidia-container's C core. It belongs to the same general family as a publicly disclosed bug called CVE-2024-0132, which is a container-escape class. I use that public bug as the teaching example below, because it is fully public and makes a better worked example than my own writeup of my own bug.
What is a TOCTOU race? Imagine a bouncer checks your ticket at the door, then you walk to the bar and the bartender serves you based on the bouncer's nod. If, in the moment between the nod and the serve, you swap your ticket for someone else's, the bartender never notices. The check happened at one moment, the use at another, and the thing being checked changed in between. In software the "thing" is usually a file path, and the swap is done by an attacker who controls part of the filesystem.
Timeline, as it actually happened:
- 2026-06-23, 5:21 PM: filed on Intigriti.
- 2026-06-23, 10:40 PM: closed Informative the same night. The triager disputed my version-dating. A triager is the person at the platform who first reads a report and decides whether it is a real, in-scope bug. Informative is a status meaning "thanks, but this does not count as a payable finding". Version-dating means pinning down exactly which release of the software the bug was tested against.
- 2026-07-02 to 2026-07-08: rebuttal thread, clarifying the exact version and config I had tested against.
- 2026-07-04: built and posted a live-exploit proof against the real, unmodified production binary, with zero physical GPU hardware required to demonstrate it. First honest run: 11/100 trials. A proof of concept, or PoC, is a small demonstration that actually triggers the bug. A binary is a compiled program, the thing you run. A GPU is a graphics chip; here it matters because people assume you need one to test NVIDIA software, and for this bug you do not.
- 2026-07-04, 10:11 PM: triager replies that the PoC does not reproduce on their end.
- 2026-07-05 to 2026-07-23: I go find out why. Three environment and harness gaps on my side, fixed one at a time, re-verified at 4/50 trials. Lower raw count, but a consistent rate once the harness was actually correct, which matters more than the raw number. Posted a corrected, portable harness. A harness is the scaffolding you build around a target to run it repeatedly and reliably.
- 2026-07-28 to 2026-08-20: no further movement through normal channels, so I escalated directly to
[redacted]. PSIRT is a company's Product Security Incident Response Team, the group that handles security reports. They acknowledged and said they had raised it with the Intigriti triage side. - 2026-08-21 to 2026-08-22: reopened, then closed Informative again.
- 2026-08-22: I pushed back with a statistical argument (11/100 and 4/50 with a fixed harness is not noise) and asked for a larger trial run on their side instead of taking my word for it.
- 2026-08-25, 12:16 PM: status flips from Informative back to Triage.
- 2026-08-25, 9:41 PM: closed as Duplicate of NVIDIA-G9G72YJS, severity cut from the Critical I had filed at down to Medium, bounty $1,500. A duplicate means someone else had already reported the same underlying bug, so the reward goes to the earlier report. Severity is a rough rating of how bad a bug is; Critical is the top, Medium is in the middle.
Two months, two Informative closes, a PSIRT escalation and a rewritten harness before it landed as a paid duplicate. I am including that whole arc on purpose. The useful lesson is not the bug: it is that a real race condition against a real binary can still get closed twice before triage catches up to it, and the thing that turned it around was not a better payload. It was a more reliable reproduction and a statistical argument for why 11/100 was not noise.
L-1: chmod hook follows symlinks
Class: a symlink-follow issue in a chmod-related container-toolkit hook. Two terms to unpack. chmod is the standard Unix operation that changes who is allowed to read, write or run a file. A symlink, or symbolic link, is a file that is really just a signpost pointing at another file: opening the symlink opens whatever it points to. If a program follows a symlink an attacker planted, the attacker can redirect a privileged operation to a file of their choosing.
The filing date is not precisely recorded in my notes, somewhere between 2026-06-24, when I initially held off submitting it over reachability concerns, and its resolution. Reachability means: can an attacker actually get to this code path in practice, or is it only reachable in a setup nobody uses? Closed 2026-07-03 as Duplicate of NVIDIA-0LEYP7D7, no bounty.
I am keeping the root-cause detail on both at the class level above. They closed as duplicates of two existing internal reports, NVIDIA-G9G72YJS and NVIDIA-0LEYP7D7, that I did not file myself, so the deeper technical writeup on those specific root causes belongs to whoever did file them, not to me.
Setup
This is not web hunting, so the tooling list is different from a Burp plus ffuf setup. Burp and ffuf are common tools for testing websites; none of that applies here. What you need is one lab environment, a specific stack of utilities that each step below actually depends on, and a hard rule about where any of this runs.
The VM
I never test against my host machine. A race harness or a fuzzer crash can leave a box in a bad state, and a container-escape PoC is, by definition, trying to break an isolation boundary. You do not want to find out the hard way that it worked a little too well. Everything runs inside a disposable Linux VM. A VM, or virtual machine, is a whole computer simulated inside your computer: if you wreck it, you throw it away and make a new one. Linux is the operating system most servers and this kind of tooling run on.
brew install lima
limactl start --name=nvlab template:
limactl shell nvlab
Line by line:
brew install limainstalls Lima, a tool that creates and manages Linux virtual machines on a Mac.brewis Homebrew, the usual package installer on macOS.limactl start --name=nvlab template:creates and starts a VM callednvlab. Thetemplate:part is where a template name would go; the report shows it cut off at that point.limactl shell nvlabopens a terminal inside that VM, so every later command runs in the disposable Linux box rather than on your Mac.
Lima gets you a real Linux VM (not a container) on a Mac host in a couple of minutes, with the project directory auto-mounted. That is good enough for this class of work when you do not have spare bare metal: the TOCTOU class here lives in the mount and container-setup logic, not inside the GPU driver itself, so you do not need physical GPU hardware in the loop to audit or race it. If a later step needs real hardware, swap this for bare metal or a cloud GPU instance and keep everything else the same.
Base toolchain, inside the VM:
sudo apt update
sudo apt install -y build-essential git curl ripgrep gdb strace ltrace \
tmux python3-pip python3-venv pkg-config bmake libelf-dev
Line by line:
sudo apt updaterefreshes the list of available software packages.sudomeans "run this with administrator rights".aptis the package manager on Ubuntu and Debian Linux.sudo apt install -y ...installs the listed packages without asking for confirmation (-ymeans yes to everything). The backslash at the end of the first line just means "the command continues on the next line".
What each package is for:
ripgrep(rg): a very fast text search tool. The resolve-then-use sweep in Step 2 lives or dies on how fast you can re-run it across a big C/Go tree.gdb,strace,ltrace: for confirming, syscall by syscall, exactly where the check happens and where the use happens, before you build a race harness around a guess. A syscall is a program asking the operating system to do something, like open a file.strace -f -e trace=stat,lstat,open,mount,rename,symlink <target>is usually the first command I run against anything new. In that command,-fmeans follow child processes too,-e trace=...means only show these particular syscalls, and<target>is a placeholder for the program you are watching.tmux: a terminal multiplexer, meaning it lets you run several terminals side by side in one window. A race harness needs at least two terminals running concurrently, the stalled victim process in one pane and the filesystem swap in another. tmux panes beat juggling separate SSH sessions.bmake,libelf-dev: specific to buildinglibnvidia-containeritself. Its Makefile expects BSD-make semantics in places, andWITH_LIBELF=yes(used in Step 1) needs the system libelf headers present. A Makefile is the recipe file that tells the computer how to build a program; a header is a file that declares what functions exist so the compiler knows how to call them.
Container-runtime pieces
To drive the toolkit end to end instead of only reading the source, you need a real container runtime underneath it, plus the packaged toolkit alongside your own from-source build so you can diff behaviour directly rather than reading two commits side by side. A container runtime is the software that actually starts and manages containers. A commit is a saved snapshot of a code repository.
curl -fsSL https:
sudo usermod -aG docker $USER
Line by line:
curl -fsSL https:is the start of a command to download something from a web address. The report shows it cut off at that point, so the full address is not visible here.-fsSLare flags that make curl fail loudly on errors and follow redirects.sudo usermod -aG docker $USERadds your user account ($USER) to thedockergroup (-aGmeans append to group), which is how you get permission to use Docker without typingsudoevery time. Docker is the most common container runtime.
distribution=$(. /etc/os-release; echo $ID$VERSION_ID)
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | \
sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt update && sudo apt install -y nvidia-container-toolkit
Line by line:
distribution=$(. /etc/os-release; echo $ID$VERSION_ID)works out which version of Linux you are on and stores it in a variable calleddistribution. The$(...)runs the commands inside and captures their output.- The first
curldownloads NVIDIA's signing key. A signing key is a cryptographic stamp that proves a package really came from NVIDIA and was not tampered with.gpg --dearmorconverts it into the binary format the package manager expects, and-osays where to save it. - The second
curldownloads NVIDIA's package list file for your Linux version. Thesedcommand rewrites that file so it points at the signing key you just saved. The|symbol pipes the output of one command into the next, andteewrites it to a file while also showing it on screen. sudo apt update && sudo apt install -y nvidia-container-toolkitrefreshes the package list and installs the NVIDIA container toolkit. The&&means "only run the second command if the first succeeded".
Race-harness pieces
python3 -m venv ~/venvs/fuse
source ~/venvs/fuse/bin/activate
pip install fusepy
sudo apt install -y fuse3 libfuse3-dev
Line by line:
python3 -m venv ~/venvs/fusecreates a virtual environment, an isolated folder of Python packages so this project's tools do not interfere with anything else on the machine.source ~/venvs/fuse/bin/activateswitches your terminal into that environment.pip install fusepyinstallsfusepy, a Python library for talking to FUSE. FUSE is a way to let an ordinary program pretend to be a filesystem: the operating system asks your program for file information, and your program can answer however it likes, including slowly.sudo apt install -y fuse3 libfuse3-devinstalls the underlying FUSE system pieces.
fusepy is what the stall_fuse.py harness in Step 3 is built on. You also want unshare and nsenter (from util-linux, installed by default on Ubuntu) whenever you are reasoning about mount-namespace boundaries directly instead of only through the container runtime's own CLI. A mount namespace is a private view of what is mounted where: two processes can see completely different filesystems at the same paths. unshare and nsenter are commands for creating and entering those private views.
Fuzzing and memory-safety pieces
sudo apt install -y clang lld llvm
Line by line: this installs Clang (a C compiler), LLD (its linker) and LLVM (the toolkit they are built on). A compiler turns source code into a runnable program; a linker stitches the compiled pieces together.
git clone https://github.com/AFLplusplus/AFLplusplus
cd AFLplusplus && make distrib && sudo make install
Line by line:
git clone https://github.com/AFLplusplus/AFLplusplusdownloads the source code of AFL++, a fuzzer. A fuzzer is a program that throws huge numbers of slightly varied inputs at a target and watches for crashes.cd AFLplusplus && make distrib && sudo make installgoes into the downloaded folder, builds AFL++ with its full distribution target, and installs it system-wide.
Why these choices:
clang: you want a reasonably current Clang for-fsanitize=address,undefined,fuzzersupport and AFL++'safl-clang-fastinstrumentation mode. The stock GCC on most distros will not give you libFuzzer at all. A sanitizer is a special build mode that adds checks around every memory access, so when something goes wrong it tells you exactly what and where instead of just dying.- AFL++ built via
make distrib, not plainmake: that target pulls inafl-clang-fast,qemu_modeand the extra triage utilities (afl-tmin,afl-cmin) used in the crash-triage step later. The bare build skips them. - Past a handful of unique crashes,
casr(cargo install casr, needs a Rust toolchain) auto-clusters crashes by root cause and gives a rough exploitability estimate. Worth adding once you need to prioritise which crash to triage first instead of reading every ASan report by eye. ASan is the AddressSanitizer, the memory checker mentioned above.
None of this is exotic. It is close to the full environment for both lanes of the work: a disposable Linux VM, a normal build toolchain, strace and gdb to confirm timing before you automate it, FUSE to force a race deterministically, and AFL++/libFuzzer plus sanitizers for the memory-safety side. The research is what takes the time, not the setup.
Finding it
The public worked example: CVE-2024-0132
Since Wiz Research already published the complete technical breakdown of CVE-2024-0132, I use it as the worked example instead of my own private candidates. CVE stands for Common Vulnerabilities and Exposures: a public catalogue where each known bug gets a permanent ID number. This is the exact shape of bug I was hunting for, and Wiz's writeup is detailed enough to teach the whole pattern honestly.
The bug, per Wiz's own disclosure: libnvidia-container (pre-1.17.4) resolves a set of library paths with find_library_paths(), which globs /usr/local/cuda/compat/lib*.so.*. That is the check. Later, mount_files() iterates that already-resolved list and mounts root + paths[i] into the container. That is the use.
In plain words: a function called find_library_paths() looks for files whose names match a pattern. A glob is a wildcard search: lib*.so.* means "anything starting with lib, then anything, then .so., then anything". The * is the wildcard. That search is the check. Later, a function called mount_files() walks down the list it got back and mounts each one into the container. That is the use.
Between the two, an attacker who controls the container image's filesystem can substitute what those paths resolve to. A container image is the packaged starting filesystem a container is built from; if the attacker supplies the image, they control what is in it. First a directory shadows an expected library file on one mount pass, which changes what the next resolution step sees; then a symlink dropped at the next expected name, pointing at ../../../../../../, gets walked by the kernel when the second mount pass reaches it. The kernel is the core of the operating system. A path like ../../../../../../ means "go up six folders", which from deep inside a container can climb out towards the real machine's root.
A read-only host root mounted into the container is still enough to reach docker.sock and go from there to full host takeover. The host is the real machine underneath the container. docker.sock is the control socket for Docker: whoever can talk to it can tell Docker to do things, which effectively means controlling the host. Read-only means you cannot change files, but you can still read them and talk to that socket. Fixed in 1.17.4.
That is a textbook two-pass check-then-use gap, and it is the pattern I go looking for everywhere I work on this class of software.
Exploitation
Step 1: pin the source, do not guess at a binary
Real commands from my own build, on a Lima VM (nvlab, Ubuntu aarch64, 4 vCPU / 6GB RAM / 20GB disk, gcc-15 + Go 1.26.4). aarch64 is the 64-bit ARM processor family; vCPU means virtual processor cores.
git -C libnvidia-container describe # v1.19.1
Line by line: git -C libnvidia-container runs git inside the libnvidia-container folder. describe asks git to produce a human-readable name for the current code state, usually the nearest version tag. The # v1.19.1 is the output: this checkout is at version 1.19.1.
# pinned exact source commit for this audit pass:
# [redacted]
make WITH_LIBELF=yes
# without this flag the vendored elftoolchain build fights modern GNU ld's
# -soname syntax; WITH_LIBELF=yes routes it through the system libelf instead
apt install libtirpc-dev
cp /usr/include/tirpc/rpc/*.h /usr/include/rpc/
make LDLIBS=-ltirpc
# Sun-RPC headers were stripped from modern glibc; libnvidia-container's
# build still expects them at /usr/include/rpc, so you either vendor them
# back in or link against libtirpc and copy the headers manually
nvidia-container-cli --version
# 1.19.1+20.g0d1d749 <- confirms you built what you think you built
Line by line:
- The two comment lines record the exact commit hash,
[redacted]. A commit hash is a unique fingerprint of one saved state of the code. Recording it means nobody can later argue about which code you tested. make WITH_LIBELF=yesbuilds the library, telling the build to use the system's libelf rather than a bundled copy. The comment explains why: the bundled copy does not get along with the modern linker's handling of-soname, which is the setting that records a library's own name inside it.apt install libtirpc-devinstalls a package providing Sun-RPC headers. RPC here is remote procedure call, an old mechanism for one program to call functions in another.cp /usr/include/tirpc/rpc/*.h /usr/include/rpc/copies those header files to the old location the build expects.make LDLIBS=-ltirpcbuilds again, this time linking against thetirpclibrary (-ltirpc).- The comment explains the reason: modern glibc (the standard C library on Linux) removed those old headers, but libnvidia-container's build still looks for them in the old place.
nvidia-container-cli --versionasks the freshly built program to print its version. The output1.19.1+20.g0d1d749confirms you built what you think you built: version 1.19.1, 20 commits past the tag, at commit0d1d749.
That last line matters more than it looks. I burned real time on H-1's first Informative close arguing about exactly which version I had tested, because I had not nailed down git describe output as evidence up front. Get the version string into your report before anyone asks for it.
Step 2: sweep for the resolve-then-use idiom, mechanically
You are grepping for pairs: something that resolves a path (stat, lstat, realpath, readlink, a cached glob result) and, anywhere later in the same control flow, not necessarily the next line, something that acts on that same value in a privileged way (open, mount, chmod, chown, unlink, or the value getting handed to a subprocess or hook).
Grepping means searching text for a pattern. Each of those function names does something specific: stat and lstat ask the filesystem about a file (its size, type, permissions); realpath turns a path into its final, fully resolved form; readlink reads where a symlink points; open opens a file; mount attaches a filesystem; chmod and chown change permissions and ownership; unlink deletes a file. Control flow means the order in which a program runs its lines, which can jump around.
rg -n '\b(stat|lstat|realpath|readlink|glob)\s*\(' --type=c
Line by line: rg is ripgrep. -n shows line numbers. The quoted part is a pattern meaning "any of these words, followed by an opening bracket", with \b marking a word boundary so stat does not match inside a longer word, and \s*\( allowing spaces before the bracket. --type=c restricts the search to C source files. The result is a list of every place the code looks up a path.
# then for each candidate variable, find every later use in the same file
rg -n '\b(open|mount|chmod|chown|unlink|symlink)\s*\(' --type=c
Line by line: the same idea, but now searching for the functions that act on a path. The comment says what you do with the output: for each variable found in the first search, look for every later place in the same file where it is used.
That is crude on its own. The real work is reading each pair by hand and asking whether anything reachable by an attacker sits between the two calls. But it is how you generate the candidate list before you spend real time on any single one. If the codebase has shipped a TOCTOU CVE before (and container runtimes usually have, see also runc's CVE-2019-5736), pull the fix commit first and grep every other function for the same idiom the fix only patched in one place. Vendor fixes are almost never as surgical as the report that prompted them. runc is another container runtime; its CVE-2019-5736 was a well-known container escape.
Step 3: stop relying on timing luck, force the race deterministically
A PoC that wins "eventually, in a loop" is weak evidence, and it is exactly the kind of thing that gets you a "does not reproduce" reply from a triager, which is what happened to me on 2026-07-04. The fix is not a faster loop. It is removing timing from the equation entirely: stall the check syscall under your control, swap the filesystem state while it is stalled, then let it resume into the use step pointed somewhere else. FUSE is the standard way to do the stall. Here is the generic shape of that harness (illustrative, not tied to any specific target's code):
import os, time, errno
from fuse import FUSE, FuseOSError, Operations
STALL_TARGET = "/watched/target.so"
STALL_SECONDS = 2.0
class StallFS(Operations):
def getattr(self, path, fh=None):
if path == STALL_TARGET:
time.sleep(STALL_SECONDS) # <-- the deterministic window
st = os.lstat("." + path)
return {k: getattr(st, k) for k in (
'st_mode','st_ino','st_dev','st_nlink','st_uid',
'st_gid','st_size','st_atime','st_mtime','st_ctime')}
# readdir/open/read passthrough omitted for brevity
if __name__ == '__main__':
FUSE(StallFS(), '/mnt/stallfs', foreground=True, allow_other=True)
Line by line:
import os, time, errnoloads three Python modules:osfor talking to the operating system,timefor sleeping,errnofor error numbers.from fuse import FUSE, FuseOSError, Operationsloads the pieces offusepywe need:FUSEto start the fake filesystem,Operationsas the base class we override, andFuseOSErrorfor raising filesystem errors.STALL_TARGET = "/watched/target.so"is the path we want to freeze..sofiles are shared libraries, the compiled code files the container mounts.STALL_SECONDS = 2.0is how long we freeze it: two seconds.class StallFS(Operations):defines our fake filesystem, inheriting from the standard operations class.def getattr(self, path, fh=None):is the function the operating system calls when it wants information about a file. This is the moment of the check.if path == STALL_TARGET:checks whether the file being asked about is the one we care about.time.sleep(STALL_SECONDS)is the trick: when the target is asked about, we simply wait two seconds before answering. That is the deterministic window, a guaranteed pause instead of hoping to be lucky.st = os.lstat("." + path)gets the real file information from the underlying filesystem, prefixing the path with.so it is looked up relative to the mount point.- The
return {k: getattr(st, k) for k in (...)}line builds a dictionary of the file's properties (mode, inode number, device, link count, owner, group, size, and the three timestamps) and hands it back to the operating system. - The comment notes that the other operations (listing a directory, opening, reading) are left out for brevity; they would just pass straight through to the real filesystem.
if __name__ == '__main__':means "only run this when the file is run directly".FUSE(StallFS(), '/mnt/stallfs', foreground=True, allow_other=True)starts our fake filesystem at the folder/mnt/stallfs, keeping it in the foreground and letting other users access it.
python3 stall_fuse.py &
run-victim-tool --target /mnt/stallfs/watched/target.so
Line by line:
python3 stall_fuse.py &starts the fake filesystem in the background. The&at the end means "do not block this terminal".run-victim-tool --target /mnt/stallfs/watched/target.soruns the program under test, pointing it at the file inside our fake filesystem.run-victim-toolis a placeholder for whatever program you are testing. When it asks about that file, our fake filesystem freezes for two seconds.
# terminal 2: during the STALL_SECONDS window, win the race every time
ln -sfn /evil/redirect /mnt/stallfs/watched/target.so
Line by line:
- The comment says what this is for: in a second terminal, during the two-second pause, do the swap.
ln -sfn /evil/redirect /mnt/stallfs/watched/target.soreplaces the file with a symlink pointing at/evil/redirect.lnmakes links,-smeans symbolic (a symlink),-fmeans force, overwriting whatever is there, and-nmeans treat an existing symlink as a file rather than following it.
Every run, 100% of the time, instead of 11/100. That is the difference between "here is a theory" and "here is a reproduction", and it is the single change that would have saved three weeks of back-and-forth on H-1.
Step 4: build the reachability matrix before you get excited
Before treating anything as a finding, answer four questions. What privilege level does the victim process run at? Does the vulnerable path require a non-default flag or config? Does it fire on every invocation or only on some admin subcommand? And, critically for a container runtime, is there even an attacker-controllable filesystem in play at the moment the check happens? A container image you control is a very different precondition from a local user racing another local user's files. This is where most candidates die, and it is supposed to be where most candidates die.
Memory-safety testing: the methodology, without the findings
Compiler-adjacent CLI tooling (linkers, demanglers, anything that parses attacker-shaped symbol or object data) is a classic, under-tested memory-corruption surface, because everyone treats it as "just a build tool" when it often runs with real trust and consumes data an attacker can shape: a package, a precompiled object, a crafted input file.
Memory safety means a program only ever reads and writes the memory it is supposed to. When it does not, you get a memory-corruption bug: reading past the end of a buffer, writing where it should not, and so on. A demangler is a tool that turns the compiler's internal, encoded names back into readable ones. A symbol is a name inside a compiled file. A buffer is a chunk of memory holding data.
Harness shape (libFuzzer, generic target signature):
#include <stdint.h>
#include <stddef.h>
Line by line: these two lines pull in standard definitions for fixed-width integers (uint8_t, an unsigned 8-bit number) and for size_t, the type used for sizes and counts.
// LLVMFuzzerTestOneInput is the entry point libFuzzer drives directly —
// isolate just the parsing/decoding function so you pay no process-
// startup cost per iteration.
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
if (size < 4) return 0;
parse_target_format(data, size); // the function under test
return 0;
}
Line by line:
- The comment explains the design: libFuzzer calls
LLVMFuzzerTestOneInputover and over, once per test input, so you want only the parsing function inside it. Starting a whole new process each time would be far slower. int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)is the function libFuzzer calls.datais a pointer to the bytes of the test input,sizeis how many bytes there are.if (size < 4) return 0;skips inputs that are too short to be interesting.parse_target_format(data, size);hands the bytes to the function under test.parse_target_formatis a placeholder name for whatever parser you are testing.return 0;tells libFuzzer the run finished normally.
Build with sanitizers on. This is non-negotiable: a crash without ASan just tells you it crashed, a crash with ASan tells you what kind of memory violation it was and roughly where:
clang -fsanitize=address,undefined,fuzzer -g -O1 \
-o fuzz_harness fuzz_harness.c target_parser.c
Line by line:
clangis the compiler.-fsanitize=address,undefined,fuzzerturns on three things: the address sanitizer (catches bad memory access), the undefined-behaviour sanitizer (catches things the C standard says must not happen), and libFuzzer support (so the program can fuzz itself).-gkeeps debugging information so reports point at real source lines.-O1asks for light optimisation, a balance between speed and readable reports.-o fuzz_harnessnames the output program.fuzz_harness.c target_parser.care the source files to compile: our harness and the parser under test.
mkdir -p corpus
# seed with REAL samples of the format, not empty/random input —
# coverage-guided fuzzing converges far faster from realistic seeds
cp /usr/lib/real-sample-inputs/* corpus/
./fuzz_harness -max_len=4096 -jobs=4 corpus/
Line by line:
mkdir -p corpuscreates a folder calledcorpusto hold starting samples. A corpus is the collection of seed inputs the fuzzer starts from.- The comment explains why the seeds matter: coverage-guided fuzzing (where the fuzzer watches which parts of the code each input reaches and steers towards new paths) finds bugs much faster when it starts from realistic files rather than random bytes.
cp /usr/lib/real-sample-inputs/* corpus/copies real sample files into the corpus folder../fuzz_harness -max_len=4096 -jobs=4 corpus/runs the fuzzer, limiting each input to 4096 bytes and running four jobs in parallel, starting from the corpus.
Or the AFL++ persistent-mode equivalent when the target's build system fits that better:
AFL_USE_ASAN=1 afl-clang-fast -o target_afl target_parser.c
afl-fuzz -i corpus/ -o findings/ -- ./target_afl @@
Line by line:
AFL_USE_ASAN=1 afl-clang-fast -o target_afl target_parser.ccompiles the parser with AFL++'s special compiler wrapper, with the address sanitizer switched on, producing a program calledtarget_afl.afl-fuzz -i corpus/ -o findings/ -- ./target_afl @@runs the fuzzer:-i corpus/is where the seeds are,-o findings/is where results go, and@@is replaced by AFL++ with the path to each generated test file.
Triage, once it finds something:
afl-tmin -i findings/crashes/id:000001 -o min_crash -- ./target_afl @@
Line by line: afl-tmin shrinks a crashing input to the smallest version that still crashes. -i findings/crashes/id:000001 is the crash file to shrink, -o min_crash is where to save the result, and the rest is the program to run it against. A smaller input is much easier to read and to include in a report.
# then run it once under ASan directly and read the report.
./fuzz_harness min_crash
Line by line: this runs the minimised crash file through the sanitizer build once, by hand, so you can read the report it produces.
From the ASan report, the question that actually matters for severity: is this an out-of-bounds read (often "just" info disclosure or a crash) or a write (much closer to exploitable)? Is the out-of-bounds offset attacker-influenced, or is it a fixed one-past-the-end that never moves regardless of input? An out-of-bounds access is touching memory outside the intended area; an offset is how far past the boundary you went. Dedupe every unique crash by its actual faulting stack before you count anything, and reproduce each one manually with a hand-built minimal input outside the fuzzer before it goes anywhere near a report. Fuzzer output is a lead, not evidence. Dedupe means removing duplicates; the faulting stack is the list of function calls that were running when it crashed.
I ran this exact process (harness, sanitizers, corpus, triage) against a set of NVIDIA's compiler-toolchain CLI binaries. It surfaced results that are currently still with NVIDIA's team, unresolved. That is as far as this post goes on that thread: no tool names, no function names, no crash details, no repro inputs. If a fix ships and a disclosure window opens, that is a different post.
Root cause
The mistake is the split between check and use. In the CVE-2024-0132 shape, find_library_paths() resolves the paths once, and mount_files() later re-resolves and mounts root + paths[i]. Between the two, the attacker controls what the name resolves to, because the container image's filesystem is attacker-controlled. A directory shadows an expected library file on one mount pass, changing what the next resolution step sees, and a symlink dropped at the next expected name is walked by the kernel on the second mount pass. The check and the use are two separate resolutions of the same name, and the name can change in between.
Existing defences did not stop it because the mount path is privileged by design: a read-only host root mounted into the container is still enough to reach docker.sock and go from there to full host takeover. The fix in 1.17.4 closed that instance, but the idiom is what recurs.
Impact
For the CVE-2024-0132 class, the impact is container escape: an attacker who controls the container image's filesystem can turn a read-only host root mount into access to docker.sock and from there to full host takeover. The precondition is that the attacker controls the container image's filesystem at the moment the check happens.
For H-1, the filed severity was Critical, cut to Medium on triage, with a $1,500 bounty as a duplicate of NVIDIA-G9G72YJS. For L-1, the symlink-follow in the chmod-related hook closed as a duplicate of NVIDIA-0LEYP7D7 with no bounty. The memory-safety line against the compiler-toolchain CLI binaries is unresolved and its impact is not described here.
Fix
For the CVE-2024-0132 class, the fix shipped in 1.17.4.
Variants to test
- Every other function with the same idiom. Pull the fix commit for any TOCTOU CVE the codebase has already shipped, then grep every other function for the resolve-then-use pair the fix only patched in one place. A positive result is a function that resolves a path with
stat,lstat,realpath,readlinkor a cached glob, and later acts on the same value withopen,mount,chmod,chown,unlinkor a subprocess handoff, with attacker-reachable state in between. - Compiler-adjacent parsers. Linkers, demanglers and anything that parses attacker-shaped symbol or object data. A positive result is an ASan report from a hand-built minimal input, reproduced outside the fuzzer, with a faulting stack that dedupes as unique.
What actually mattered
Looking back at the H-1 timeline, the thing that moved it from a second Informative close to a paid duplicate was not a sharper payload. It was making the race deterministic instead of probabilistic, and having a version-pinned build with git describe output ready before anyone asked. On the memory-safety side, the thing that separates a real finding from fuzzer noise is exactly the same discipline: reproduce it by hand, outside the tool that found it, before you believe it yourself.
Reference: Wiz Research: NVIDIA AI Vulnerability: Deep Dive into CVE-2024-0132

A decade of working for others, an year of working for the love of subject
FAQ
Glossary
-
ASan (AddressSanitizer): a special build mode that checks every memory access and reports exactly what went wrong and where.
-
AFL++: a fuzzer, a program that throws many varied inputs at a target and watches for crashes.
-
Binary: a compiled program, the file you actually run.
-
Bug bounty programme: a scheme where a company pays people who privately report flaws in its software.
-
Buffer: a chunk of memory holding data.
-
Check and use: the two moments in a TOCTOU bug, when a program first looks at something and later acts on it.
-
chmod: the Unix operation that changes who may read, write or run a file.
-
Clang: a C compiler.
-
Commit: a saved snapshot of a code repository.
-
Commit hash: a unique fingerprint identifying one commit.
-
Compiler: a program that turns source code into a runnable program.
-
Container: a sealed-off box on a computer with its own filesystem and processes.
-
Container escape: breaking out of a container to reach the real machine.
-
Container image: the packaged starting filesystem a container is built from.
-
Container runtime: the software that starts and manages containers.
-
Control flow: the order in which a program runs its lines, which can jump around.
-
Corpus: the collection of starting inputs a fuzzer works from.
-
CVE: Common Vulnerabilities and Exposures, a public catalogue giving each known bug a permanent ID.
-
Demangler: a tool that turns a compiler's encoded internal names back into readable ones.
-
Dedupe: remove duplicates, so each distinct crash is counted once.
-
Duplicate (in a bounty): a report of a bug someone else already reported, so the reward goes to the earlier report.
-
Faulting stack: the list of function calls running at the moment a program crashed.
-
FUSE: a way for an ordinary program to pretend to be a filesystem, so it can answer file queries however it likes, including slowly.
-
Fuzzer: a program that generates many varied inputs and watches for crashes.
-
Glob: a wildcard search, where
*matches anything. -
GPU: a graphics chip; here relevant because people assume you need one to test NVIDIA software.
-
Harness: the scaffolding built around a target so it can be run repeatedly and reliably.
-
Header: a file declaring what functions exist so the compiler knows how to call them.
-
Hook: a small program the container toolkit runs at a particular moment during setup.
-
Host: the real machine underneath a container.
-
Informative (status): a triage outcome meaning the report does not count as a payable finding.
-
Intigriti: the bug bounty platform where these reports were filed.
-
Kernel: the core of the operating system.
-
libFuzzer: a fuzzing engine built into Clang.
-
Linker: the tool that stitches compiled pieces into a final program.
-
Lima: a tool that creates and manages Linux virtual machines on a Mac.
-
Makefile: the recipe file that tells the computer how to build a program.
-
Memory safety: a program only reads and writes the memory it is supposed to.
-
Mount: attach a folder or file from one place so it appears at another place.
-
Mount namespace: a private view of what is mounted where, so two processes can see different filesystems at the same paths.
-
Out-of-bounds access: touching memory outside the intended area.
-
PoC (proof of concept): a small demonstration that actually triggers a bug.
-
PSIRT: a company's Product Security Incident Response Team, which handles security reports.
-
Reachability: whether an attacker can actually get to a code path in practice.
-
Read-only: you cannot change files, but you can still read them.
-
RPC: remote procedure call, an old mechanism for one program to call functions in another.
-
Sanitizer: a special build mode that adds checks around memory access and reports precisely what went wrong.
-
Severity: a rough rating of how bad a bug is, from Critical at the top down to Medium.
-
Signing key: a cryptographic stamp proving a package really came from its vendor and was not tampered with.
-
Socket: an endpoint programs use to talk to each other;
docker.sockis Docker's control socket. -
Source code: the human-written text of a program before it is compiled.
-
stat / lstat: ask the filesystem about a file's size, type and permissions.
-
Symlink (symbolic link): a file that is really a signpost pointing at another file.
-
Syscall: a program asking the operating system to do something, like open a file.
-
TOCTOU (time-of-check/time-of-use): a race where the thing being checked changes between the check and the use.
-
Triager: the person at the platform who first reads a report and decides whether it is a real, in-scope bug.
-
Version-dating: pinning down exactly which release of the software a bug was tested against.
-
Virtual environment: an isolated folder of packages so one project's tools do not interfere with anything else.
-
VM (virtual machine): a whole computer simulated inside your computer, which you can throw away if you wreck it.
-
vCPU: a virtual processor core.
-
Wildcard: a symbol such as
*that matches anything.