Compare commits

...

No commits in common. 'c9' and 'c8' have entirely different histories.
c9 ... c8

2
.gitignore vendored

@ -1 +1 @@
SOURCES/libpcap-1.10.0.tar.gz SOURCES/libpcap-1.9.1.tar.gz

@ -1 +1 @@
3d8c1843ae4ea0d7871c8689b58508406e5743c9 SOURCES/libpcap-1.10.0.tar.gz 04d6e619defad5bb17af15f6d2304e79b649786c SOURCES/libpcap-1.9.1.tar.gz

@ -10,19 +10,18 @@ Both should be run only by root, hence manpages for them should be located in
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcap.3pcap.in b/pcap.3pcap.in diff --git a/pcap.3pcap.in b/pcap.3pcap.in
index 492c227..46a2a4b 100644 index f5a7e0c..f220e68 100644
--- a/pcap.3pcap.in --- a/pcap.3pcap.in
+++ b/pcap.3pcap.in +++ b/pcap.3pcap.in
@@ -1025,8 +1025,8 @@ script or some other configuration script to check whether the libpcap @@ -882,7 +882,7 @@ use an
script or some other configuration script to check whether the libpcap
1.0 APIs are available and use them only if they are. 1.0 APIs are available and use them only if they are.
.SH SEE ALSO .SH SEE ALSO
.BR autoconf (1), -autoconf(1), tcpdump(1), tcpslice(1), pcap-filter(@MAN_MISC_INFO@), pfconfig(8),
-.BR tcpdump (1), +autoconf(1), tcpdump(8), tcpslice(8), pcap-filter(@MAN_MISC_INFO@), pfconfig(8),
-.BR tcpslice (1), usermod(@MAN_ADMIN_COMMANDS@)
+.BR tcpdump (8), .SH AUTHORS
+.BR tcpslice (8), The original authors of libpcap are:
.BR pcap-filter (@MAN_MISC_INFO@),
.BR pfconfig (8),
.BR usermod (@MAN_ADMIN_COMMANDS@)
-- --
1.8.3.1 1.8.3.1

@ -13,7 +13,7 @@ index 900ebbc..58292c3 100644
--- a/pcap-linux.c --- a/pcap-linux.c
+++ b/pcap-linux.c +++ b/pcap-linux.c
@@ -3197,6 +3197,10 @@ activate_new(pcap_t *handle) @@ -3197,6 +3197,10 @@ activate_new(pcap_t *handle)
} handle->linktype = DLT_LINUX_SLL;
} }
+ /* Hack to make things work on s390 ctc interfaces */ + /* Hack to make things work on s390 ctc interfaces */

@ -1,14 +0,0 @@
diff --git a/pcap-linux.c b/pcap-linux.c
index 86ce887..3c09617 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -1599,8 +1599,8 @@ get_if_flags(const char *name, bpf_u_int32 *flags, char *errbuf)
}
}
fclose(fh);
- free(pathstr);
}
+ free(pathstr);
}
#ifdef ETHTOOL_GLINK

