Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/file merge conflicts



details:   https://anonhg.NetBSD.org/src/rev/5e632a8b383b
branches:  trunk
changeset: 335311:5e632a8b383b
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 02 21:15:32 2015 +0000

description:
merge conflicts

diffstat:

 external/bsd/file/dist/ChangeLog                |   69 +++
 external/bsd/file/dist/Makefile.in              |    3 +-
 external/bsd/file/dist/configure                |   20 +-
 external/bsd/file/dist/configure.ac             |    2 +-
 external/bsd/file/dist/doc/file.1               |   19 +-
 external/bsd/file/dist/doc/libmagic.3           |   54 ++-
 external/bsd/file/dist/doc/magic.5              |   13 +-
 external/bsd/file/dist/magic/Makefile.am        |    4 +-
 external/bsd/file/dist/magic/Makefile.in        |    4 +-
 external/bsd/file/dist/magic/magdir/filesystems |   41 +-
 external/bsd/file/dist/magic/magdir/pgp         |   56 ++-
 external/bsd/file/dist/src/Makefile.in          |    6 +-
 external/bsd/file/dist/src/apprentice.c         |  365 +++++++++------
 external/bsd/file/dist/src/cdf.c                |   40 +-
 external/bsd/file/dist/src/cdf_time.c           |    5 +-
 external/bsd/file/dist/src/compress.c           |   55 +-
 external/bsd/file/dist/src/encoding.c           |    5 +-
 external/bsd/file/dist/src/file.c               |   66 ++-
 external/bsd/file/dist/src/file.h               |   31 +-
 external/bsd/file/dist/src/fsmagic.c            |    9 +-
 external/bsd/file/dist/src/funcs.c              |   74 +++-
 external/bsd/file/dist/src/magic.c              |   60 ++-
 external/bsd/file/dist/src/print.c              |    6 +-
 external/bsd/file/dist/src/readcdf.c            |   23 +-
 external/bsd/file/dist/src/readelf.c            |  549 ++++++++++++++---------
 external/bsd/file/dist/src/softmagic.c          |  126 +++--
 external/bsd/file/include/config.h              |   15 +-
 external/bsd/file/lib/shlib_version             |    4 +-
 28 files changed, 1193 insertions(+), 531 deletions(-)

diffs (truncated from 3202 to 300 lines):

diff -r ce14857086d2 -r 5e632a8b383b external/bsd/file/dist/ChangeLog
--- a/external/bsd/file/dist/ChangeLog  Fri Jan 02 21:01:12 2015 +0000
+++ b/external/bsd/file/dist/ChangeLog  Fri Jan 02 21:15:32 2015 +0000
@@ -1,3 +1,72 @@
+2015-01-02  15:15  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * release 5.22
+
+2015-01-01  12:01  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * add indirect relative for TIFF/Exif
+
+2014-12-16  18:10  Christos Zoulas <christos%zoulas.com@localhost>
+       
+       * restructure elf note printing to avoid repeated messages
+       * add note limit, suggested by Alexander Cherepanov
+
+2014-12-16  16:53  Christos Zoulas <christos%zoulas.com@localhost>
+       
+       * Bail out on partial pread()'s (Alexander Cherepanov)
+       * Fix incorrect bounds check in file_printable (Alexander Cherepanov)
+
+2014-12-11  20:01  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * PR/405: ignore SIGPIPE from uncompress programs
+       * change printable -> file_printable and use it in
+         more places for safety
+       * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP
+         is present print the interpreter name.
+       
+2014-12-10  20:01  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * release 5.21
+
+2014-11-27  18:40  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * Allow setting more parameters from the command line.
+       * Split name/use and indirect magic recursion limits.
+
+2014-11-27  11:12  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * Adjust ELF parameters and the default recursion
+         level.
+       * Allow setting the recursion level dynamically.
+
+2014-11-24   8:55  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * The following fixes resulted from Thomas Jarosch's fuzzing
+         tests that revealed severe performance issues on pathological
+         input:
+           - limit number of elf program and sections processing
+           - abort elf note processing quickly
+           - reduce the number of recursion levels from 20 to 10
+           - preserve error messages in indirect magic handling
+
+       This is tracked as CVE-2014-8116 and CVE-2014-8117
+
+2014-11-12  10:30  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * fix bogus free in the user buffer case.
+
+2014-11-11  12:35  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * fix out of bounds read for pascal strings
+       * fix memory leak (not freeing the head of each mlist)
+
+2014-11-07  10:25  Christos Zoulas <christos%zoulas.com@localhost>
+
+       * When printing strings from a file, convert them to printable
+         on a byte by byte basis, so that we don't get issues with
+         locale's trying to interpret random byte streams as UTF-8 and
+         having printf error out with EILSEQ.
+         
 2014-10-17  11:48  Christos Zoulas <christos%zoulas.com@localhost>
 
        * fix bounds in note reading (Francisco Alonso / Red Hat)
