diff --git a/file-5.33-CVE-2018-10360.patch b/file-5.33-CVE-2018-10360.patch deleted file mode 100644 index 0b4e96b..0000000 --- a/file-5.33-CVE-2018-10360.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8616080aecf07436e80a27f68c336382c1d1c22d Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Sat, 9 Jun 2018 16:00:06 +0000 -Subject: [PATCH] Avoid reading past the end of buffer (Rui Reis) - -Upstream-commit: a642587a9c9e2dd7feacdf513c3643ce26ad3c22 -Signed-off-by: Kamil Dudka ---- - src/readelf.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/readelf.c b/src/readelf.c -index 3df0836..d96a538 100644 ---- a/src/readelf.c -+++ b/src/readelf.c -@@ -825,7 +825,8 @@ do_core_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, - - cname = (unsigned char *) - &nbuf[doff + prpsoffsets(i)]; -- for (cp = cname; *cp && isprint(*cp); cp++) -+ for (cp = cname; cp < nbuf + size && *cp -+ && isprint(*cp); cp++) - continue; - /* - * Linux apparently appends a space at the end --- -2.14.4 - diff --git a/file-5.33-clamav.patch b/file-5.33-clamav.patch deleted file mode 100644 index 5cd905c..0000000 --- a/file-5.33-clamav.patch +++ /dev/null @@ -1,37 +0,0 @@ -From fb1604080767501fde17eb601382e84f1c1ddca3 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Mon, 16 Jul 2018 12:30:41 +0000 -Subject: [PATCH] remember to put a space between the version and the number, - plus more version parsing (Kamil Dudka) - -Upstream-commit: 1a7f58c9f253e3b902bfb7a77afd8375b0b428b7 -Signed-off-by: Kamil Dudka ---- - magic/Magdir/fsav | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/magic/Magdir/fsav b/magic/Magdir/fsav -index 5714798..5d72ab9 100644 ---- a/magic/Magdir/fsav -+++ b/magic/Magdir/fsav -@@ -48,13 +48,15 @@ - >11 string >\0 Clam AntiVirus database %-.23s - >>34 string : - >>>35 string !: \b, version -->>>>35 string x \b%-.1s -->>>>>36 string !: -+>>>>35 string x \b %-.1s -+>>>>>36 string !: - >>>>>>36 string x \b%-.1s - >>>>>>>37 string !: - >>>>>>>>37 string x \b%-.1s - >>>>>>>>>38 string !: - >>>>>>>>>>38 string x \b%-.1s -+>>>>>>>>>>>39 string !: -+>>>>>>>>>>>>39 string x \b%-.1s - >512 string \037\213 \b, gzipped - >769 string ustar\0 \b, tarred - --- -2.14.4 - diff --git a/file-5.33-gif.patch b/file-5.33-gif.patch deleted file mode 100644 index 646ea32..0000000 --- a/file-5.33-gif.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f0e846528e1c839ab44895a1f13d167a4ad8def3 Mon Sep 17 00:00:00 2001 -From: Marek Cermak -Date: Wed, 20 Dec 2017 16:18:46 +0100 -Subject: [PATCH] Resolves: #1515180 - image/gif classifed as - application/octet-stream - -https://bugzilla.redhat.com/show_bug.cgi?id=1515180 - -Signed-off-by: Marek Cermak ---- - magic/Magdir/images | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/magic/Magdir/images b/magic/Magdir/images -index 69e8e90f..76f7e7da 100644 ---- a/magic/Magdir/images -+++ b/magic/Magdir/images -@@ -468,7 +468,9 @@ - !:mime image/x-unknown - - # GIF -+# Strength set up to beat 0x55AA DOS/MBR signature word lookups (+65) - 0 string GIF8 GIF image data -+!:strength +80 - !:mime image/gif - !:apple 8BIMGIFf - >4 string 7a \b, version 8%s, --- -2.13.6 - diff --git a/file-5.33-pie-executable-revert.patch b/file-5.33-pie-executable-revert.patch deleted file mode 100644 index 66a241c..0000000 --- a/file-5.33-pie-executable-revert.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 719116b196fd873f5a463dfdb0fd6258cee51591 Mon Sep 17 00:00:00 2001 -From: Kamil Dudka -Date: Tue, 22 May 2018 18:18:06 +0200 -Subject: [PATCH] Revert "add a conditional in description" - -Upstream-commit: 6876ebadcdf27224b3ffa9dfa4343127aa97c9b2 - -... and partially revert upstream commit -7dbecfe406a6bb2de1fe7ec2fe413dcd8871ac74 - -Signed-off-by: Kamil Dudka ---- - magic/Magdir/elf | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/magic/Magdir/elf b/magic/Magdir/elf -index 7fd5de1..dba5a73 100644 ---- a/magic/Magdir/elf -+++ b/magic/Magdir/elf -@@ -48,9 +48,8 @@ - !:mime application/x-object - >16 leshort 2 executable, - !:mime application/x-executable -->16 leshort 3 ${x?pie executable:shared object} -- --!:mime application/x-${x?pie-executable:sharedlib} -+>16 leshort 3 shared object, -+!:mime application/x-sharedlib - >16 leshort 4 core file - !:mime application/x-coredump - # Core file detection is not reliable. --- -2.14.3 - diff --git a/file-5.33-ppc-swap.patch b/file-5.33-ppc-swap.patch deleted file mode 100644 index 3cf3ece..0000000 --- a/file-5.33-ppc-swap.patch +++ /dev/null @@ -1,35 +0,0 @@ -From ed6062995ae60d6772f2dabc39e03cbf28ee7343 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Mon, 16 Jul 2018 12:32:08 +0000 -Subject: [PATCH] more info for ppc swapspace (Kamil Dudka) - -Upstream-commit: 65f9c7053548df8945df600c07123c9151531ee6 -Signed-off-by: Kamil Dudka ---- - magic/Magdir/linux | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/magic/Magdir/linux b/magic/Magdir/linux -index 0630a8a..11e9237 100644 ---- a/magic/Magdir/linux -+++ b/magic/Magdir/linux -@@ -94,6 +94,16 @@ - # From Daniel Novotny - # swap file for PowerPC - 65526 string SWAPSPACE2 Linux/ppc swap file -+>0x400 long x version %d, -+>0x404 long x size %d pages, -+>1052 string \0 no label, -+>1052 string >\0 LABEL=%s, -+>0x40c belong x UUID=%08x -+>0x410 beshort x \b-%04x -+>0x412 beshort x \b-%04x -+>0x414 beshort x \b-%04x -+>0x416 belong x \b-%08x -+>0x41a beshort x \b%04x - 16374 string SWAPSPACE2 Linux/ia64 swap file - # - # Linux kernel boot images, from Albert Cahalan --- -2.14.4 - diff --git a/file-5.33-seccomp.patch b/file-5.33-seccomp.patch deleted file mode 100644 index 89e425f..0000000 --- a/file-5.33-seccomp.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 4ae8a24b5ccbee904875a10b7b2301369080a88d Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Sun, 6 May 2018 16:36:41 +0000 -Subject: [PATCH] add more syscalls; newfstatat is used for stat'ing the magic - file, getdents64 is used for getting the magic entries during compilation. - -Upstream-commit: aeddbff330fad0edff2ab4b02dbf0863cd593c3c -Signed-off-by: Kamil Dudka ---- - src/seccomp.c | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/src/seccomp.c b/src/seccomp.c -index 7c8a3144..481a5624 100644 ---- a/src/seccomp.c -+++ b/src/seccomp.c -@@ -59,12 +59,7 @@ enable_sandbox_basic(void) - if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) == -1) - return -1; - --#if 0 -- // prevent escape via ptrace -- prctl(PR_SET_DUMPABLE, 0); --#endif -- -- if (prctl (PR_SET_DUMPABLE, 0, 0, 0, 0) == -1) -+ if (prctl(PR_SET_DUMPABLE, 0, 0, 0, 0) == -1) - return -1; - - // initialize the filter -@@ -171,6 +166,9 @@ enable_sandbox_full(void) - ALLOW_RULE(fcntl); - ALLOW_RULE(fstat); - ALLOW_RULE(getdents); -+#ifdef __NR_getdents64 -+ ALLOW_RULE(getdents64); -+#endif - ALLOW_RULE(ioctl); - ALLOW_RULE(lseek); - ALLOW_RULE(lstat); -@@ -178,6 +176,9 @@ enable_sandbox_full(void) - ALLOW_RULE(mprotect); - ALLOW_RULE(mremap); - ALLOW_RULE(munmap); -+#ifdef __NR_newfstatat -+ ALLOW_RULE(newfstatat); -+#endif - ALLOW_RULE(open); - ALLOW_RULE(openat); - ALLOW_RULE(pread64); --- -2.17.0 - diff --git a/file-5.33.tar.gz.asc b/file-5.33.tar.gz.asc deleted file mode 100644 index e8901c6..0000000 --- a/file-5.33.tar.gz.asc +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iEYEABECAAYFAlrToaMACgkQcREqsWyzOzrTHwCdG6Qlc1qsB9YcfZXYwRfXQivE -9SkAn0/ecDZhfJzgHtQM59gCgNXG4S9h -=nWes ------END PGP SIGNATURE----- diff --git a/file-5.34.tar.gz.asc b/file-5.34.tar.gz.asc new file mode 100644 index 0000000..a20e766 --- /dev/null +++ b/file-5.34.tar.gz.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP SIGNATURE----- + +iEYEABECAAYFAltYEXYACgkQcREqsWyzOzpnxwCfXZkGLqYAncdftwkXdBzWNGeM +bEkAoLHe7Q7/a0vgs1QI4ChwOnJbMkJA +=F+1u +-----END PGP SIGNATURE----- diff --git a/file.spec b/file.spec index c4c0085..2f16aeb 100644 --- a/file.spec +++ b/file.spec @@ -14,8 +14,8 @@ Summary: A utility for determining file types Name: file -Version: 5.33 -Release: 10%{?dist} +Version: 5.34 +Release: 1%{?dist} License: BSD Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz @@ -26,22 +26,6 @@ Patch0: file-localmagic.patch Patch1: file-4.17-rpm-name.patch Patch2: file-5.04-volume_key.patch -# picked from upstream -Patch3: file-5.33-gif.patch -Patch4: file-5.33-seccomp.patch - -# do not classify shared libraries as pie executables (#1581343) -Patch5: file-5.33-pie-executable-revert.patch - -# fix out-of-bounds read via a crafted ELF file (CVE-2018-10360) -Patch6: file-5.33-CVE-2018-10360.patch - -# support longer version strings for clamav database (#1539107) -Patch7: file-5.33-clamav.patch - -# show details about ppc swap partition (#1224668) -Patch8: file-5.33-ppc-swap.patch - URL: http://www.darwinsys.com/file/ Requires: file-libs = %{version}-%{release} BuildRequires: zlib-devel @@ -198,7 +182,7 @@ cd %{py3dir} %files -n python2-magic %{!?_licensedir:%global license %%doc} %license COPYING -%doc python/README python/example.py +%doc python/README.md python/example.py %{python2_sitelib}/magic.py %{python2_sitelib}/magic.pyc %{python2_sitelib}/magic.pyo @@ -211,13 +195,16 @@ cd %{py3dir} %files -n python3-magic %{!?_licensedir:%global license %%doc} %license COPYING -%doc python/README python/example.py +%doc python/README.md python/example.py %{python3_sitelib}/magic.py %{python3_sitelib}/*egg-info %{python3_sitelib}/__pycache__/* %endif %changelog +* Wed Jul 25 2018 Kamil Dudka - 5.34-1 +- update to new version 5.34 + * Tue Jul 17 2018 Kamil Dudka - 5.33-10 - show details about ppc swap partition (#1224668) - support longer version strings for clamav database (#1539107) diff --git a/sources b/sources index fef9376..14777a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (file-5.33.tar.gz) = 36c9f2e2aa814b5557eef114fdd3de159688c7a3c9632a9f5c6355c4d2a5694cee81279bda80897616fca07289a7fedb1f797439a2903c76dc84870694773c9e +SHA512 (file-5.34.tar.gz) = 57849f8496fd356a66e5559804fdd907059dc2e2f75ede470a25c65b1c499481aad3d7978454b15a15e94c07c9d6795864e8705304a2281dacf1c4e31501bed8