CVE-2025-12343: Ffmpeg: double-free vulnerability in ffmpeg tensorflow dnn backend
A flaw was found in FFmpeg’s TensorFlow backend within the libavfilter/dnnbackendtf.c source file. The issue occurs in the dnnexecutemodeltf() function, where a task object is freed multiple times in certain error-handling paths. This redundant memory deallocation can lead to a double-free condition, potentially causing FFmpeg or any application using it to crash when processing TensorFlow-based DNN models. This results in a denial-of-service scenario but does not allow arbitrary code execution under normal conditions.
Other sources
Double-Free vulnerability in the TensorFlow DNN backend of the FFmpeg multimedia framework. The flaw resides in the dnnexecutemodeltf() function, where a task object is improperly freed multiple times using avfreep() under certain error conditions. Because the same task is also released later by dnnfreemodeltf() after a successful queue push, this leads to a double-free and subsequent memory corruption. An attacker could exploit this issue by feeding crafted data to a process using FFmpeg’s DNN TensorFlow backend, triggering a crash and causing a denial of service.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/ffmpegto a version that resolves this vulnerability.Fixed in 7:5.1.9-0+deb12u1Fixed in 7:7.1.5-0+deb13u1Fixed in 7:9.0.2-4
Event History
Frequently Asked Questions
What is the severity of CVE-2025-12343?
CVE-2025-12343 has a medium severity level due to its potential to cause application crashes.
How do I fix CVE-2025-12343?
To fix CVE-2025-12343, update to the latest version of FFmpeg that addresses this double-free vulnerability.
What software is affected by CVE-2025-12343?
CVE-2025-12343 specifically affects the TensorFlow backend of FFmpeg.
What potential impacts does CVE-2025-12343 have?
CVE-2025-12343 could lead to application instability or crashes when processing tasks in FFmpeg.
Is CVE-2025-12343 being actively exploited?
As of now, there are no reported cases of CVE-2025-12343 being actively exploited in the wild.