diff --git a/CVE-2019-18218-46a8443f.patch b/CVE-2019-18218-46a8443f.patch deleted file mode 100644 index e36998a..0000000 --- a/CVE-2019-18218-46a8443f.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 46a8443f76cec4b41ec736eca396984c74664f84 Mon Sep 17 00:00:00 2001 -From: Christos Zoulas -Date: Mon, 26 Aug 2019 14:31:39 +0000 -Subject: [PATCH] Limit the number of elements in a vector (found by oss-fuzz) - ---- - src/cdf.c | 7 +++---- - src/cdf.h | 1 + - 2 files changed, 4 insertions(+), 4 deletions(-) - ---- src/cdf.c -+++ src/cdf.c 2019-10-22 13:05:01.410441092 +0000 -@@ -968,8 +968,9 @@ cdf_read_property_info(const cdf_stream_ - goto out; - } - nelements = CDF_GETUINT32(q, 1); -- if (nelements == 0) { -- DPRINTF(("CDF_VECTOR with nelements == 0\n")); -+ if (nelements > CDF_ELEMENT_LIMIT || nelements == 0) { -+ DPRINTF(("CDF_VECTOR with nelements == %" -+ SIZE_T_FORMAT "u\n", nelements)); - goto out; - } - slen = 2; -@@ -1011,8 +1012,6 @@ cdf_read_property_info(const cdf_stream_ - goto out; - inp += nelem; - } -- DPRINTF(("nelements = %" SIZE_T_FORMAT "u\n", -- nelements)); - for (j = 0; j < nelements && i < sh.sh_properties; - j++, i++) - { ---- src/cdf.h -+++ src/cdf.h 2019-10-22 13:05:01.422440872 +0000 -@@ -48,6 +48,7 @@ - typedef int32_t cdf_secid_t; - - #define CDF_LOOP_LIMIT 10000 -+#define CDF_ELEMENT_LIMIT 100000 - - #define CDF_SECID_NULL 0 - #define CDF_SECID_FREE -1 diff --git a/file-5.12-zip.dif b/file-5.12-zip.dif index 761ad31..88a86b9 100644 --- a/file-5.12-zip.dif +++ b/file-5.12-zip.dif @@ -4,7 +4,7 @@ --- magic/Magdir/archive +++ magic/Magdir/archive 2019-05-27 08:45:06.163107524 +0000 -@@ -1072,6 +1072,25 @@ +@@ -1100,6 +1100,25 @@ !:strength +1 0 string PK\003\004 !:strength +1 diff --git a/file-5.15-clear-invalid.patch b/file-5.15-clear-invalid.patch deleted file mode 100644 index 70325cd..0000000 --- a/file-5.15-clear-invalid.patch +++ /dev/null @@ -1,23 +0,0 @@ -From: Andreas Stieger -Date: Sun, 29 Sep 2013 01:47:57 +0100 -Subject: [PATCH] remove clear instruction -Upstream: no -References: http://mx.gw.com/pipermail/file/2013/001227.html http://mx.gw.com/pipermail/file/2013/001225.html - -fixed build warning: -[ 205s] /usr/share/misc/magic, 5352: Warning: type `clear x' invalid - ---- - file-5.28/magic/Magdir/elf | 1 - - 1 file changed, 1 deletion(-) - ---- file-5.28/magic/Magdir/elf -+++ file-5.28/magic/Magdir/elf 2016-08-16 11:50:06.748513191 +0000 -@@ -63,7 +63,6 @@ - #>>>(0x38+0xcc) string >\0 of '%s' - #>>>(0x38+0x10) lelong >0 (signal %d), - >16 leshort &0xff00 processor-specific, -->18 clear x - >18 leshort 0 no machine, - >18 leshort 1 AT&T WE32100, - >18 leshort 2 SPARC, diff --git a/file-5.16-ocloexec.patch b/file-5.16-ocloexec.patch index 5dab229..ac29bf7 100644 --- a/file-5.16-ocloexec.patch +++ b/file-5.16-ocloexec.patch @@ -16,7 +16,7 @@ if (f == NULL) { if (errno != ENOENT) file_error(ms, errno, "cannot read magic file `%s'", -@@ -3062,7 +3062,7 @@ apprentice_map(struct magic_set *ms, con +@@ -3052,7 +3052,7 @@ apprentice_map(struct magic_set *ms, con if (dbname == NULL) goto error; @@ -25,7 +25,7 @@ goto error; if (fstat(fd, &st) == -1) { -@@ -3199,7 +3199,7 @@ apprentice_compile(struct magic_set *ms, +@@ -3189,7 +3189,7 @@ apprentice_compile(struct magic_set *ms, if (dbname == NULL) goto out; @@ -36,7 +36,7 @@ goto out; --- src/compress.c +++ src/compress.c 2019-05-27 08:53:31.057488035 +0000 -@@ -435,7 +435,7 @@ file_pipe2file(struct magic_set *ms, int +@@ -460,7 +460,7 @@ file_pipe2file(struct magic_set *ms, int { int te; mode_t ou = umask(0); @@ -47,7 +47,7 @@ (void)unlink(buf); --- src/file.c +++ src/file.c 2019-05-27 08:53:31.057488035 +0000 -@@ -498,7 +498,7 @@ unwrap(struct magic_set *ms, const char +@@ -496,7 +496,7 @@ unwrap(struct magic_set *ms, const char f = stdin; wid = 1; } else { diff --git a/file-5.17-option.dif b/file-5.17-option.dif index 93d3b85..6576a47 100644 --- a/file-5.17-option.dif +++ b/file-5.17-option.dif @@ -4,7 +4,7 @@ --- src/file.c +++ src/file.c 2019-05-27 08:48:39.047051545 +0000 -@@ -242,6 +242,8 @@ main(int argc, char *argv[]) +@@ -237,6 +237,8 @@ main(int argc, char *argv[]) flags |= MAGIC_ERROR; break; case 'e': @@ -13,7 +13,7 @@ for (i = 0; i < __arraycount(nv); i++) if (strcmp(nv[i].name, optarg) == 0) break; -@@ -253,7 +255,7 @@ main(int argc, char *argv[]) +@@ -248,7 +250,7 @@ main(int argc, char *argv[]) break; case 'f': @@ -22,7 +22,7 @@ usage(); if (magic == NULL) if ((magic = load(magicfile, flags)) == NULL) -@@ -263,6 +265,8 @@ main(int argc, char *argv[]) +@@ -258,6 +260,8 @@ main(int argc, char *argv[]) ++didsomefiles; break; case 'F': @@ -31,7 +31,7 @@ separator = optarg; break; case 'i': -@@ -275,6 +279,8 @@ main(int argc, char *argv[]) +@@ -270,6 +274,8 @@ main(int argc, char *argv[]) action = FILE_LIST; break; case 'm': diff --git a/file-5.19-biorad.dif b/file-5.19-biorad.dif index fdb3492..482cd89 100644 --- a/file-5.19-biorad.dif +++ b/file-5.19-biorad.dif @@ -4,7 +4,7 @@ --- magic/Magdir/images +++ magic/Magdir/images 2019-05-27 08:52:51.674238380 +0000 -@@ -1028,6 +1028,8 @@ +@@ -1277,6 +1277,8 @@ # https://web.archive.org/web/20050317223257/www.cs.ubc.ca/spider/ladic/text/biorad.txt # Samples: https://www.loci.wisc.edu/software/sample-data 14 leshort <2 diff --git a/file-5.19-printf.dif b/file-5.19-printf.dif index 41debe7..6370438 100644 --- a/file-5.19-printf.dif +++ b/file-5.19-printf.dif @@ -4,7 +4,7 @@ --- src/apprentice.c +++ src/apprentice.c 2019-02-21 06:39:25.249091320 +0000 -@@ -2428,6 +2428,12 @@ check_format_type(const char *ptr, int t +@@ -2418,6 +2418,12 @@ check_format_type(const char *ptr, int t ptr++; if (*ptr == '#') ptr++; diff --git a/file-5.19-zip2.0.dif b/file-5.19-zip2.0.dif index 6cc46dc..59b94ba 100644 --- a/file-5.19-zip2.0.dif +++ b/file-5.19-zip2.0.dif @@ -4,7 +4,7 @@ --- magic/Magdir/archive +++ magic/Magdir/archive 2019-02-21 06:49:05.298138025 +0000 -@@ -1064,6 +1064,11 @@ +@@ -1092,6 +1092,11 @@ 0 string PK\x07\x08PK\x03\x04 Zip multi-volume archive data, at least PKZIP v2.50 to extract !:mime application/zip !:ext zip/cbz diff --git a/file-5.23-endian.patch b/file-5.23-endian.patch index b3561e2..734c375 100644 --- a/file-5.23-endian.patch +++ b/file-5.23-endian.patch @@ -29,7 +29,7 @@ private char *mkdbname(struct magic_set *, const char *, int); private struct magic_map *apprentice_buf(struct magic_set *, struct magic *, size_t); -@@ -3292,67 +3294,6 @@ byteswap(struct magic *magic, uint32_t n +@@ -3282,67 +3284,6 @@ byteswap(struct magic *magic, uint32_t n } /* @@ -107,7 +107,7 @@ #ifndef EFTYPE #define EFTYPE EINVAL -@@ -116,55 +117,9 @@ cdf_calloc(const char *file __attribute_ +@@ -120,55 +121,9 @@ cdf_calloc(const char *file __attribute_ return calloc(n, u); } diff --git a/file-5.24-nitpick.dif b/file-5.24-nitpick.dif index d5004c2..f6eaf7d 100644 --- a/file-5.24-nitpick.dif +++ b/file-5.24-nitpick.dif @@ -5,7 +5,7 @@ --- src/file.c +++ src/file.c 2018-10-22 07:56:59.735038350 +0000 -@@ -108,10 +108,12 @@ private const struct option long_options +@@ -102,10 +102,12 @@ private const struct option long_options #define OPT_MIME_ENCODING 5 #define OPT(shortname, longname, opt, def, doc) \ {longname, opt, NULL, shortname}, @@ -18,7 +18,7 @@ #undef OPT_LONGONLY {0, 0, NULL, 0} }; -@@ -647,6 +649,7 @@ docprint(const char *opts, int def) +@@ -645,6 +647,7 @@ docprint(const char *opts, int def) private void help(void) { @@ -26,7 +26,7 @@ (void)fputs( "Usage: file [OPTION...] [FILE...]\n" "Determine type of FILEs.\n" -@@ -654,11 +657,16 @@ help(void) +@@ -652,11 +655,16 @@ help(void) #define OPT(shortname, longname, opt, def, doc) \ fprintf(stdout, " -%c, --" longname, shortname), \ docprint(doc, def); @@ -45,7 +45,7 @@ exit(EXIT_SUCCESS); --- src/file_opts.h +++ src/file_opts.h 2018-10-22 07:55:03.281221021 +0000 -@@ -36,8 +36,8 @@ OPT_LONGONLY("mime-encoding", 0, 0, " +@@ -39,8 +39,8 @@ OPT_LONGONLY("mime-encoding", 0, 0, " OPT('k', "keep-going", 0, 0, " don't stop at the first match\n") OPT('l', "list", 0, 0, " list magic strength\n") #ifdef S_IFLNK diff --git a/file-5.28-btrfs-image.dif b/file-5.28-btrfs-image.dif index d0315f5..08cda23 100644 --- a/file-5.28-btrfs-image.dif +++ b/file-5.28-btrfs-image.dif @@ -16,7 +16,7 @@ contained within the image. diff --git a/magic/Magdir/filesystems b/magic/Magdir/filesystems --- a/magic/Magdir/filesystems +++ b/magic/Magdir/filesystems -@@ -2291,20 +2291,29 @@ +@@ -2281,20 +2281,29 @@ >>0x10060 string >\0 lockproto %s) # Russell Coker diff --git a/file-5.37.tar.gz b/file-5.37.tar.gz deleted file mode 100644 index 513efe5..0000000 --- a/file-5.37.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9c13967f7dd339a3c241b7710ba093560b9a33013491318e88e6b8b57bae07f -size 887682 diff --git a/file-5.37.tar.gz.asc b/file-5.37.tar.gz.asc deleted file mode 100644 index c019420..0000000 --- a/file-5.37.tar.gz.asc +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iEYEABECAAYFAlzeHJcACgkQcREqsWyzOzrudwCg6X2ESwogvW+LinRPNULUDrZV -bE4An2pcK2m7rmImJ3TBoFEH+osRFwyO -=AZbT ------END PGP SIGNATURE----- diff --git a/file-5.37.dif b/file-5.38.dif similarity index 90% rename from file-5.37.dif rename to file-5.38.dif index 2dd36f3..510a39a 100644 --- a/file-5.37.dif +++ b/file-5.38.dif @@ -10,7 +10,7 @@ 8 files changed, 312 insertions(+), 67 deletions(-) --- magic/Magdir/elf -+++ magic/Magdir/elf 2019-05-27 09:12:24.240057311 +0000 ++++ magic/Magdir/elf 2019-12-17 09:32:49.679457205 +0000 @@ -135,7 +135,7 @@ >18 leshort 47 Renesas H8/300H, >18 leshort 48 Renesas H8S, @@ -21,7 +21,7 @@ >18 leshort 52 Motorola Coldfire, >18 leshort 53 Motorola M68HC12, --- magic/Magdir/linux -+++ magic/Magdir/linux 2019-05-27 09:16:20.143608597 +0000 ++++ magic/Magdir/linux 2019-12-17 09:32:49.679457205 +0000 @@ -112,27 +112,31 @@ # All known start with: b8 c0 07 8e d8 b8 00 90 8e c0 b9 00 01 29 f6 29 # Linux kernel boot images (i386 arch) (Wolfram Kleff) @@ -71,7 +71,7 @@ 0 belong 0xb8c0078e Linux kernel >0x1e3 string Loading version 1.3.79 or older --- magic/Magdir/msad -+++ magic/Magdir/msad 2019-05-27 09:12:24.240057311 +0000 ++++ magic/Magdir/msad 2019-12-17 09:32:49.679457205 +0000 @@ -0,0 +1,5 @@ +#------------------------------------------------------------------------------ +# msad: file(1) magic for msad @@ -79,20 +79,20 @@ +# This must precede the heuristic for raw G3 data +4 string Standard\ Jet\ DB Microsoft Access Database --- magic/Magdir/msdos -+++ magic/Magdir/msdos 2019-05-27 09:12:24.240057311 +0000 -@@ -135,9 +135,9 @@ - >>>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB) - >>>(0x3c.l+22) leshort&0x1000 >0 system file - >>>(0x3c.l+24) leshort 0x010b -->>>>(0x3c.l+232) lelong >0 Mono/.Net assembly -+>>>>(0x3c.l+232) lelong >0 \b, Mono/.Net assembly - >>>(0x3c.l+24) leshort 0x020b -->>>>(0x3c.l+248) lelong >0 Mono/.Net assembly -+>>>>(0x3c.l+248) lelong >0 \b, Mono/.Net assembly ++++ magic/Magdir/msdos 2019-12-17 09:39:04.532385769 +0000 +@@ -142,9 +142,9 @@ + >>(0x3c.l+22) leshort&0x0200 >0 (stripped to external PDB) + >>(0x3c.l+22) leshort&0x1000 >0 system file + >>(0x3c.l+24) leshort 0x010b +->>>(0x3c.l+232) lelong >0 Mono/.Net assembly ++>>>(0x3c.l+232) lelong >0 \b, Mono/.Net assembly + >>(0x3c.l+24) leshort 0x020b +->>>(0x3c.l+248) lelong >0 Mono/.Net assembly ++>>>(0x3c.l+248) lelong >0 \b, Mono/.Net assembly # hooray, there's a DOS extender using the PE format, with a valid PE # executable inside (which just prints a message and exits if run in win) -@@ -520,7 +520,7 @@ +@@ -531,7 +531,7 @@ # negative offset, must not lead into PSP >1 short <-259 # that offset must be accessible @@ -102,7 +102,7 @@ # updated by Joerg Jenderek at Oct 2008,2015 --- magic/Makefile.am -+++ magic/Makefile.am 2019-05-27 09:18:21.205329508 +0000 ++++ magic/Makefile.am 2019-12-17 09:39:43.019659705 +0000 @@ -5,7 +5,7 @@ MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) @@ -128,7 +128,7 @@ $(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/flash \ $(MAGIC_FRAGMENT_DIR)/flif \ -@@ -138,6 +136,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ +@@ -140,6 +138,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ $(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/javascript \ $(MAGIC_FRAGMENT_DIR)/jpeg \ @@ -137,7 +137,7 @@ $(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/kde \ $(MAGIC_FRAGMENT_DIR)/keepass \ -@@ -147,14 +147,12 @@ $(MAGIC_FRAGMENT_DIR)/kml \ +@@ -149,14 +149,12 @@ $(MAGIC_FRAGMENT_DIR)/kml \ $(MAGIC_FRAGMENT_DIR)/lecter \ $(MAGIC_FRAGMENT_DIR)/lex \ $(MAGIC_FRAGMENT_DIR)/lif \ @@ -152,11 +152,12 @@ $(MAGIC_FRAGMENT_DIR)/macos \ $(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/mail.news \ -@@ -178,10 +176,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ +@@ -180,11 +178,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ $(MAGIC_FRAGMENT_DIR)/mkid \ $(MAGIC_FRAGMENT_DIR)/mlssa \ $(MAGIC_FRAGMENT_DIR)/mmdf \ -$(MAGIC_FRAGMENT_DIR)/modem \ + $(MAGIC_FRAGMENT_DIR)/modulefile \ $(MAGIC_FRAGMENT_DIR)/motorola \ $(MAGIC_FRAGMENT_DIR)/mozilla \ $(MAGIC_FRAGMENT_DIR)/msdos \ @@ -164,7 +165,7 @@ $(MAGIC_FRAGMENT_DIR)/msooxml \ $(MAGIC_FRAGMENT_DIR)/msvc \ $(MAGIC_FRAGMENT_DIR)/msx \ -@@ -234,6 +232,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ +@@ -240,6 +238,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ $(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ @@ -173,7 +174,7 @@ $(MAGIC_FRAGMENT_DIR)/rpi \ $(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rpmsg \ -@@ -311,8 +311,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ +@@ -319,8 +319,20 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ $(MAGIC_FRAGMENT_DIR)/zip \ $(MAGIC_FRAGMENT_DIR)/zyxel @@ -195,7 +196,7 @@ # FIXME: Build file natively as well so that it can be used to compile # the target's magic file; for now we bail if the local version does not match -@@ -324,19 +336,22 @@ FILE_COMPILE = $(top_builddir)/src/file$ +@@ -332,19 +344,22 @@ FILE_COMPILE = $(top_builddir)/src/file$ FILE_COMPILE_DEP = $(FILE_COMPILE) endif @@ -235,8 +236,8 @@ +# $(FILE_COMPILE) -C -m magic +# @rm -fr magic --- magic/Makefile.in -+++ magic/Makefile.in 2019-05-27 09:19:14.804321308 +0000 -@@ -278,7 +278,7 @@ top_srcdir = @top_srcdir@ ++++ magic/Makefile.in 2019-12-17 09:40:11.435123643 +0000 +@@ -279,7 +279,7 @@ top_srcdir = @top_srcdir@ MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic MAGIC_FRAGMENT_DIR = $(MAGIC_DIR)/$(MAGIC_FRAGMENT_BASE) @@ -245,7 +246,7 @@ EXTRA_DIST = \ $(MAGIC_DIR)/Header \ $(MAGIC_DIR)/Localstuff \ -@@ -295,7 +295,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \ +@@ -296,7 +296,6 @@ $(MAGIC_FRAGMENT_DIR)/animation \ $(MAGIC_FRAGMENT_DIR)/aout \ $(MAGIC_FRAGMENT_DIR)/apache \ $(MAGIC_FRAGMENT_DIR)/apl \ @@ -253,7 +254,7 @@ $(MAGIC_FRAGMENT_DIR)/application \ $(MAGIC_FRAGMENT_DIR)/applix \ $(MAGIC_FRAGMENT_DIR)/apt \ -@@ -366,7 +365,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \ +@@ -367,7 +366,6 @@ $(MAGIC_FRAGMENT_DIR)/erlang \ $(MAGIC_FRAGMENT_DIR)/espressif \ $(MAGIC_FRAGMENT_DIR)/esri \ $(MAGIC_FRAGMENT_DIR)/fcs \ @@ -261,7 +262,7 @@ $(MAGIC_FRAGMENT_DIR)/finger \ $(MAGIC_FRAGMENT_DIR)/flash \ $(MAGIC_FRAGMENT_DIR)/flif \ -@@ -410,6 +408,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ +@@ -413,6 +411,8 @@ $(MAGIC_FRAGMENT_DIR)/isz \ $(MAGIC_FRAGMENT_DIR)/java \ $(MAGIC_FRAGMENT_DIR)/javascript \ $(MAGIC_FRAGMENT_DIR)/jpeg \ @@ -270,7 +271,7 @@ $(MAGIC_FRAGMENT_DIR)/karma \ $(MAGIC_FRAGMENT_DIR)/kde \ $(MAGIC_FRAGMENT_DIR)/keepass \ -@@ -419,14 +419,12 @@ $(MAGIC_FRAGMENT_DIR)/kml \ +@@ -422,14 +422,12 @@ $(MAGIC_FRAGMENT_DIR)/kml \ $(MAGIC_FRAGMENT_DIR)/lecter \ $(MAGIC_FRAGMENT_DIR)/lex \ $(MAGIC_FRAGMENT_DIR)/lif \ @@ -285,11 +286,12 @@ $(MAGIC_FRAGMENT_DIR)/macos \ $(MAGIC_FRAGMENT_DIR)/magic \ $(MAGIC_FRAGMENT_DIR)/mail.news \ -@@ -450,10 +448,10 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ +@@ -453,11 +451,11 @@ $(MAGIC_FRAGMENT_DIR)/misctools \ $(MAGIC_FRAGMENT_DIR)/mkid \ $(MAGIC_FRAGMENT_DIR)/mlssa \ $(MAGIC_FRAGMENT_DIR)/mmdf \ -$(MAGIC_FRAGMENT_DIR)/modem \ + $(MAGIC_FRAGMENT_DIR)/modulefile \ $(MAGIC_FRAGMENT_DIR)/motorola \ $(MAGIC_FRAGMENT_DIR)/mozilla \ $(MAGIC_FRAGMENT_DIR)/msdos \ @@ -297,7 +299,7 @@ $(MAGIC_FRAGMENT_DIR)/msooxml \ $(MAGIC_FRAGMENT_DIR)/msvc \ $(MAGIC_FRAGMENT_DIR)/msx \ -@@ -506,6 +504,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ +@@ -513,6 +511,8 @@ $(MAGIC_FRAGMENT_DIR)/python \ $(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ @@ -306,7 +308,7 @@ $(MAGIC_FRAGMENT_DIR)/rpi \ $(MAGIC_FRAGMENT_DIR)/rpm \ $(MAGIC_FRAGMENT_DIR)/rpmsg \ -@@ -583,10 +583,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ +@@ -592,10 +592,22 @@ $(MAGIC_FRAGMENT_DIR)/zilog \ $(MAGIC_FRAGMENT_DIR)/zip \ $(MAGIC_FRAGMENT_DIR)/zyxel @@ -330,7 +332,7 @@ # FIXME: Build file natively as well so that it can be used to compile # the target's magic file; for now we bail if the local version does not match @IS_CROSS_COMPILE_TRUE@FILE_COMPILE = file${EXEEXT} -@@ -808,23 +820,25 @@ uninstall-am: uninstall-pkgdataDATA +@@ -820,23 +832,25 @@ uninstall-am: uninstall-pkgdataDATA .PRECIOUS: Makefile @@ -373,7 +375,7 @@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- src/Makefile.am -+++ src/Makefile.am 2019-05-27 09:12:24.272056708 +0000 ++++ src/Makefile.am 2019-12-17 09:32:49.711456600 +0000 @@ -1,4 +1,4 @@ -MAGIC = $(pkgdatadir)/magic +MAGIC = $(sysconfdir)/magic:$(pkgdatadir)/magic @@ -381,7 +383,7 @@ nodist_include_HEADERS = magic.h --- src/dcore.c -+++ src/dcore.c 2019-05-27 09:12:24.272056708 +0000 ++++ src/dcore.c 2019-12-17 09:32:49.711456600 +0000 @@ -0,0 +1,207 @@ +/* + * Show goo about ELF core files diff --git a/file-5.38.tar.gz b/file-5.38.tar.gz new file mode 100644 index 0000000..8b95c30 --- /dev/null +++ b/file-5.38.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:593c2ffc2ab349c5aea0f55fedfe4d681737b6b62376a9b3ad1e77b2cc19fa34 +size 932528 diff --git a/file-5.38.tar.gz.asc b/file-5.38.tar.gz.asc new file mode 100644 index 0000000..914ad30 --- /dev/null +++ b/file-5.38.tar.gz.asc @@ -0,0 +1,6 @@ +-----BEGIN PGP SIGNATURE----- + +iEYEABECAAYFAl34OjcACgkQcREqsWyzOzoVWwCfY69DDEEy9Uf5tQ/Ryr8CFjKu +spYAoIMICtX8ZHca0UxCgha/8NL5PaJa +=xRVg +-----END PGP SIGNATURE----- diff --git a/file-secure_getenv.patch b/file-secure_getenv.patch index bd167a6..743b6fe 100644 --- a/file-secure_getenv.patch +++ b/file-secure_getenv.patch @@ -1,24 +1,24 @@ --- - file-5.35/configure.ac | 2 ++ - file-5.35/src/file.c | 2 +- - file-5.35/src/file.h | 8 ++++++++ - file-5.35/src/magic.c | 10 +++++----- + file-5.38/configure.ac | 2 ++ + file-5.38/src/file.c | 2 +- + file-5.38/src/file.h | 8 ++++++++ + file-5.38/src/magic.c | 10 +++++----- 4 files changed, 16 insertions(+), 6 deletions(-) ---- file-5.35/configure.ac -+++ file-5.35/configure.ac 2018-10-22 07:58:32.773294624 +0000 -@@ -99,6 +99,8 @@ if test "$enable_zlib" != "no"; then +--- file-5.38/configure.ac ++++ file-5.38/configure.ac 2019-12-17 09:29:37.751077718 +0000 +@@ -115,6 +115,8 @@ if test "$enable_xzlib" != "no"; then fi AC_CHECK_TYPE([sig_t],[AC_DEFINE([HAVE_SIG_T],1,[Have sig_t type])],,[#include ]) +AC_CHECK_FUNCS([__secure_getenv secure_getenv]) + dnl Checks for typedefs, structures, and compiler characteristics. - AC_C_CONST AC_TYPE_OFF_T ---- file-5.35/src/file.c -+++ file-5.35/src/file.c 2018-10-22 07:57:43.206223603 +0000 -@@ -649,7 +649,7 @@ docprint(const char *opts, int def) + AC_TYPE_SIZE_T +--- file-5.38/src/file.c ++++ file-5.38/src/file.c 2019-12-17 09:23:55.973524728 +0000 +@@ -647,7 +647,7 @@ docprint(const char *opts, int def) private void help(void) { @@ -27,9 +27,9 @@ (void)fputs( "Usage: file [OPTION...] [FILE...]\n" "Determine type of FILEs.\n" ---- file-5.35/src/file.h -+++ file-5.35/src/file.h 2018-10-22 07:57:43.206223603 +0000 -@@ -649,4 +649,12 @@ static const char *rcsid(const char *p) +--- file-5.38/src/file.h ++++ file-5.38/src/file.h 2019-12-17 09:23:55.977524652 +0000 +@@ -650,4 +650,12 @@ static const char *rcsid(const char *p) #define __RCSID(a) #endif @@ -42,8 +42,8 @@ +#endif + #endif /* __file_h__ */ ---- file-5.35/src/magic.c -+++ file-5.35/src/magic.c 2018-10-22 07:57:43.206223603 +0000 +--- file-5.38/src/magic.c ++++ file-5.38/src/magic.c 2019-12-17 09:23:55.977524652 +0000 @@ -183,7 +183,7 @@ get_default_magic(void) free(default_magic); default_magic = NULL; diff --git a/file-upstream.patch b/file-upstream.patch deleted file mode 100644 index e97c600..0000000 --- a/file-upstream.patch +++ /dev/null @@ -1,31 +0,0 @@ -Detect Android LOKI'd boot bootimgs -buffer_fill: fix double free of `ebuf` on read error (https://bugzilla.redhat.com/1685217) - ---- - magic/Magdir/android | 4 +++- - src/buffer.c | 1 + - 2 files changed, 4 insertions(+), 1 deletion(-) - ---- magic/Magdir/android -+++ magic/Magdir/android 2019-06-11 10:34:41.940646113 +0000 -@@ -19,7 +19,9 @@ - # From https://android.googlesource.com/\ - # platform/system/core/+/master/mkbootimg/bootimg.h - 0 string ANDROID! Android bootimg -->1024 string LOKI\01 \b, LOKI'd -+>1024 string LOKI \b, LOKI'd -+>>1028 lelong 0 \b (boot) -+>>1028 lelong 1 \b (recovery) - >8 lelong >0 \b, kernel - >>12 lelong >0 \b (0x%x) - >16 lelong >0 \b, ramdisk ---- src/buffer.c -+++ src/buffer.c 2019-06-11 10:34:41.940646113 +0000 -@@ -77,6 +77,7 @@ buffer_fill(const struct buffer *bb) - b->eoff = b->st.st_size - b->elen; - if (pread(b->fd, b->ebuf, b->elen, b->eoff) == -1) { - free(b->ebuf); -+ b->ebuf = NULL; - goto out; - } - diff --git a/file.changes b/file.changes index ffb5210..17d2a8a 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,37 @@ +------------------------------------------------------------------- +Tue Dec 17 09:42:55 UTC 2019 - Dr. Werner Fink + +- Update to file version 5.38 + * Always accept -S (no sandbox) even if we don't support sandboxing + * More syscalls elided for sandboxiing + * For ELF dynamic means having an interpreter not just PT_DYNAMIC + * Check for large ELF session header offset + * When saving and restoring a locale, keep the locale name in our + own storage. + * Add a flag to disable CSV file detection. + * Don't pass NULL/0 to memset to appease sanitizers. + * Avoid spurious prints when looks for extensions or apple strings + in fsmagic. + * Add builtin decompressors for xz and and bzip. + * Add a limit for the number of CDF elements. + * More checks for overflow in CDF. +- Removed patches fixed upstream + * CVE-2019-18218-46a8443f.patch + * file-5.15-clear-invalid.patch + * file-upstream.patch +- Modify patches + * file-5.12-zip.dif + * file-5.16-ocloexec.patch + * file-5.17-option.dif + * file-5.19-biorad.dif + * file-5.19-printf.dif + * file-5.19-zip2.0.dif + * file-5.23-endian.patch + * file-5.24-nitpick.dif + * file-5.28-btrfs-image.dif + * file-secure_getenv.patch +- Modify and rename patch file-5.37.dif which becomes now file-5.38.dif + ------------------------------------------------------------------- Tue Oct 22 13:24:26 UTC 2019 - Dr. Werner Fink diff --git a/file.spec b/file.spec index 3537c50..f12ec7e 100644 --- a/file.spec +++ b/file.spec @@ -1,7 +1,7 @@ # # spec file for package file # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,14 +23,14 @@ Name: file BuildRequires: bash >= 4.0 BuildRequires: libtool BuildRequires: zlib-devel -Url: http://www.darwinsys.com/file/ +URL: http://www.darwinsys.com/file/ # bug437293 %ifarch ppc64 Obsoletes: file-64bit %endif # # Set Version also in python-magic.spec -Version: 5.37 +Version: 5.38 Release: 0 Summary: A Tool to Determine File Types License: BSD-2-Clause @@ -40,7 +40,7 @@ Source2: baselibs.conf Source3: file-rpmlintrc Source4: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz.asc Source5: file.keyring -Patch: file-5.37.dif +Patch: file-5.38.dif Patch1: file-5.19-misc.dif Patch4: file-4.24-autoconf.dif Patch5: file-5.14-tex.dif @@ -61,11 +61,8 @@ Patch32: file-5.19-clicfs.dif Patch33: file-5.16-ocloexec.patch Patch34: file-5.23-endian.patch Patch35: file-5.24-nitpick.dif -Patch36: file-5.15-clear-invalid.patch Patch37: file-secure_getenv.patch Patch39: file-5.28-btrfs-image.dif -Patch42: file-upstream.patch -Patch43: CVE-2019-18218-46a8443f.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir /etc %global _miscdir %{_datadir}/misc @@ -129,11 +126,8 @@ to develop applications that require the magic "file" interface. %patch33 -p0 -b .clexe %patch34 -p0 -b .endian %patch35 -p0 -b .nitpick -%patch36 -p1 -b .clear %patch37 -p1 -b .getenv %patch39 -p1 -b .btrfs -%patch42 -p0 -b .tmp -%patch43 -p0 -b .CVE-2019-18218 %patch -b .0 test -s src/magic.h.in || cp -p src/magic.h src/magic.h.in rm -fv src/magic.h diff --git a/python-magic.changes b/python-magic.changes index c5f8472..87e9e7e 100644 --- a/python-magic.changes +++ b/python-magic.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 17 09:59:08 UTC 2019 - Dr. Werner Fink + +- Correct version of file which is now 5.38 + ------------------------------------------------------------------- Mon Oct 14 13:40:13 UTC 2019 - Dr. Werner Fink diff --git a/python-magic.spec b/python-magic.spec index 1ca57ee..637466f 100644 --- a/python-magic.spec +++ b/python-magic.spec @@ -1,7 +1,7 @@ # # spec file for package python-magic # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,8 +26,8 @@ BuildRequires: findutils BuildRequires: libtool BuildRequires: python-rpm-macros BuildRequires: zlib-devel -Url: http://www.darwinsys.com/file/ -Version: 5.37 +URL: http://www.darwinsys.com/file/ +Version: 5.38 Release: 0 Summary: Python module to use libmagic License: BSD-3-Clause AND BSD-4-Clause