NVIDIA Container Toolkit mount_files Time-Of-Check Time-Of-Use Race Condition Privilege Escalation Vulnerability
The mount_files function in NVIDIA Container Toolkit lacks proper locking, creating a time-of-check time-of-use race condition. An attacker who can already execute code inside a container could exploit this to escalate privileges and run code on the host.
This vulnerability allows remote attackers to escalate privileges on affected installations of NVIDIA Container Toolkit. An attacker must first obtain the ability to execute code within a container in order to exploit this vulnerability.
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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely a missing lock around a check-then-use sequence in the mount_files function, allowing the object to change between the check and the use.
Impact
An attacker with code execution inside a container could escalate privileges and execute arbitrary code on the host.
What the attacker needed
Code execution inside a container
The fix
NVIDIA issued an update to correct the vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A race condition happens when two actions happen at almost the same time and the program checks something before using it, but the situation changes in between. Here, a container can trick the host into using a file or resource after it has been swapped, letting the attacker break out of the container. The attacker must already have code running inside a container to start with.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.