summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchana Polampalli <archana.polampalli@windriver.com>2024-11-21 06:45:52 +0000
committerSteve Sakoman <steve@sakoman.com>2024-11-27 06:27:25 -0800
commit338d1840cd45704a99b15eeef9b8d97b5cf975dd (patch)
treed013a5161457f6925a210ffcaac9d7e6b2666761
parent341f1233318813a2d2def488965051fe30645b0f (diff)
downloadpoky-338d1840cd45704a99b15eeef9b8d97b5cf975dd.tar.gz
ffmpeg: fix CVE-2024-31578
FFmpeg version n6.1.1 was discovered to contain a heap use-after-free via the av_hwframe_ctx_init function. (From OE-Core rev: 072a5454fa6610fd751433c518f9beb5496851a1) Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-31578.patch49
-rw-r--r--meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb1
2 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-31578.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-31578.patch
new file mode 100644
index 0000000000..e67f4777f7
--- /dev/null
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2024-31578.patch
@@ -0,0 +1,49 @@
1From 3bb00c0a420c3ce83c6fafee30270d69622ccad7 Mon Sep 17 00:00:00 2001
2From: Zhao Zhili <zhilizhao@tencent.com>
3Date: Tue, 20 Feb 2024 20:08:55 +0800
4Subject: [PATCH] avutil/hwcontext: Don't assume frames_uninit is reentrant
5
6Fix heap use after free when vulkan_frames_init failed.
7
8Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
9
10CVE: CVE-2024-31578
11
12Upstream-Status: Backport [https://github.com/ffmpeg/ffmpeg/commit/3bb00c0a420c3ce83c6fafee30270d69622ccad7]
13
14Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
15---
16 libavutil/hwcontext.c | 8 ++------
17 1 file changed, 2 insertions(+), 6 deletions(-)
18
19diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
20index 31c7840..2a4d9ed 100644
21--- a/libavutil/hwcontext.c
22+++ b/libavutil/hwcontext.c
23@@ -362,7 +362,7 @@ int av_hwframe_ctx_init(AVBufferRef *ref)
24 if (ctx->internal->hw_type->frames_init) {
25 ret = ctx->internal->hw_type->frames_init(ctx);
26 if (ret < 0)
27- goto fail;
28+ return ret;
29 }
30
31 if (ctx->internal->pool_internal && !ctx->pool)
32@@ -372,14 +372,10 @@ int av_hwframe_ctx_init(AVBufferRef *ref)
33 if (ctx->initial_pool_size > 0) {
34 ret = hwframe_pool_prealloc(ref);
35 if (ret < 0)
36- goto fail;
37+ return ret;
38 }
39
40 return 0;
41-fail:
42- if (ctx->internal->hw_type->frames_uninit)
43- ctx->internal->hw_type->frames_uninit(ctx);
44- return ret;
45 }
46
47 int av_hwframe_transfer_get_formats(AVBufferRef *hwframe_ref,
48--
492.40.0
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb
index 4a743c6dd7..ae02310af8 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb
@@ -33,6 +33,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
33 file://CVE-2023-51793.patch \ 33 file://CVE-2023-51793.patch \
34 file://CVE-2023-50008.patch \ 34 file://CVE-2023-50008.patch \
35 file://CVE-2024-31582.patch \ 35 file://CVE-2024-31582.patch \
36 file://CVE-2024-31578.patch \
36 " 37 "
37 38
38SRC_URI[sha256sum] = "ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b" 39SRC_URI[sha256sum] = "ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b"