From 3276ef38cc3e0942e631fd33a0c69d1885848e07 Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Mon, 16 Nov 2026 15:29:56 +0800 Subject: [PATCH 1/4] fix(cve): CVE-2026-125203 - avcodec/cook: require the channel mask to cover every subpacket channel CVE: CVE-2026-125203 (high) - libavcodec/cook: the channel mask was not checked against the number of subpacket channels, so a crafted Cook multichannel stream could describe more channels than the channel mask covers, leading to an out of array write. Require av_popcount(channel_mask) to equal total_channels, otherwise reject the stream with AVERROR_INVALIDDATA. Upstream: https://github.com/FFmpeg/FFmpeg/commit/3e09f5e24eb277a6d011745ff03e602f61c5c171 Co-authored-by: hudeng Generated-By: deepseek-v4-flash --- debian/changelog | 9 +++++++++ debian/patches/CVE-2026-125203.patch | 23 +++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 33 insertions(+) create mode 100644 debian/patches/CVE-2026-125203.patch diff --git a/debian/changelog b/debian/changelog index d403a8b4..1c085fa6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +ffmpeg (7:6.1.5-0deepin16) unstable; urgency=medium + + * fix(cve): CVE-2026-125203 (high) - avcodec/cook: require the channel + mask to cover every subpacket channel Upstream: + https://github.com/FFmpeg/FFmpeg/commit/3e09f5e24eb277a6d011745ff03e + 602f61c5c171 + + -- deepin-ci-robot Mon, 23 Nov 2026 14:05:00 +0800 + ffmpeg (7:6.1.5-0deepin15) unstable; urgency=medium * Fix the truncated Add-slice-param-of-vaapi-hevc quilt patch so the diff --git a/debian/patches/CVE-2026-125203.patch b/debian/patches/CVE-2026-125203.patch new file mode 100644 index 00000000..b1d711b6 --- /dev/null +++ b/debian/patches/CVE-2026-125203.patch @@ -0,0 +1,23 @@ +Description: CVE-2026-125203 (high) - libavcodec/cook: the channel mask was not checked against the number of subpacket channels, so a crafted Cook multichannel stream could describe more channels than the channel mask covers, leading to an out of array write. Require av_popcount(channel_mask) to equal total_channels, otherwise reject the stream with AVERROR_INVALIDDATA. +Author: Michael Niedermayer +Origin: https://github.com/FFmpeg/FFmpeg/commit/3e09f5e24eb277a6d011745ff03e602f61c5c171 +Bug: https://security-tracker.debian.org/tracker/CVE-2026-125203 +Last-Update: Mon, 14 Sep 2026 02:27:37 +0200 +--- +diff --git a/libavcodec/cook.c b/libavcodec/cook.c +index 705213de..6df34c32 100644 +--- a/libavcodec/cook.c ++++ b/libavcodec/cook.c +@@ -1245,6 +1245,12 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) + s++; + } + ++ if (channel_mask && av_popcount(channel_mask) != total_channels) { ++ av_log(avctx, AV_LOG_ERROR, "Channel mask 0x%x does not match %d subpacket channels\n", ++ channel_mask, total_channels); ++ return AVERROR_INVALIDDATA; ++ } ++ + /* Try to catch some obviously faulty streams, otherwise it might be exploitable */ + if (q->samples_per_channel != 256 && q->samples_per_channel != 512 && + q->samples_per_channel != 1024) { diff --git a/debian/patches/series b/debian/patches/series index 4280119c..9d296093 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -120,3 +120,4 @@ CVE-2026-125071.patch CVE-2026-125224.patch CVE-2026-125252.patch Add-slice-param-of-vaapi-hevc.patch +CVE-2026-125203.patch From 3785cc4de2909c3666c82c98956b0207ad788761 Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Mon, 16 Nov 2026 15:38:03 +0800 Subject: [PATCH 2/4] =?UTF-8?q?fix(cve):=20CVE-2026-125203=20-=20=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7=E9=80=82=E9=85=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CVE: CVE-2026-125203 - 兼容性适配:上游 3e09f5e2 的检查引用了 total_channels 变量,但该变量在 6.1 分支(libavcodec 60)中不存在(上游更新版本由子包循环另行维护该计数)。改为在 cook_decode_init 中声明 int total_channels = 0 并在子包解析循环内累加 q->subpacket[s].num_channels,使 channel_mask 覆盖校验与上游语义等价。 Co-authored-by: hudeng Generated-By: deepseek-v4-flash --- debian/patches/CVE-2026-125203.patch | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/debian/patches/CVE-2026-125203.patch b/debian/patches/CVE-2026-125203.patch index b1d711b6..b271f507 100644 --- a/debian/patches/CVE-2026-125203.patch +++ b/debian/patches/CVE-2026-125203.patch @@ -1,14 +1,27 @@ Description: CVE-2026-125203 (high) - libavcodec/cook: the channel mask was not checked against the number of subpacket channels, so a crafted Cook multichannel stream could describe more channels than the channel mask covers, leading to an out of array write. Require av_popcount(channel_mask) to equal total_channels, otherwise reject the stream with AVERROR_INVALIDDATA. -Author: Michael Niedermayer +Author: deepin-ci-robot Origin: https://github.com/FFmpeg/FFmpeg/commit/3e09f5e24eb277a6d011745ff03e602f61c5c171 Bug: https://security-tracker.debian.org/tracker/CVE-2026-125203 -Last-Update: Mon, 14 Sep 2026 02:27:37 +0200 +Last-Update: 2026-11-16 --- diff --git a/libavcodec/cook.c b/libavcodec/cook.c -index 705213de..6df34c32 100644 +index 705213de..204c1722 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c -@@ -1245,6 +1245,12 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) +@@ -1078,6 +1078,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) + GetByteContext gb; + int s = 0; + unsigned int channel_mask = 0; ++ int total_channels = 0; + int samples_per_frame = 0; + int ret; + int channels = avctx->ch_layout.nb_channels; +@@ -1241,10 +1242,17 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) + return AVERROR_INVALIDDATA; + } + ++ total_channels += q->subpacket[s].num_channels; + q->num_subpackets++; s++; } From 656e93eac104509debab93c3602b65a95088202c Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Tue, 17 Nov 2026 13:47:20 +0800 Subject: [PATCH 3/4] fix(cve): CVE-2026-125267 - avcodec/apac: Check bitstream_size to avoid integer overflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CVE: CVE-2026-125267 (high) - APAC 解码器中 bitstream 缓冲区大小计算存在整数溢出,可导致内存耗尽(OOM)及越界访问 Upstream: https://github.com/FFmpeg/FFmpeg/commit/63958ce2b5dd1b22f534fc968c86329cbbceef07,https://github.com/FFmpeg/FFmpeg/commit/e15ddb7f9a2f9b3ab8ac305efb6f94ddc18463d0 Co-authored-by: hudeng Generated-By: deepseek-v4-flash --- debian/changelog | 5 +++++ debian/patches/CVE-2026-125267.patch | 26 ++++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 32 insertions(+) create mode 100644 debian/patches/CVE-2026-125267.patch diff --git a/debian/changelog b/debian/changelog index 1c085fa6..5310b03e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,11 @@ ffmpeg (7:6.1.5-0deepin16) unstable; urgency=medium mask to cover every subpacket channel Upstream: https://github.com/FFmpeg/FFmpeg/commit/3e09f5e24eb277a6d011745ff03e 602f61c5c171 + * fix(cve): CVE-2026-125267 (high) - avcodec/apac: Check + bitstream_size to avoid integer overflow Upstream: + https://github.com/FFmpeg/FFmpeg/commit/63958ce2b5dd1b22f534fc968c86 + 329cbbceef07,https://github.com/FFmpeg/FFmpeg/commit/e15ddb7f9a2f9b3 + ab8ac305efb6f94ddc18463d0 -- deepin-ci-robot Mon, 23 Nov 2026 14:05:00 +0800 diff --git a/debian/patches/CVE-2026-125267.patch b/debian/patches/CVE-2026-125267.patch new file mode 100644 index 00000000..1fc380db --- /dev/null +++ b/debian/patches/CVE-2026-125267.patch @@ -0,0 +1,26 @@ +Description: CVE-2026-125267 (high) - APAC decoder: integer overflow in bitstream buffer size handling could lead to OOM and out-of-array access +Author: Anxious Koisi +Author: Umar Pathan +Origin: https://github.com/FFmpeg/FFmpeg/commit/63958ce2b5dd1b22f534fc968c86329cbbceef07,https://github.com/FFmpeg/FFmpeg/commit/e15ddb7f9a2f9b3ab8ac305efb6f94ddc18463d0 +Bug: https://security-tracker.debian.org/tracker/CVE-2026-125267 +Last-Update: Mon, 7 Sep 2026 01:06:36 +0200 +--- +diff --git a/libavcodec/apac.c b/libavcodec/apac.c +index 98c34b99..8bd34cf1 100644 +--- a/libavcodec/apac.c ++++ b/libavcodec/apac.c +@@ -141,8 +141,12 @@ static int apac_decode(AVCodecContext *avctx, AVFrame *frame, + buf_size = pkt->size; + input_buf_size = buf_size; + +- if (s->bitstream_index > 0 && s->bitstream_size > 0) { +- memmove(s->bitstream, &s->bitstream[s->bitstream_index], s->bitstream_size); ++ if ((int64_t)s->bitstream_size + buf_size > INT_MAX / (16 * 8)) ++ return AVERROR_INVALIDDATA; ++ ++ if (s->bitstream_index > 0) { ++ if (s->bitstream_size > 0) ++ memmove(s->bitstream, &s->bitstream[s->bitstream_index], s->bitstream_size); + s->bitstream_index = 0; + } + diff --git a/debian/patches/series b/debian/patches/series index 9d296093..1e1b06f9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -121,3 +121,4 @@ CVE-2026-125224.patch CVE-2026-125252.patch Add-slice-param-of-vaapi-hevc.patch CVE-2026-125203.patch +CVE-2026-125267.patch From e8fca4066c7f4e32d4eeea8a90ff77fd64f7047e Mon Sep 17 00:00:00 2001 From: deepin-ci-robot Date: Tue, 17 Nov 2026 13:59:11 +0800 Subject: [PATCH 4/4] fix(cve): CVE-2026-125228 - avcodec/vorbisenc: dont assert on non finite input MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CVE: CVE-2026-125228 (medium) - FFmpeg 8.1.3 之前版本及 9.x 9.0.2 之前的 libavcodec/vorbisenc.c 的 put_vector() 存在越界读取漏洞:当输入含 NaN 浮点样本时,codebook 条目保持为 -1,导致数组前的堆内存读取,可使应用崩溃或将相邻堆内存泄漏到输出中。 Upstream: https://github.com/FFmpeg/FFmpeg/commit/e33548ad13fd3495466a651792e8206b1c6f7fd7 Co-authored-by: hudeng Generated-By: deepseek-v4-flash --- debian/changelog | 4 ++++ debian/patches/CVE-2026-125228.patch | 19 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 24 insertions(+) create mode 100644 debian/patches/CVE-2026-125228.patch diff --git a/debian/changelog b/debian/changelog index 5310b03e..e79bcf33 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,10 @@ ffmpeg (7:6.1.5-0deepin16) unstable; urgency=medium https://github.com/FFmpeg/FFmpeg/commit/63958ce2b5dd1b22f534fc968c86 329cbbceef07,https://github.com/FFmpeg/FFmpeg/commit/e15ddb7f9a2f9b3 ab8ac305efb6f94ddc18463d0 + * fix(cve): CVE-2026-125228 (medium) - avcodec/vorbisenc: dont assert + on non finite input Upstream: + https://github.com/FFmpeg/FFmpeg/commit/e33548ad13fd3495466a651792e8 + 206b1c6f7fd7 -- deepin-ci-robot Mon, 23 Nov 2026 14:05:00 +0800 diff --git a/debian/patches/CVE-2026-125228.patch b/debian/patches/CVE-2026-125228.patch new file mode 100644 index 00000000..9e8a95e4 --- /dev/null +++ b/debian/patches/CVE-2026-125228.patch @@ -0,0 +1,19 @@ +Description: CVE-2026-125228 (medium) - FFmpeg 8.1.3 之前版本及 9.x 9.0.2 之前的 libavcodec/vorbisenc.c 的 put_vector() 存在越界读取漏洞:当输入含 NaN 浮点样本时,codebook 条目保持为 -1,导致数组前的堆内存读取,可使应用崩溃或将相邻堆内存泄漏到输出中。 +Author: Michael Niedermayer +Origin: https://github.com/FFmpeg/FFmpeg/commit/e33548ad13fd3495466a651792e8206b1c6f7fd7 +Bug: https://security-tracker.debian.org/tracker/CVE-2026-125228 +Last-Update: Mon, 7 Sep 2026 00:11:34 +0200 +--- +diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c +index 378a3b38..c440f91b 100644 +--- a/libavcodec/vorbisenc.c ++++ b/libavcodec/vorbisenc.c +@@ -892,7 +892,7 @@ static int floor_encode(vorbis_enc_context *venc, vorbis_enc_floor *fc, + static float *put_vector(vorbis_enc_codebook *book, PutBitContext *pb, + float *num) + { +- int i, entry = -1; ++ int i, entry = 0; + float distance = FLT_MAX; + assert(book->dimensions); + for (i = 0; i < book->nentries; i++) { diff --git a/debian/patches/series b/debian/patches/series index 1e1b06f9..aa9dac01 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -122,3 +122,4 @@ CVE-2026-125252.patch Add-slice-param-of-vaapi-hevc.patch CVE-2026-125203.patch CVE-2026-125267.patch +CVE-2026-125228.patch