diff -r ce14857086d2 -r 5e632a8b383b external/bsd/file/dist/Makefile.in
--- a/external/bsd/file/dist/Makefile.in        Fri Jan 02 21:01:12 2015 +0000
+++ b/external/bsd/file/dist/Makefile.in        Fri Jan 02 21:15:32 2015 +0000
@@ -317,7 +317,8 @@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I m4
 EXTRA_DIST = MAINT
-SUBDIRS = src magic doc
+#SUBDIRS = src magic doc
+SUBDIRS = src
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-recursive
 
diff -r ce14857086d2 -r 5e632a8b383b external/bsd/file/dist/configure
--- a/external/bsd/file/dist/configure  Fri Jan 02 21:01:12 2015 +0000
+++ b/external/bsd/file/dist/configure  Fri Jan 02 21:15:32 2015 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for file 5.20.
+# Generated by GNU Autoconf 2.69 for file 5.22.
 #
 # Report bugs to <christos%astron.com@localhost>.
 #
@@ -590,8 +590,8 @@
 # Identity of this package.
 PACKAGE_NAME='file'
 PACKAGE_TARNAME='file'
-PACKAGE_VERSION='5.20'
-PACKAGE_STRING='file 5.20'
+PACKAGE_VERSION='5.22'
+PACKAGE_STRING='file 5.22'
 PACKAGE_BUGREPORT='christos%astron.com@localhost'
 PACKAGE_URL=''
 
