summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwangmy <wangmy@fujitsu.com>2021-05-18 16:09:11 +0800
committerArmin Kuster <akuster808@gmail.com>2021-05-22 16:14:30 -0700
commit9d50b9f99509147613bfcee420b1718cd856c390 (patch)
tree9910d996118c60b5d5e50825f748712e4fcbc1e1
parenta3a0e023193ee465f8a4d408339352c85a20e80d (diff)
downloadmeta-openembedded-9d50b9f99509147613bfcee420b1718cd856c390.tar.gz
libsdl: Fix CVE-2019-13616
References https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-13616 SDL (Simple DirectMedia Layer) through 1.2.15 and 2.x through 2.0.9 has a heap-based buffer over-read in BlitNtoN in video/SDL_blit_N.c when called from SDL_SoftBlit in video/SDL_blit.c. Upstream-Status: Backport [https://github.com/libsdl-org/SDL/commit/97fefd050976bbbfca9608499f6a7d9fb86e70db] CVE: CVE-2019-13616 Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-13616.patch27
-rw-r--r--meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb1
2 files changed, 28 insertions, 0 deletions
diff --git a/meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-13616.patch b/meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-13616.patch
new file mode 100644
index 000000000..2db67966c
--- /dev/null
+++ b/meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-13616.patch
@@ -0,0 +1,27 @@
1From 97fefd050976bbbfca9608499f6a7d9fb86e70db Mon Sep 17 00:00:00 2001
2From: Sam Lantinga <slouken@libsdl.org>
3Date: Tue, 30 Jul 2019 11:00:00 -0700
4Subject: [PATCH] Fixed bug 4538 - validate image size when loading BMP files
5---
6 src/video/SDL_bmp.c | 5 +++++
7 1 file changed, 5 insertions(+)
8
9diff --git a/src/video/SDL_bmp.c b/src/video/SDL_bmp.c
10index 8eadc5f..5b5e12c 100644
11--- a/src/video/SDL_bmp.c
12+++ b/src/video/SDL_bmp.c
13@@ -143,6 +143,11 @@ SDL_Surface * SDL_LoadBMP_RW (SDL_RWops *src, int freesrc)
14 (void) biYPelsPerMeter;
15 (void) biClrImportant;
16
17+ if (biWidth <= 0 || biHeight == 0) {
18+ SDL_SetError("BMP file with bad dimensions (%dx%d)", biWidth, biHeight);
19+ was_error = SDL_TRUE;
20+ goto done;
21+ }
22 if (biHeight < 0) {
23 topDown = SDL_TRUE;
24 biHeight = -biHeight;
25--
262.25.1
27
diff --git a/meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb b/meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb
index 7a0190832..d91a1856b 100644
--- a/meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb
+++ b/meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb
@@ -27,6 +27,7 @@ SRC_URI = "http://www.libsdl.org/release/SDL-${PV}.tar.gz \
27 file://CVE-2019-7637.patch \ 27 file://CVE-2019-7637.patch \
28 file://CVE-2019-7638.patch \ 28 file://CVE-2019-7638.patch \
29 file://CVE-2019-7576.patch \ 29 file://CVE-2019-7576.patch \
30 file://CVE-2019-13616.patch \
30 " 31 "
31 32
32UPSTREAM_CHECK_REGEX = "SDL-(?P<pver>\d+(\.\d+)+)\.tar" 33UPSTREAM_CHECK_REGEX = "SDL-(?P<pver>\d+(\.\d+)+)\.tar"