From a6b43f9f9f7cbca7a111d1a138fb99121eee9313 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Wed, 12 Nov 2014 19:41:05 +0100 Subject: [PATCH] file: patch for CVE-2014-3710 via upstream github. --- srcpkgs/file/patches/CVE-2014-3710.patch | 20 ++++++++++++++++++++ srcpkgs/file/template | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/file/patches/CVE-2014-3710.patch diff --git a/srcpkgs/file/patches/CVE-2014-3710.patch b/srcpkgs/file/patches/CVE-2014-3710.patch new file mode 100644 index 00000000000..ad4cfa9fe93 --- /dev/null +++ b/srcpkgs/file/patches/CVE-2014-3710.patch @@ -0,0 +1,20 @@ +Fix note bounds reading, Francisco Alonso / Red Hat + +https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-3710 + +--- src/readelf.c ++++ src/readelf.c +@@ -477,6 +477,13 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size, + uint32_t namesz, descsz; + unsigned char *nbuf = CAST(unsigned char *, vbuf); + ++ if (xnh_sizeof + offset > size) { ++ /* ++ * We're out of note headers. ++ */ ++ return xnh_sizeof + offset; ++ } ++ + (void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof); + offset += xnh_sizeof; + diff --git a/srcpkgs/file/template b/srcpkgs/file/template index 259a1163741..8f6ebba2f53 100644 --- a/srcpkgs/file/template +++ b/srcpkgs/file/template @@ -1,7 +1,7 @@ # Template file for 'file' pkgname=file version=5.20 -revision=1 +revision=2 bootstrap=yes build_style=gnu-configure configure_args="--enable-static"