libpcap: update to 1.9.1
authorDENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Sat, 12 Oct 2019 16:28:32 +0000 (00:28 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 12 Oct 2019 21:37:00 +0000 (23:37 +0200)
Fixed CVEs:
CVE-2018-16301
CVE-2019-15161
CVE-2019-15162
CVE-2019-15163
CVE-2019-15164
CVE-2019-15165

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
package/libs/libpcap/Makefile
package/libs/libpcap/patches/100-debian_shared_lib.patch
package/libs/libpcap/patches/102-makefile_disable_manpages.patch
package/libs/libpcap/patches/201-space_optimization.patch
package/libs/libpcap/patches/204-usb-bus-path.patch
package/libs/libpcap/patches/205-pcap-usb-linux.c-add-missing-limits.h.patch [deleted file]

index 0b525d0a89f0cd21eaab82a4d45b9267f1d7a770..fae955a54daf144c94f3dac4c24dfdf8946aea23 100644 (file)
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libpcap
-PKG_VERSION:=1.9.0
-PKG_RELEASE:=2
+PKG_VERSION:=1.9.1
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.us.tcpdump.org/release/ \
         http://www.tcpdump.org/release/
-PKG_HASH:=2edb88808e5913fdaa8e9c1fcaf272e19b2485338742b5074b9fe44d68f37019
+PKG_HASH:=635237637c5b619bcceba91900666b64d56ecb7be63f298f601ec786ce087094
 PKG_FIXUP:=patch-libtool
 
 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
index 9eb38dde7e9cdee3bb53d55f35bd172227d8726d..454490fbfa5dfa6a39dfa1cf56f7cf3953d82ba9 100644 (file)
@@ -21,8 +21,8 @@ build a shared library.
  EXTRA_NETWORK_LIBS=@EXTRA_NETWORK_LIBS@
  
  # Standard CFLAGS for building members of a shared library
--FULL_CFLAGS = $(CCOPT) $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
-+FULL_CFLAGS = $(CCOPT) $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS) $(CPPFLAGS)
+-FULL_CFLAGS = $(CCOPT) @V_LIB_CCOPT_FAT@ $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS)
++FULL_CFLAGS = $(CCOPT) @V_LIB_CCOPT_FAT@ $(SHLIB_CCOPT) $(INCLS) $(DEFS) $(CFLAGS) $(CPPFLAGS)
 +CFLAGS_SHARED = -shared -Wl,-soname,$(SHAREDLIB)
  
  INSTALL = @INSTALL@
@@ -48,7 +48,7 @@ build a shared library.
  PUBHDR = \
        pcap.h \
        pcap-bpf.h \
-@@ -154,7 +167,7 @@ TAGFILES = \
+@@ -155,7 +168,7 @@ TAGFILES = \
  
  CLEANFILES = $(OBJ) libpcap.a libpcap.so.`cat $(srcdir)/VERSION` \
        $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \
@@ -57,7 +57,7 @@ build a shared library.
  
  MAN1 = pcap-config.1
  
-@@ -386,7 +399,7 @@ libpcap.a: $(OBJ)
+@@ -392,7 +405,7 @@ libpcap.a: $(OBJ)
        $(AR) rc $@ $(OBJ) $(ADDLARCHIVEOBJS)
        $(RANLIB) $@
  
@@ -66,7 +66,7 @@ build a shared library.
  
  libpcap.so: $(OBJ)
        @rm -f $@
-@@ -462,6 +475,12 @@ libpcap.shareda: $(OBJ)
+@@ -468,6 +481,12 @@ libpcap.shareda: $(OBJ)
  #
  libpcap.none:
  
@@ -79,7 +79,7 @@ build a shared library.
  scanner.c: $(srcdir)/scanner.l
        $(LEX) -P pcap_ --header-file=scanner.h --nounput -o scanner.c $<
  scanner.h: scanner.c
-@@ -474,6 +493,9 @@ scanner.h: scanner.c
+@@ -480,6 +499,9 @@ scanner.h: scanner.c
  scanner.o: scanner.c grammar.h
        $(CC) $(FULL_CFLAGS) -c scanner.c
  
@@ -89,7 +89,7 @@ build a shared library.
  grammar.c: $(srcdir)/grammar.y
        $(YACC) -p pcap_ -o grammar.c -d $<
  grammar.h: grammar.c
-@@ -486,6 +508,9 @@ grammar.h: grammar.c
+@@ -492,6 +514,9 @@ grammar.h: grammar.c
  grammar.o: grammar.c scanner.h
        $(CC) $(FULL_CFLAGS) -c grammar.c
  
@@ -99,7 +99,7 @@ build a shared library.
  gencode.o: $(srcdir)/gencode.c grammar.h scanner.h
        $(CC) $(FULL_CFLAGS) -c $(srcdir)/gencode.c
  