@@ -1331,7 +1331,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures file 5.20 to adapt to many kinds of systems.
+\`configure' configures file 5.22 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1401,7 +1401,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of file 5.20:";;
+     short | recursive ) echo "Configuration of file 5.22:";;
    esac
   cat <<\_ACEOF
 
@@ -1514,7 +1514,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-file configure 5.20
+file configure 5.22
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2170,7 +2170,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by file $as_me 5.20, which was
+It was created by file $as_me 5.22, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3036,7 +3036,7 @@
 
 # Define the identity of the package.
  PACKAGE='file'
- VERSION='5.20'
+ VERSION='5.22'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15032,7 +15032,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by file $as_me 5.20, which was
+This file was extended by file $as_me 5.22, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15098,7 +15098,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-file config.status 5.20
+file config.status 5.22
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -r ce14857086d2 -r 5e632a8b383b external/bsd/file/dist/configure.ac
--- a/external/bsd/file/dist/configure.ac       Fri Jan 02 21:01:12 2015 +0000
+++ b/external/bsd/file/dist/configure.ac       Fri Jan 02 21:15:32 2015 +0000
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([file],[5.20],[christos%astron.com@localhost])
+AC_INIT([file],[5.22],[christos%astron.com@localhost])
 AM_INIT_AUTOMAKE([subdir-objects foreign])
 AM_MAINTAINER_MODE(disable)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
diff -r ce14857086d2 -r 5e632a8b383b external/bsd/file/dist/doc/file.1
--- a/external/bsd/file/dist/doc/file.1 Fri Jan 02 21:01:12 2015 +0000
+++ b/external/bsd/file/dist/doc/file.1 Fri Jan 02 21:15:32 2015 +0000
@@ -1,7 +1,7 @@
-.\"    $NetBSD: file.1,v 1.15 2014/10/10 20:15:01 christos Exp $
+.\"    $NetBSD: file.1,v 1.16 2015/01/02 21:15:32 christos Exp $
 .\"
-.\" $File: file.man,v 1.106 2014/03/07 23:11:51 christos Exp $
-.Dd January 30, 2014
+.\" $File: file.man,v 1.111 2014/12/16 23:18:40 christos Exp $
+.Dd December 16, 2014
 .Dt FILE 1
 .Os
 .Sh NAME
@@ -18,6 +18,7 @@
 .Op Fl F Ar separator
 .Op Fl f Ar namefile
 .Op Fl m Ar magicfiles
+.Op Fl P Ar name=value
 .Ar
 .Ek
 .Nm
@@ -26,7 +27,7 @@
 .Nm
 .Op Fl Fl help
 .Sh DESCRIPTION
-This manual page documents version 5.20 of the
+This manual page documents version 5.22 of the
 .Nm
 command.
 .Pp
@@ -305,6 +306,16 @@
 attempt to preserve the access time of files analyzed, to pretend that
 .Nm
 never read them.
+.It Fl P , Fl Fl parameter Ar name=value
+Set various parameter limits.
+.Bl -column "elf_phnum" "Default" "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" -offset indent
+.It Sy "Name" Ta Sy "Default" Ta Sy "Explanation"
+.It Li indir Ta 15 Ta recursion limit for indirect magic
+.It Li name Ta 30 Ta use count limit for name/use magic
+.It Li elf_notes Ta 256 Ta max ELF notes processed
+.It Li elf_phnum Ta 128 Ta max ELF program sections processed
+.It Li elf_shnum Ta 32768 Ta max ELF sections processed
+.El
 .It Fl r , Fl Fl raw
 Don't translate unprintable characters to \eooo.
 Normally
diff -r ce14857086d2 -r 5e632a8b383b external/bsd/file/dist/doc/libmagic.3
--- a/external/bsd/file/dist/doc/libmagic.3     Fri Jan 02 21:01:12 2015 +0000
+++ b/external/bsd/file/dist/doc/libmagic.3     Fri Jan 02 21:15:32 2015 +0000
@@ -1,6 +1,6 @@
-.\"    $NetBSD: libmagic.3,v 1.13 2014/10/10 20:15:01 christos Exp $
+.\"    $NetBSD: libmagic.3,v 1.14 2015/01/02 21:15:32 christos Exp $
 .\"
-.\" $File: libmagic.man,v 1.29 2014/08/04 06:19:44 christos Exp $
+.\" $File: libmagic.man,v 1.34 2014/12/16 23:18:40 christos Exp $
 .\"
 .\" Copyright (c) Christos Zoulas 2003.
 .\" All Rights Reserved.
@@ -27,7 +27,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd August 4, 2014
+.Dd December 16, 2014
 .Dt LIBMAGIC 3
 .Os
 .Sh NAME
@@ -42,6 +42,9 @@
 .Nm magic_compile ,
 .Nm magic_list ,
 .Nm magic_load ,
+.Nm magic_load_buffers ,
+.Nm magic_setparam ,
+.Nm magic_getparam ,
 .Nm magic_version
 .Nd Magic number recognition library
 .Sh LIBRARY
@@ -75,6 +78,10 @@
 .Ft int
 .Fn magic_load_buffers "magic_t cookie" "void **buffers" "size_t *sizes" "size_t nbuffers"
 .Ft int
+.Fn magic_getparam "magic_t cookie" "int param" "void *value"
+.Ft int
+.Fn magic_setparam "magic_t cookie" "int param" "const void *value"
+.Ft int
 .Fn magic_version "void"
 .Sh DESCRIPTION
 These functions
@@ -271,6 +278,47 @@
 database via shared memory or other IPC means.
 .Pp
 The
+.Fn magic_getparam
+and
+.Fn magic_setparam
+allow getting and setting various limits related to the the magic
+library.
+.Bl -column "MAGIC_PARAM_ELF_PHNUM_MAX" "size_t" "Default" -offset indent
+.It Sy "Parameter" Ta Sy "Type" Ta Sy "Default"
+.It Li MAGIC_PARAM_INDIR_MAX Ta size_t Ta 15
+.It Li MAGIC_PARAM_NAME_MAX Ta size_t Ta 30
+.It Li MAGIC_PARAM_ELF_NOTES_MAX Ta size_t Ta 256
+.It Li MAGIC_PARAM_ELF_PHNUM_MAX Ta size_t Ta 128
+.It Li MAGIC_PARAM_ELF_SHNUM_MAX Ta size_t Ta 32768
+.El
+.Pp
+The
+.Dv MAGIC_PARAM_INDIR_RECURSION
+parameter controls how many levels of recursion will be followed for
+indirect magic entries.
+.Pp
+The
+.Dv MAGIC_PARAM_NAME_RECURSION
+parameter controls how many levels of recursion will be followed for



Home | Main Index | Thread Index | Old Index