diff mbox series

[wrynose,2/2] ffmpeg: fix CVE-2026-135743

Message ID 20261201094445.4048994-2-Abhishek.Bachiphale@windriver.com
State New
Headers show
Series [wrynose,1/2] ffmpeg: fix CVE-2026-135736 | expand

Commit Message

Abhishek Bachiphale Dec. 1, 2026, 9:44 a.m. UTC
FFmpeg 4.3 before 9.1 contains a heap out-of-bounds read and write
vulnerability in the dynaudnorm filter. cqueue_resize() miscalculates the
gain history queue element counts when gausssize changes at runtime, so
gausssize commands sent through asendcmd or the azmq filter can corrupt heap
memory.

Backport patch to fix CVE-2026-135743.

References:
[https://nvd.nist.gov/vuln/detail/CVE-2026-135743]

Upstream fix:
[https://github.com/FFmpeg/FFmpeg/commit/3dd257f99b5cdc1bf38e1cadff1e34ec559c7b7c]

Signed-off-by: Abhishek Bachiphale <Abhishek.Bachiphale@windriver.com>
---
 .../ffmpeg/ffmpeg/CVE-2026-135743.patch       | 52 +++++++++++++++++++
 .../recipes-multimedia/ffmpeg/ffmpeg_8.0.3.bb |  1 +
 2 files changed, 53 insertions(+)
 create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2026-135743.patch
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2026-135743.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2026-135743.patch
new file mode 100644
index 0000000000..301cd636c4
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2026-135743.patch
@@ -0,0 +1,52 @@ 
+From 3dd257f99b5cdc1bf38e1cadff1e34ec559c7b7c Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michael@niedermayer.cc>
+Date: Sat, 14 Nov 2026 05:14:09 +0100
+Subject: [PATCH] avfilter/af_dynaudnorm: resize the gain histories by the
+ change of the filter size
+
+Fixes: out of array access (memmove with negative size)
+Fixes: out of array write
+Fixes: ArUvqAYbevNM
+Fixes: AISLE-2026-0166-00680
+
+Found-by: Joshua Rogers (AISLE)
+The out of array write was found during triage of the security report
+
+Out of array access Replicated through UnModified FFmpeg with ASAN
+Out of array write Replicated through UnModified FFmpeg with ASAN
+no further issues found with 3000 iterations of a random gausssize command sequence generator
+
+CVE: CVE-2026-135743
+Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/3dd257f99b5cdc1bf38e1cadff1e34ec559c7b7c]
+
+Signed-off-by: Abhishek Bachiphale <Abhishek.Bachiphale@windriver.com>
+---
+ libavfilter/af_dynaudnorm.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c
+index 938f99f75ccd9..9bb77d96939d9 100644
+--- a/libavfilter/af_dynaudnorm.c
++++ b/libavfilter/af_dynaudnorm.c
+@@ -259,14 +259,14 @@ static void cqueue_resize(cqueue *q, int new_size)
+     av_assert2(q->max_size >= new_size);
+     av_assert2(MIN_FILTER_SIZE <= new_size);
+ 
+-    if (new_size > q->nb_elements) {
+-        const int side = (new_size - q->nb_elements) / 2;
++    if (!cqueue_empty(q) && new_size > q->size) {
++        const int side = (new_size - q->size) / 2;
+ 
+         memmove(q->elements + side, q->elements, sizeof(double) * q->nb_elements);
+         for (int i = 0; i < side; i++)
+             q->elements[i] = q->elements[side];
+-        q->nb_elements = new_size - 1 - side;
+-    } else {
++        q->nb_elements += side;
++    } else if (!cqueue_empty(q)) {
+         int count = (q->size - new_size + 1) / 2;
+ 
+         while (count-- > 0)
+-- 
+2.43.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.3.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.3.bb
index 98e7c86906..1dc7317c64 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.3.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_8.0.3.bb
@@ -45,6 +45,7 @@  SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
            file://CVE-2026-66041.patch \
            file://CVE-2026-75143.patch \
            file://CVE-2026-135736.patch \
+           file://CVE-2026-135743.patch \
            "
 
 SRC_URI[sha256sum] = "6136812ea6d4e68bdba27e33c2a94382711cdf4f8602ffef056ff792bd6f9818"