FFmpeg NVDEC: double-free on decoder-surface exhaustion gives memory corruption from a crafted video
Impact
In FFmpeg 4.4 through 8.1.2, when no NVDEC decoder surfaces remain, the ff_nvdec_start_frame_sep_ref error path frees the frame description data through nvdec_fdd_priv_free while the calling layer frees the same data again, double-freeing the decoder context. Any FFmpeg-based application using NVIDIA hardware-accelerated decoding is affected, which on a GPU fleet means transcode and video-ingest pipelines that accept third-party media. The consequence is heap corruption inside a process that already holds a CUDA context on the GPU, so the realistic outcomes are process compromise and a wedged decode pipeline on that device. Note that the surface-exhaustion precondition makes this easier to hit on a busy node running many concurrent decode sessions. The record does not demonstrate escape from the process to the driver or to other tenants.
Who can reach it
Anyone who can get a crafted video file into an NVDEC-backed FFmpeg decode path - a transcode queue, a media upload, a dataset preprocessing job. No authentication beyond whatever gates submission; the vector requires the file to be processed.
What to do
Update FFmpeg to a build containing commit 4c6217477fc64305055b37d9d1d0d76d30e37f97 (upstream PR 23664) and restart the transcode or ingest daemons - the fix is in userspace, so no GPU driver change, node drain or reboot is needed. The record names no released fixed version; if your distribution has not shipped it, rebuild or fall back to software decoding (drop -hwaccel cuda/cuvid) for untrusted input. Container images that bundle their own FFmpeg must be rebuilt, not just restarted.
References
Related entries
- NemoClaw: Sensitive info exposure in logsCVE-2026-24222 · NemoClawHigh
- NVIDIA GPU Display Driver - kernel mode layer (Windows nvlddmkm.sys and Linux nvidia.ko): A specially crafted shaderCVE-2022-28181 · NVIDIA GPU Display Driver - kernel mode layer (Windows nvlddmkm.sys and Linux nvidia.ko)High
- NVIDIA GPU Display Driver - Windows DirectX 11 user mode driver (nvwgf2um.dll / nvwgf2umx.dll): A crafted shader causesCVE-2022-28182 · NVIDIA GPU Display Driver - Windows DirectX 11 user mode driver (nvwgf2um.dll / nvwgf2umx.dll)High
- GPU Display Driver (kernel): Local privesc to host root (kernel buffer overflow)CVE-2022-34671 · GPU Display Driver (kernel)High
- Container Toolkit: Container escape / host file write via symlink followingCVE-2025-23267 · Container ToolkitHigh
- AMD Instinct GPU driver: out-of-bounds write in the diagnostic-data ioctl grants privilege escalationCVE-2025-54517 · AMD GPU virtualization driver (AMDGV_CMD_GET_DIAG_DATA ioctl handler)High
This entry is curated: imported from vendor advisories with machine assistance, not yet individually verified. Confirm against your vendor's advisory before acting, and report anything wrong.