summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-35368.patch41
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-35368.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-35368.patch
new file mode 100644
index 0000000000..7b802762eb
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-35368.patch
@@ -0,0 +1,41 @@
1From 4513300989502090c4fd6560544dce399a8cd53c Mon Sep 17 00:00:00 2001
2From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
3Date: Sun, 24 Sep 2023 13:15:48 +0200
4Subject: [PATCH] avcodec/rkmppdec: Fix double-free on error
5
6After having created the AVBuffer that is put into frame->buf[0],
7ownership of several objects (namely an AVDRMFrameDescriptor,
8an MppFrame and some AVBufferRefs framecontextref and decoder_ref)
9has passed to the AVBuffer and therefore to the frame.
10Yet it has nevertheless been freed manually on error
11afterwards, which would lead to a double-free as soon
12as the AVFrame is unreferenced.
13
14Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
15
16CVE: CVE-2024-35368
17
18Upstream-Status: Backport [https://github.com/ffmpeg/ffmpeg/commit/4513300989502090c4fd6560544dce399a8cd53c]
19
20Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
21---
22 libavcodec/rkmppdec.c | 4 ++--
23 1 file changed, 2 insertions(+), 2 deletions(-)
24
25diff --git a/libavcodec/rkmppdec.c b/libavcodec/rkmppdec.c
26index 5768568..2ca368e 100644
27--- a/libavcodec/rkmppdec.c
28+++ b/libavcodec/rkmppdec.c
29@@ -462,8 +462,8 @@ static int rkmpp_retrieve_frame(AVCodecContext *avctx, AVFrame *frame)
30
31 frame->hw_frames_ctx = av_buffer_ref(decoder->frames_ref);
32 if (!frame->hw_frames_ctx) {
33- ret = AVERROR(ENOMEM);
34- goto fail;
35+ av_frame_unref(frame);
36+ return AVERROR(ENOMEM);
37 }
38
39 return 0;
40--
412.40.0
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
index 94d4cb82d5..c3cfc87669 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_6.1.1.bb
@@ -39,6 +39,7 @@ SRC_URI = " \
39 file://CVE-2024-7055.patch \ 39 file://CVE-2024-7055.patch \
40 file://CVE-2024-35366.patch \ 40 file://CVE-2024-35366.patch \
41 file://CVE-2024-35367.patch \ 41 file://CVE-2024-35367.patch \
42 file://CVE-2024-35368.patch \
42" 43"
43 44
44SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968" 45SRC_URI[sha256sum] = "8684f4b00f94b85461884c3719382f1261f0d9eb3d59640a1f4ac0873616f968"