From: Gustavo Zacarias Date: Tue, 17 Jun 2014 19:05:49 +0000 (-0300) Subject: links: add security fix for CVE-2013-6050 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69636df180e4a723b6160685b605dfbe326a0d26;p=buildroot.git links: add security fix for CVE-2013-6050 Also fix LICENSE typo. Signed-off-by: Gustavo Zacarias Signed-off-by: Peter Korsgaard --- diff --git a/package/links/links-0001-no-largefile.patch b/package/links/links-0001-no-largefile.patch new file mode 100644 index 0000000000..f3143cba03 --- /dev/null +++ b/package/links/links-0001-no-largefile.patch @@ -0,0 +1,22 @@ +Index: links-1.01pre1-no-ssl/links.h +=================================================================== +--- links-1.01pre1-no-ssl.orig/links.h 2010-06-21 00:39:10.000000000 +0200 ++++ links-1.01pre1-no-ssl/links.h 2010-06-21 00:39:52.000000000 +0200 +@@ -2,6 +2,9 @@ + #define __EXTENSIONS__ + #endif + ++#include ++/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */ ++#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__)) + #ifndef _LARGEFILE_SOURCE + #define _LARGEFILE_SOURCE 1 + #endif +@@ -9,6 +12,7 @@ + #ifndef _FILE_OFFSET_BITS + #define _FILE_OFFSET_BITS 64 + #endif ++#endif + + #ifdef HAVE_CONFIG_H + #include "config.h" diff --git a/package/links/links-0002-CVE-2013-6050.patch b/package/links/links-0002-CVE-2013-6050.patch new file mode 100644 index 0000000000..d85c2503c0 --- /dev/null +++ b/package/links/links-0002-CVE-2013-6050.patch @@ -0,0 +1,17 @@ +Description: Fix integer overflow in graphics mode (CVE-2013-6050) +Author: Mikulas Patocka +Bug-CVE: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-6050 + +Index: links-2.7/html_tbl.c +=================================================================== +--- links-2.7.orig/html_tbl.c 2013-11-22 01:57:29.000000000 +0100 ++++ links-2.7/html_tbl.c 2013-11-22 01:58:30.000000000 +0100 +@@ -1550,6 +1550,8 @@ static void add_to_rect_sets(struct rect + static void add_to_cell_sets(struct table_cell ****s, int **nn, int *n, struct rect *r, struct table_cell *c) + { + int i, j; ++ if (r->y1 < 0 || r->y2 < 0) ++ fatal_exit("add_to_cell_sets: integer overflow: %d, %d", r->y1, r->y2); + for (i = r->y1 >> RECT_BOUND_BITS; i <= (r->y2 - 1) >> RECT_BOUND_BITS; i++) { + if (i >= *n) { + struct table_cell ***ns; diff --git a/package/links/links-no-largefile.patch b/package/links/links-no-largefile.patch deleted file mode 100644 index f3143cba03..0000000000 --- a/package/links/links-no-largefile.patch +++ /dev/null @@ -1,22 +0,0 @@ -Index: links-1.01pre1-no-ssl/links.h -=================================================================== ---- links-1.01pre1-no-ssl.orig/links.h 2010-06-21 00:39:10.000000000 +0200 -+++ links-1.01pre1-no-ssl/links.h 2010-06-21 00:39:52.000000000 +0200 -@@ -2,6 +2,9 @@ - #define __EXTENSIONS__ - #endif - -+#include -+/* uclibc without largefile support #errors on _FILE_OFFSET_BITS=64 */ -+#if !(defined(__UCLIBC__) && !defined(__UCLIBC_HAS_LFS__)) - #ifndef _LARGEFILE_SOURCE - #define _LARGEFILE_SOURCE 1 - #endif -@@ -9,6 +12,7 @@ - #ifndef _FILE_OFFSET_BITS - #define _FILE_OFFSET_BITS 64 - #endif -+#endif - - #ifdef HAVE_CONFIG_H - #include "config.h" diff --git a/package/links/links.mk b/package/links/links.mk index 6e683dd094..a7baa4c756 100644 --- a/package/links/links.mk +++ b/package/links/links.mk @@ -7,7 +7,7 @@ LINKS_VERSION = 2.7 LINKS_SITE = http://links.twibright.com/download LINKS_DEPENDENCIES = host-pkgconf -LINKS_LICNSE = GPLv2+ +LINKS_LICENSE = GPLv2+ LINKS_LICENSE_FILES = COPYING ifeq ($(BR2_PACKAGE_LINKS_GRAPHICS),y)