diff options
| author | Archana Polampalli <archana.polampalli@windriver.com> | 2024-11-21 06:45:49 +0000 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-11-27 06:27:25 -0800 |
| commit | 751137144c9cfc5db0278abfae3997d57da254b4 (patch) | |
| tree | 137d92712b1b80182fd86c529630f536f6f7f069 | |
| parent | b7d06a657a2647d8e1863fcf4f0f473db1396a86 (diff) | |
| download | poky-751137144c9cfc5db0278abfae3997d57da254b4.tar.gz | |
ffmpeg: fix CVE-2023-51793
Buffer Overflow vulnerability in Ffmpeg v.N113007-g8d24a28d06 allows a local
attacker to execute arbitrary code via the libavutil/imgutils.c:353:9 in image_copy_plane.
(From OE-Core rev: be875832526636638a034680f837241c16e2b26d)
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-2023-51793.patch | 67 | ||||
| -rw-r--r-- | meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb | 1 |
2 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-51793.patch b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-51793.patch new file mode 100644 index 0000000000..71eeb92422 --- /dev/null +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg/CVE-2023-51793.patch | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | From 0ecc1f0e48930723d7a467761b66850811c23e62 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Michael Niedermayer <michael@niedermayer.cc> | ||
| 3 | Date: Fri, 22 Dec 2023 12:31:35 +0100 | ||
| 4 | Subject: [PATCH 2/5] avfilter/vf_weave: Fix odd height handling | ||
| 5 | |||
| 6 | Fixes: out of array access | ||
| 7 | Fixes: tickets/10743/poc10ffmpeg | ||
| 8 | |||
| 9 | Found-by: Zeng Yunxiang and Li Zeyuan | ||
| 10 | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> | ||
| 11 | |||
| 12 | CVE: CVE-2023-51793 | ||
| 13 | |||
| 14 | Upstream-Status: Backport [https://github.com/FFmpeg/FFmpeg/commit/0ecc1f0e48930723d7a467761b66850811c23e62] | ||
| 15 | |||
| 16 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
| 17 | --- | ||
| 18 | libavfilter/vf_weave.c | 9 +++++++-- | ||
| 19 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
| 20 | |||
| 21 | diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c | ||
| 22 | index 2bd3994..de9f79c 100644 | ||
| 23 | --- a/libavfilter/vf_weave.c | ||
| 24 | +++ b/libavfilter/vf_weave.c | ||
| 25 | @@ -30,6 +30,7 @@ typedef struct WeaveContext { | ||
| 26 | int double_weave; | ||
| 27 | int nb_planes; | ||
| 28 | int planeheight[4]; | ||
| 29 | + int outheight[4]; | ||
| 30 | int linesize[4]; | ||
| 31 | |||
| 32 | AVFrame *prev; | ||
| 33 | @@ -79,6 +80,9 @@ static int config_props_output(AVFilterLink *outlink) | ||
| 34 | s->planeheight[1] = s->planeheight[2] = AV_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h); | ||
| 35 | s->planeheight[0] = s->planeheight[3] = inlink->h; | ||
| 36 | |||
| 37 | + s->outheight[1] = s->outheight[2] = AV_CEIL_RSHIFT(2*inlink->h, desc->log2_chroma_h); | ||
| 38 | + s->outheight[0] = s->outheight[3] = 2*inlink->h; | ||
| 39 | + | ||
| 40 | s->nb_planes = av_pix_fmt_count_planes(inlink->format); | ||
| 41 | |||
| 42 | return 0; | ||
| 43 | @@ -104,19 +108,20 @@ static int weave_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) | ||
| 44 | const int height = s->planeheight[i]; | ||
| 45 | const int start = (height * jobnr) / nb_jobs; | ||
| 46 | const int end = (height * (jobnr+1)) / nb_jobs; | ||
| 47 | + const int compensation = 2*end > s->outheight[i]; | ||
| 48 | |||
| 49 | av_image_copy_plane(out->data[i] + out->linesize[i] * field1 + | ||
| 50 | out->linesize[i] * start * 2, | ||
| 51 | out->linesize[i] * 2, | ||
| 52 | in->data[i] + start * in->linesize[i], | ||
| 53 | in->linesize[i], | ||
| 54 | - s->linesize[i], end - start); | ||
| 55 | + s->linesize[i], end - start - compensation * field1); | ||
| 56 | av_image_copy_plane(out->data[i] + out->linesize[i] * field2 + | ||
| 57 | out->linesize[i] * start * 2, | ||
| 58 | out->linesize[i] * 2, | ||
| 59 | s->prev->data[i] + start * s->prev->linesize[i], | ||
| 60 | s->prev->linesize[i], | ||
| 61 | - s->linesize[i], end - start); | ||
| 62 | + s->linesize[i], end - start - compensation * field2); | ||
| 63 | } | ||
| 64 | |||
| 65 | return 0; | ||
| 66 | -- | ||
| 67 | 2.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 40963d1254..9a99951f91 100644 --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_5.0.1.bb | |||
| @@ -30,6 +30,7 @@ SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \ | |||
| 30 | file://0001-avformat-nutdec-Add-check-for-avformat_new_stream.patch \ | 30 | file://0001-avformat-nutdec-Add-check-for-avformat_new_stream.patch \ |
| 31 | file://CVE-2022-48434.patch \ | 31 | file://CVE-2022-48434.patch \ |
| 32 | file://CVE-2024-32230.patch \ | 32 | file://CVE-2024-32230.patch \ |
| 33 | file://CVE-2023-51793.patch \ | ||
| 33 | " | 34 | " |
| 34 | 35 | ||
| 35 | SRC_URI[sha256sum] = "ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b" | 36 | SRC_URI[sha256sum] = "ef2efae259ce80a240de48ec85ecb062cecca26e4352ffb3fda562c21a93007b" |
