libsdl: import from OE-Core
PATCH 1/1 libsdl: import from OE-Core
Include the recipe from OE-Core along with some additional patches to fix CVEs.
Signed-off-by Anuj Mittal <[email protected]>
--- ...-tag-CC-explictly-when-using-libtool.patch | 73 +++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7572.patch | 114 +++++++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7574.patch | 68 +++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7575.patch | 81 ++++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7576.patch | 80 ++++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7577.patch | 123 +++++++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7578.patch | 64 ++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7635.patch | 63 ++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7637.patch | 192 ++++++++++++++++++ .../libsdl/libsdl-1.2.15/CVE-2019-7638.patch | 38 ++++ .../libsdl-1.2.15/libsdl-1.2.15-xdata32.patch | 19 ++ .../libsdl/libsdl-1.2.15/pkgconfig.patch | 187 +++++++++++++++++ .../recipes-graphics/libsdl/libsdl_1.2.15.bb | 83 ++++++++ 13 files changed, 1185 insertions(+) create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/0001-build-Pass-tag-CC-explictly-when-using-libtool.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7572.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7574.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7575.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7576.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7577.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7578.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7635.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7637.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7638.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/libsdl-1.2.15-xdata32.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/pkgconfig.patch create mode 100644 meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/0001-build-Pass-tag-CC-explictly-when-using-libtool.patch new file +73 -0
@@ -0,0 +1,73 @@ +From 44e4bb4cfb81024c8f5fd2e179e8a32c42756a2f Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sun, 23 Jul 2017 16:52:43 -0700 +Subject: [PATCH] build: Pass --tag=CC explictly when using libtool + +Do not depend solely on libtool heuristics which fail +in OE case when building with external compiler and +hardening flags + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <[email protected]> +--- + Makefile.in | 4 ++-- + build-scripts/makedep.sh | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index ab51035..743ce30 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -72,10 +72,10 @@ depend: + include $(depend) + + $(objects)/$(TARGET): $(OBJECTS) +- $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) ++ $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) + + $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS) +- $(LIBTOOL) --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(SDLMAIN_LDFLAGS) ++ $(LIBTOOL) --tag=CC --mode=link $(CC) -o $@ $^ $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) $(SDLMAIN_LDFLAGS) + + + install: all install-bin install-hdrs install-lib install-data install-man +diff --git a/build-scripts/makedep.sh b/build-scripts/makedep.sh +index 3b3863b..dba28f2 100755 +--- a/build-scripts/makedep.sh ++++ b/build-scripts/makedep.sh +@@ -51,19 +51,19 @@ do echo "Generating dependencies for $src" + case $ext in + c) cat >>${output}.new <<__EOF__ + +- \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ ++ \$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ + + __EOF__ + ;; + cc) cat >>${output}.new <<__EOF__ + +- \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ ++ \$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ + + __EOF__ + ;; + m) cat >>${output}.new <<__EOF__ + +- \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ ++ \$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ + + __EOF__ + ;; +@@ -75,7 +75,7 @@ __EOF__ + ;; + S) cat >>${output}.new <<__EOF__ + +- \$(LIBTOOL) --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ ++ \$(LIBTOOL) --tag=CC --mode=compile \$(CC) \$(CFLAGS) \$(EXTRA_CFLAGS) -c $src -o \$@ + + __EOF__ + ;; +-- +2.13.3 +
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7572.patch new file +114 -0
114 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7574.patch new file +68 -0
68 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7575.patch new file +81 -0
81 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7576.patch new file +80 -0
80 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7577.patch new file +123 -0
123 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7578.patch new file +64 -0
64 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7635.patch new file +63 -0
63 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7637.patch new file +192 -0
192 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/CVE-2019-7638.patch new file +38 -0
@@ -0,0 +1,38 @@ +# HG changeset patch +# User Sam Lantinga <[email protected]> +# Date 1550504903 28800 +# Mon Feb 18 07:48:23 2019 -0800 +# Branch SDL-1.2 +# Node ID 19d8c3b9c25143f71a34ff40ce1df91b4b3e3b78 +# Parent 8586f153eedec4c4e07066d6248ebdf67f10a229 +Fixed bug 4500 - Heap-Buffer Overflow in Map1toN pertaining to SDL_pixels.c + +Petr Pisar + +The reproducer has these data in BITMAPINFOHEADER: + +biSize = 40 +biBitCount = 8 +biClrUsed = 131075 + +SDL_LoadBMP_RW() function passes biBitCount as a color depth to SDL_CreateRGBSurface(), thus 256-color pallete is allocated. But then biClrUsed colors are read from a file and stored into the palette. SDL_LoadBMP_RW should report an error if biClrUsed is greater than 2^biBitCount. + +CVE: CVE-2019-7638 +CVE: CVE-2019-7636 +Upstream-Status: Backport +Signed-off-by: Anuj Mittal <[email protected]> + +diff -r 8586f153eede -r 19d8c3b9c251 src/video/SDL_bmp.c +--- a/src/video/SDL_bmp.c Sun Jan 13 15:27:50 2019 +0100 ++++ b/src/video/SDL_bmp.c Mon Feb 18 07:48:23 2019 -0800 +@@ -233,6 +233,10 @@ + if ( palette ) { + if ( biClrUsed == 0 ) { + biClrUsed = 1 << biBitCount; ++ } else if ( biClrUsed > (1 << biBitCount) ) { ++ SDL_SetError("BMP file has an invalid number of colors"); ++ was_error = SDL_TRUE; ++ goto done; + } + if ( biSize == 12 ) { + for ( i = 0; i < (int)biClrUsed; ++i ) {
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/libsdl-1.2.15-xdata32.patch new file +19 -0
@@ -0,0 +1,19 @@ +libX11-1.5.99.901 has changed prototype of _XData32 + +Upstream-Status: Backport +<http://bugzilla.libsdl.org/show_bug.cgi?id=1769> + +Signed-off-by: Saul Wold <[email protected]> + +diff -r b6b2829cd7ef src/video/x11/SDL_x11sym.h +--- a/src/video/x11/SDL_x11sym.h Wed Feb 27 15:20:31 2013 -0800 ++++ b/src/video/x11/SDL_x11sym.h Wed Mar 27 16:07:23 2013 +0100 +@@ -165,7 +165,7 @@ + */ + #ifdef LONG64 + SDL_X11_MODULE(IO_32BIT) +-SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) ++SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return) + SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) + #endif +
meta-oe/recipes-graphics/libsdl/libsdl-1.2.15/pkgconfig.patch new file +187 -0
187 lines not on this page · raw message
meta-oe/recipes-graphics/libsdl/libsdl_1.2.15.bb new file +83 -0
83 lines not on this page · raw message
Signature · 1 line
2.20.1