@ -0,0 +1,66 @@
From 907070918d5e81a515315b395f334e52589fe0fb Mon Sep 17 00:00:00 2001
From: Guy Harris <guy@alum.mit.edu>
Date: Wed, 18 Dec 2019 15:06:53 -0800
Subject: [PATCH] Check for invalid IPv4 addresses.
This should fix GitHub issue #893.
---
gencode.c | 9 ++++++++-
nametoaddr.c | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/gencode.c b/gencode.c
index bdc35e646..040a55315 100644
--- a/gencode.c
+++ b/gencode.c
@@ -6947,11 +6947,15 @@ gen_mcode(compiler_state_t *cstate, const char *s1, const char *s2,
return (NULL);
nlen = __pcap_atoin(s1, &n);
+ if (nlen < 0)
+ bpf_error(cstate, "invalid IPv4 address '%s'", s1);
/* Promote short ipaddr */
n <<= 32 - nlen;
if (s2 != NULL) {
mlen = __pcap_atoin(s2, &m);
+ if (mlen < 0)
+ bpf_error(cstate, "invalid IPv4 address '%s'", s2);
/* Promote short ipaddr */
m <<= 32 - mlen;
if ((n & ~m) != 0)
@@ -7009,8 +7013,11 @@ gen_ncode(compiler_state_t *cstate, const char *s, bpf_u_int32 v, struct qual q)
vlen = __pcap_atodn(s, &v);
if (vlen == 0)
bpf_error(cstate, "malformed decnet address '%s'", s);
- } else
+ } else {
vlen = __pcap_atoin(s, &v);
+ if (vlen < 0)
+ bpf_error(cstate, "invalid IPv4 address '%s'", s);
+ }
switch (q.addr) {
diff --git a/nametoaddr.c b/nametoaddr.c
index 53070a285..13bf4c683 100644
--- a/nametoaddr.c
+++ b/nametoaddr.c
@@ -674,8 +674,15 @@ __pcap_atoin(const char *s, bpf_u_int32 *addr)
len = 0;
for (;;) {
n = 0;
- while (*s && *s != '.')
+ while (*s && *s != '.') {
+ if (n > 25) {
+ /* The result will be > 255 */
+ return -1;
+ }
n = n * 10 + *s++ - '0';
+ }
+ if (n > 255)
+ return -1;
*addr <<= 8;
*addr |= n & 0xff;
len += 8;

@ -1,29 +1,24 @@
Name: libpcap Name: libpcap
Epoch: 14 Epoch: 14
Version: 1.10.0 Version: 1.9.1
Release: 4%{?dist} Release: 5%{?dist}
Summary: A system-independent interface for user-level packet capture Summary: A system-independent interface for user-level packet capture
License: BSD with advertising License: BSD with advertising
URL: https://www.tcpdump.org/ URL: http://www.tcpdump.org
BuildRequires: make
BuildRequires: bison BuildRequires: bison
BuildRequires: bluez-libs-devel BuildRequires: bluez-libs-devel
BuildRequires: flex BuildRequires: flex
BuildRequires: gcc
BuildRequires: git BuildRequires: git
BuildRequires: glibc-kernheaders >= 2.2.0 BuildRequires: glibc-kernheaders >= 2.2.0
#rdma-core-devel not available on arm
%ifnarch %{arm}
BuildRequires: rdma-core-devel BuildRequires: rdma-core-devel
%endif
Source: https://www.tcpdump.org/release/%{name}-%{version}.tar.gz Source: http://www.tcpdump.org/release/%{name}-%{version}.tar.gz
Patch0001: 0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch Patch0001: 0001-man-tcpdump-and-tcpslice-have-manpages-in-man8.patch
Patch0002: 0002-pcap-config-mitigate-multilib-conflict.patch Patch0002: 0002-pcap-config-mitigate-multilib-conflict.patch
Patch0003: 0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch Patch0003: 0003-pcap-linux-apparently-ctc-interfaces-on-s390-has-eth.patch
Patch0004: 0004-covscan-rhel9.patch Patch0004: 0004-invalid-IPv4-address.patch
%description %description
Libpcap provides a portable framework for low-level network Libpcap provides a portable framework for low-level network
@ -39,7 +34,7 @@ on your network.
%package devel %package devel
Summary: Libraries and header files for the libpcap library Summary: Libraries and header files for the libpcap library
Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name} = %{epoch}:%{version}-%{release}
%description devel %description devel
Libpcap provides a portable framework for low-level network Libpcap provides a portable framework for low-level network
@ -63,26 +58,24 @@ sed -i -e 's|-fpic|-fPIC|g' configure
%build %build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%ifarch %{arm}
%configure
%else
%configure --enable-rdma %configure --enable-rdma
%endif make %{?_smp_mflags}
%make_build
%install %install
%make_install make DESTDIR=$RPM_BUILD_ROOT install
rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a
%ldconfig_scriptlets %ldconfig_scriptlets
%files %files
%defattr(-,root,root)
%license LICENSE %license LICENSE
%doc README.md CHANGES CREDITS %doc README.md CHANGES CREDITS
%{_libdir}/libpcap.so.* %{_libdir}/libpcap.so.*
%{_mandir}/man7/pcap*.7* %{_mandir}/man7/pcap*.7*
%files devel %files devel
%defattr(-,root,root)
%{_bindir}/pcap-config %{_bindir}/pcap-config
%{_includedir}/pcap*.h %{_includedir}/pcap*.h
%{_includedir}/pcap %{_includedir}/pcap
@ -93,63 +86,36 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libpcap.a
%{_mandir}/man5/pcap*.5* %{_mandir}/man5/pcap*.5*
%changelog %changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 14:1.10.0-4 * Mon Jan 18 2021 Michal Ruprich <mruprich@redhat.com> - 14:1.9.1-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags - Resolves: #1743650 - Enable inbox support for sniffing offloaded RDMA traffic with tcpdump
Related: rhbz#1991688
* Mon Jul 26 2021 Michal Ruprich <mruprich@redhat.com> - 14:1.10.0-3
- Resolves: #1938778 - review of important potential issues detected by static analyzers in libpcap
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 14:1.10.0-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Feb 11 2021 Michal Ruprich <mruprich@redhat.com> - 14:1.10.0-1
- New version 1.10.0
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Oct 12 2020 Michal Ruprich <mruprich@redhat.com> - 14:1.9.1-6 * Fri May 22 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-4
- Using make macros - Related: #1806422 - Building libpcap to side-tag for tcpdump
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.1-5 * Fri May 22 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - Related: #1743650 - reverting rdma changes due to unresolved dependency loop
* Fri May 15 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-4 * Wed May 06 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-2
- Enabling rdma support in libpcap - Related: #1806422 - Building libpcap to side-tag for tcpdump
* Mon Feb 24 2020 Michal Ruprich <mruprich@redhat.com> - 14:1.9.1-3 * Thu Apr 09 2020 Michal Ruprich <michalruprich@gmail.com> - 14:1.9.1-1
- libpcap should print an error on wrong IPv4 address - Resolves: #1806422 - rebase libpcap to version 1.9.1
- Resolves: #1743650 - [RFE] enable inbox support for sniffing offloaded (RDMA) traffic with tcpdump
- Resolves: #1785330 - Invalid IPv4 addresses are accepted without reporting even a warning
- Resolves: #1792208 - Resource exhaustion while PHB header length validation
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.1-2 * Wed Jul 03 2019 Michal Ruprich <mruprich@redhat.com> - 14:1.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Resolves: #1708397 - Move libpcap.pc to libpcap-devel
- Removing obsolete group tag
* Fri Oct 11 2019 Michal Ruprich <mruprich@redhat.com> - 14:1.9.1-1 * Wed May 22 2019 Michal Ruprich <mruprich@redhat.com> - 14:1.9.0-2
- New version 1.9.1 - Resolves: #1680929 - libpcap changes blocked until gating tests are added
- Fix for CVE-2018-16301, CVE-2019-15161, CVE-2019-15162, CVE-2019-15163, CVE-2019-15164, CVE-2019-15165
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.9.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Aug 13 2018 Peter Robinson <pbrobinson@fedoraproject.org> 14:1.9.0-2
- pkgconfig file belong in devel package
- drop obsolete group in spec
* Wed Aug 01 2018 Michal Ruprich <mruprich@redhat.com> - 14:1.9.0-1 * Wed Aug 01 2018 Michal Ruprich <mruprich@redhat.com> - 14:1.9.0-1
- New version 1.9.0 - New version 1.9.0
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.8.1-11 * Thu Jun 07 2018 Michal Ruprich <mruprich@redhat.com> - 14:1.8.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - Adding support for AF_VSOCK (rhbz#1587833)
* Wed Jun 06 2018 Michal Ruprich <mruprich@redhat.com> - 14:1.8.1-10
- Adding support for AF_VSOCK
* Tue Feb 20 2018 Martin Sehnoutka <msehnout@redhat.com> - 14:1.8.1-9
- Add gcc to BuildRequires
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.8.1-8 * Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 14:1.8.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

Loading…
Cancel
Save