diff mbox series

[blacksail,1/2] ffmpeg: Fix CVE-2026-135736

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

Commit Message

Abhishek Bachiphale Dec. 2, 2026, 9:20 a.m. UTC
FFmpeg 4.4 before 9.1 contains a heap out-of-bounds read and write
vulnerability in libavfilter/vf_deband.c. Sending a 'deband coupling 1'
command through sendcmd or the zmq filter makes chroma planes be processed
at luma dimensions, which can corrupt heap memory.

Backport patch to fix CVE-2026-135736.

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

Upstream fix:
[https://github.com/FFmpeg/FFmpeg/commit/24ad423d908cd595c983b6c503ddb0ee94901ba2]

Signed-off-by: Abhishek Bachiphale <Abhishek.Bachiphale@windriver.com>
---
 .../ffmpeg/ffmpeg/CVE-2026-135736.patch       | 48 +++++++++++++++++++
 .../recipes-multimedia/ffmpeg/ffmpeg_9.0.2.bb |  1 +
 2 files changed, 49 insertions(+)
 create mode 100644 meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2026-135736.patch
diff mbox series

Patch

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2026-135736.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2026-135736.patch
new file mode 100644
index 0000000000..c362bd34c3
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2026-135736.patch
@@ -0,0 +1,48 @@ 
+From 24ad423d908cd595c983b6c503ddb0ee94901ba2 Mon Sep 17 00:00:00 2001
+From: Michael Niedermayer <michael@niedermayer.cc>
+Date: Sat, 14 Nov 2026 05:23:08 +0100
+Subject: [PATCH] avfilter/vf_deband: reject the coupling command for
+ subsampled formats
+
+Fixes: out of array access
+Fixes: QJKTLuAvDBVR
+Fixes: AISLE-2026-0166-00123
+
+Found-by: Joshua Rogers (AISLE)
+
+Out of array read and write Replicated through UnModified FFmpeg with ASAN
+
+CVE: CVE-2026-135736
+Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/24ad423d908cd595c983b6c503ddb0ee94901ba2]
+
+Signed-off-by: Abhishek Bachiphale <Abhishek.Bachiphale@windriver.com>
+---
+ libavfilter/vf_deband.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c
+index 2ff4fca6fa4de..6dd08dd10f80e 100644
+--- a/libavfilter/vf_deband.c
++++ b/libavfilter/vf_deband.c
+@@ -438,11 +438,18 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
+ static int process_command(AVFilterContext *ctx, const char *cmd, const char *args,
+                            char *res, int res_len, int flags)
+ {
++    DebandContext *s = ctx->priv;
+     int ret = ff_filter_process_command(ctx, cmd, args, res, res_len, flags);
+ 
+     if (ret < 0)
+         return ret;
+ 
++    if (s->coupling && (s->shift[0] || s->shift[1])) {
++        av_log(ctx, AV_LOG_ERROR, "coupling needs a pixel format without chroma subsampling\n");
++        s->coupling = 0;
++        return AVERROR(EINVAL);
++    }
++
+     return config_input(ctx->inputs[0]);
+ }
+ 
+-- 
+2.43.0
+
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_9.0.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_9.0.2.bb
index af92a0b0df..00ea6ab042 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_9.0.2.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_9.0.2.bb
@@ -25,6 +25,7 @@  LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
            file://0002-ffbuild-common.mak-ensure-target-directories-are-cre.patch \
            file://makerace.patch \
+           file://CVE-2026-135736.patch \
            "
 
 SRC_URI[sha256sum] = "8c3850283eb25fa026482078a04051e0be17347b09ef81a0849bec15a96e002e"