-@@ -524,6 +549,9 @@ pcap-config: $(srcdir)/pcap-config.in ./
+@@ -539,6 +564,9 @@ pcap-config: $(srcdir)/pcap-config.in ./
        mv $@.tmp $@
        chmod a+x $@
  
@@ -109,7 +109,7 @@ build a shared library.
  #
  # Remote pcap daemon.
  #
-@@ -614,14 +642,11 @@ install: install-shared install-archive
+@@ -632,14 +660,11 @@ install: install-shared install-archive
                    $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@/`echo $$i | sed 's/.manmisc.in/.@MAN_MISC_INFO@/'`; done
  
  install-shared: install-shared-$(DYEXT)
index 60850df801f9c5ba32ec72810b673f7399e01e1d..bd1702be0fad895a5659580825fe9e19a56f8341 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -573,14 +573,6 @@ install: install-shared install-archive
+@@ -588,14 +588,6 @@ install: install-shared install-archive
            (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
        [ -d $(DESTDIR)$(includedir)/pcap ] || \
            (mkdir -p $(DESTDIR)$(includedir)/pcap; chmod 755 $(DESTDIR)$(includedir)/pcap)
@@ -15,7 +15,7 @@
        for i in $(PUBHDR); do \
                $(INSTALL_DATA) $(srcdir)/$$i \
                    $(DESTDIR)$(includedir)/$$i; done
-@@ -590,56 +582,6 @@ install: install-shared install-archive
+@@ -605,59 +597,6 @@ install: install-shared install-archive
        [ -d $(DESTDIR)$(libdir)/pkgconfig ] || \
            (mkdir -p $(DESTDIR)$(libdir)/pkgconfig; chmod 755 $(DESTDIR)$(libdir)/pkgconfig)
        $(INSTALL_DATA) libpcap.pc $(DESTDIR)$(libdir)/pkgconfig/libpcap.pc
@@ -32,6 +32,9 @@
 -      rm -f pcap_datalink_val_to_description.3pcap && \
 -      $(LN_S) pcap_datalink_val_to_name.3pcap \
 -               pcap_datalink_val_to_description.3pcap && \
+-      rm -f pcap_datalink_val_to_description_or_dlt.3pcap && \
+-      $(LN_S) pcap_datalink_val_to_name.3pcap \
+-               pcap_datalink_val_to_description_or_dlt.3pcap && \
 -      rm -f pcap_dump_fopen.3pcap && \
 -      $(LN_S) pcap_dump_open.3pcap pcap_dump_fopen.3pcap && \
 -      rm -f pcap_freealldevs.3pcap && \
index 4bec6148f6d4f472f83078ec5841b3581db0a745..80e3824d825e02e92d736aaee2e8c23e4d011db9 100644 (file)
@@ -1,6 +1,6 @@
 --- a/pcap-common.c
 +++ b/pcap-common.c
-@@ -1524,14 +1524,23 @@ swap_pseudo_headers(int linktype, struct
+@@ -1570,14 +1570,23 @@ swap_pseudo_headers(int linktype, struct
                break;
  
        case DLT_USB_LINUX:
index 48a807e1fdea77c04e3340bed5f811edd24ae34a..0c967a00ba9caebb5d95bf9f3bd14ebc02ab99e4 100644 (file)
@@ -2,7 +2,7 @@ Fix USB bus path; /proc/bus/usb is deprecated.
 
 --- a/pcap-usb-linux.c
 +++ b/pcap-usb-linux.c
-@@ -72,7 +72,7 @@
+@@ -73,7 +73,7 @@
  #define USB_TEXT_DIR_OLD "/sys/kernel/debug/usbmon"
  #define USB_TEXT_DIR "/sys/kernel/debug/usb/usbmon"
  #define SYS_USB_BUS_DIR "/sys/bus/usb/devices"
diff --git a/package/libs/libpcap/patches/205-pcap-usb-linux.c-add-missing-limits.h.patch b/package/libs/libpcap/patches/205-pcap-usb-linux.c-add-missing-limits.h.patch
deleted file mode 100644 (file)
index cae8012..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-From aafa3512b7b742f5e66a5543e41974cc5e7eebfa Mon Sep 17 00:00:00 2001
-From: maxice8 <thinkabit.ukim@gmail.com>
-Date: Sun, 22 Jul 2018 18:54:17 -0300
-Subject: [PATCH] pcap-usb-linux.c: add missing limits.h for musl systems.
-
-fix compilation on musl libc systems like Void Linux and Alpine.
----
- pcap-usb-linux.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c
-index 6f8adf65e..b92c05ea1 100644
---- a/pcap-usb-linux.c
-+++ b/pcap-usb-linux.c
-@@ -50,6 +50,7 @@
- #include <stdlib.h>
- #include <unistd.h>
- #include <fcntl.h>
-+#include <limits.h>
- #include <string.h>
- #include <dirent.h>
- #include <byteswap.h>