Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/tcpdump.git#559dee7973e27f79998d20bb5836a2298a15300f
This commit is contained in:
DistroBaker 2020-11-27 11:21:24 +00:00
parent 003dfc75b3
commit b83252710a
4 changed files with 88 additions and 3 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

63
0013-CVE-2020-8037.patch Normal file
View File

@ -0,0 +1,63 @@
From 32027e199368dad9508965aae8cd8de5b6ab5231 Mon Sep 17 00:00:00 2001
From: Guy Harris <guy@alum.mit.edu>
Date: Sat, 18 Apr 2020 14:04:59 -0700
Subject: [PATCH] PPP: When un-escaping, don't allocate a too-large buffer.
The buffer should be big enough to hold the captured data, but it
doesn't need to be big enough to hold the entire on-the-network packet,
if we haven't captured all of it.
(backported from commit e4add0b010ed6f2180dcb05a13026242ed935334)
---
print-ppp.c | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/print-ppp.c b/print-ppp.c
index 891761728..33fb03412 100644
--- a/print-ppp.c
+++ b/print-ppp.c
@@ -1367,19 +1367,29 @@ print_bacp_config_options(netdissect_options *ndo,
return 0;
}
+/*
+ * Un-escape RFC 1662 PPP in HDLC-like framing, with octet escapes.
+ * The length argument is the on-the-wire length, not the captured
+ * length; we can only un-escape the captured part.
+ */
static void
ppp_hdlc(netdissect_options *ndo,
const u_char *p, int length)
{
+ u_int caplen = ndo->ndo_snapend - p;
u_char *b, *t, c;
const u_char *s;
- int i, proto;
+ u_int i;
+ int proto;
const void *se;
+ if (caplen == 0)
+ return;
+
if (length <= 0)
return;
- b = (u_char *)malloc(length);
+ b = (u_char *)malloc(caplen);
if (b == NULL)
return;
@@ -1388,10 +1398,10 @@ ppp_hdlc(netdissect_options *ndo,
* Do this so that we dont overwrite the original packet
* contents.
*/
- for (s = p, t = b, i = length; i > 0 && ND_TTEST(*s); i--) {
+ for (s = p, t = b, i = caplen; i != 0; i--) {
c = *s++;
if (c == 0x7d) {
- if (i <= 1 || !ND_TTEST(*s))
+ if (i <= 1)
break;
i--;
c = *s++ ^ 0x20;

13
ci.fmf Normal file
View File

@ -0,0 +1,13 @@
/test:
summary:
CI plan, picks Tier1 tests, runs in beakerlib.
description:
This special plan has to be named ci.fmf to run in CI.
It selects test which have 'tier 1' in their main.fmf file
discover:
- name: tier1
how: fmf
filter: 'tier: 1'
repository: "https://src.fedoraproject.org/tests/tcpdump.git"
execute:
how: beakerlib

View File

@ -2,7 +2,7 @@ Summary: A network traffic monitoring tool
Name: tcpdump
Epoch: 14
Version: 4.9.3
Release: 4%{?dist}
Release: 6%{?dist}
License: BSD with advertising
URL: http://www.tcpdump.org
Requires(pre): shadow-utils
@ -21,6 +21,7 @@ Patch0007: 0007-Introduce-nn-option.patch
Patch0009: 0009-Change-n-flag-to-nn-in-TESTonce.patch
Patch0011: 0011-Evp-cipher-buffers.patch
Patch0012: 0012-Add-printing-support-for-vsockmon-devices.patch
Patch0013: 0013-CVE-2020-8037.patch
%define tcpslice_dir tcpslice-1.2a3
@ -42,11 +43,11 @@ pushd %{tcpslice_dir}
# update config.{guess,sub}
automake -a -f 2> /dev/null || :
%configure
make %{?_smp_mflags}
%{make_build}
popd
%configure --with-crypto --with-user=tcpdump --without-smi
make %{?_smp_mflags}
%{make_build}
%check
make check
@ -85,6 +86,13 @@ exit 0
%{_mandir}/man8/tcpdump.8*
%changelog
* Thu Nov 26 2020 Michal Ruprich <mruprich@redhat.com> - 14:4.9.3-6
- Fix for CVE-2020-8037
* Thu Nov 19 2020 Michal Ruprich <mruprich@redhat.com> - 14:4.9.3-5
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 14:4.9.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild