Commit Graph

36 Commits

Author SHA1 Message Date
Patrick Kelsey 1bf4ba1024 Merge upstream fix to eliminate build-breaking gcc warnings of no
importance.

commit: cab33b7a0acba7d2268a23c4383be6167106e549

Update ND_TTEST2 to fix issue 443

Add IS_NOT_NEGATIVE macro.
Avoid these warnings:
- comparison of unsigned expression >= 0 is always true [-Wtype-limits],
- comparison is always true due to limited range of data type [-Wtype-limits].

Approved by: jmallett (mentor)
2015-07-08 21:32:57 +00:00
Patrick Kelsey 7041091186 Vendor import of tcpdump 4.7.4.
Approved by: jmallett (mentor)
2015-07-06 02:16:08 +00:00
Pedro F. Giffuni d3b6650ba6 Upstream fixes for issues found with afl (Issue #417).
- Fix length checking.

Check both the captured length and the on-the-wire length (the latter
*should* be greater than or equal to the former, but that's not
guaranteed).

Add some additional length checks, so neither caplen nor length
underflow.

If we stop dissecting because the packet is too short, return 1, not 0,
as we've "dissected" what we can; 0 means "this is LLC+SNAP with an OUI
of 0 and an unknown Ethertype".

commit:	743bcecdc92f88b118ec7aac4f68b606601205cc

- Clean up length checks.

Check only the amount of length that matters at any given point; yes,
this means we do multiple checks, but so it goes.

We don't need to check for LLC+SNAP - llc_print() does that for us.  We
do, however, need to check to make sure we can safely skip the Fore
header.

commit:	5c65e7532fa16308e01299988852b0dc5b027559
2015-01-31 16:26:21 +00:00
Pedro F. Giffuni aae6b2073a Merge some cherry-picked fixes originating in OpenBSD
Check whether the version field is available before looking at it.
While we're at it, use ND_TCHECK(), rather than a hand-rolled check, to
check whether we have the full fixed-length portion of the IPv4 header.

commit c67afe913011138a2504ec4d3d423b48e73b12f3

Do more length checking. From OpenBSD.

commit d7516761f9c4877bcb05bb6543be3543e165249
2015-01-27 01:39:42 +00:00
Xin LI e91eac2449 Vendor import of tcpdump 4.6.2. 2015-01-06 19:03:11 +00:00
Pedro F. Giffuni 05b21c9adf tcpdump Bring change from upstream.
commit 772d6fbcf592209aa1ab1b61714e8ae72a5b1698
Author: Dmitrij Tejblum <tejblum@yandex-team.ru>
Date:   Sun Jun 2 13:48:44 2013 +0400

    Convert some versions of EXTRACT_{16,32,64}BITS() to inline functions.

    It removes the vast majority of strict-aliasing warnings from GCC.
2013-11-25 18:28:34 +00:00
Xin LI 74c5118c7b Apply vendor commit 654f1b3fc5, this is slight different from
our version as discussed with upstream.
2013-05-31 22:53:44 +00:00
Xin LI f3d019c7d2 Vendor import of tcpdump 4.4.0. 2013-05-30 06:46:26 +00:00
Xin LI 0de8253a2f Vendor import of tcpdump 4.3.0. 2012-10-04 22:40:22 +00:00
Xin LI 60894fde29 Vendor import of tcpdump 4.2.1. 2012-05-14 08:01:48 +00:00
Rui Paulo 6d59e2f382 Update tcpdump to 4.1.1.
Changes:

Thu.    April 1, 2010.  guy@alum.mit.edu.
  Summary for 4.1.1 tcpdump release
        Fix build on systems with PF, such as FreeBSD and OpenBSD.
        Don't blow up if a zero-length link-layer address is passed to
          linkaddr_string().

Thu.    March 11, 2010.  ken@netfunctional.ca/guy@alum.mit.edu.
  Summary for 4.1.0 tcpdump release
        Fix printing of MAC addresses for VLAN frames with a length
          field
        Add some additional bounds checks and use the EXTRACT_ macros
          more
        Add a -b flag to print the AS number in BGP packets in ASDOT
          notation rather than ASPLAIN notation
        Add ICMPv6 RFC 5006 support
        Decode the access flags in NFS access requests
        Handle the new DLT_ for memory-mapped USB captures on Linux
        Make the default snapshot (-s) the maximum
        Print name of device (when -L is used)
        Support for OpenSolaris (and SXCE build 125 and later)
        Print new TCP flags
        Add support for RPL DIO
        Add support for TCP User Timeout (UTO)
        Add support for non-standard Ethertypes used by 3com PPPoE gear
        Add support for 802.11n and 802.11s
        Add support for Transparent Ethernet Bridge ethertype in GRE
        Add 4 byte AS support for BGP printer
        Add support for the MDT SAFI 66 BG printer
        Add basic IPv6 support to print-olsr
        Add USB printer
        Add printer for ForCES
        Handle frames with an FCS
        Handle 802.11n Control Wrapper, Block Acq Req and Block Ack frames
        Fix TCP sequence number printing
        Report 802.2 packets as 802.2 instead of 802.3
        Don't include -L/usr/lib in LDFLAGS
        On x86_64 Linux, look in lib64 directory too
        Lots of code clean ups
        Autoconf clean ups
        Update testcases to make output changes
        Fix compiling with/out smi (--with{,out}-smi)
        Fix compiling without IPv6 support (--disable-ipv6)
2010-10-28 16:23:25 +00:00
Rui Paulo 0ea0e7ad03 Import tcpdump 4.0.0. 2009-03-21 16:23:46 +00:00
Rui Paulo 81ceab7147 Flatten vendor/tcpdump and remove keyword expansion. 2009-03-20 13:27:51 +00:00
Max Laier b5bfcb5d8a Import of tcpdump v3.9.8 2007-10-16 02:20:42 +00:00
Simon L. B. Nielsen faeb38d111 Correct buffer overflow in tcpdump(1).
Security:	FreeBSD-SA-07:06.tcpdump
Security:	CVE-2007-3798
Obtained from:	tcpdump.org
Approved by:	re (security blanket)
2007-08-01 20:40:44 +00:00
Andrew Thompson af20afd05a Pull in latest print-stp.c from vendor 2007-04-04 21:17:33 +00:00
Sam Leffler 2ebc47db5b Import of tcpdump v3.9.4 2006-09-04 20:04:42 +00:00
Sam Leffler 06885fed80 correct check for whether or not md5 signature matches; applied
to vendor branch since this is already in their depot
2005-11-13 19:28:17 +00:00
Sam Leffler f4d0c64a1d Virgin import of tcpdump v3.9.1 (release) from tcpdump.org
Approved by:	re (scottl)
2005-07-11 03:54:22 +00:00
Sam Leffler cc157742d1 Correct several denial-of-service vulnerabilities in tcpdump.
Security:	FreeBSD-SA-05:10.tcpdump
Security:	CAN-2005-1267, CAN-2005-1278, CAN-2005-1279, CAN-2005-1280
Obtained from:	tcpdump.org
2005-06-09 15:42:58 +00:00
Sam Leffler d93a098204 Virgin import of tcpdump v3.9.1 (alpha 096) from tcpdump.org 2005-05-29 18:24:21 +00:00
Sam Leffler 1de50e9f41 Virgin import of tcpdump v3.9.1 (alpha 096) from tcpdump.org 2005-05-29 18:17:16 +00:00
Bruce M Simpson 5b0fe47811 Import tcpdump 3.8.3, from http://www.tcpdump.org/releases/tcpdump-3.8.3.tar.gz 2004-03-31 09:17:26 +00:00
Bill Fenner c76561e4dc Commit vendor update for vulnerabilities found by
Jonathan Heusser <jonny@drugphish.ch>
2004-01-13 17:28:59 +00:00
Bill Fenner b97c9af58a Commit vendor fix for l2tp vulnerability reported by
Przemyslaw Frasunek on bugtraq list.
2004-01-13 17:28:06 +00:00
Bill Fenner 9afd0c2902 Import tcpdump 3.7.2 (fudging for multi-DLT support) from
http://www.tcpdump.org/release/tcpdump-3.7.2.tar.gz
2003-03-02 08:22:26 +00:00
Bill Fenner 0ccd7b511b Commit tcpdump.org's multi-DLT support to vendor branch. 2003-01-26 01:16:33 +00:00
Peter Wemm dc14fb2388 Add in a patch from tcpdump-current (that will be included in the next
import) to stop a segfault on ia64.  Add a #include to get missing
prototypes, particularly malloc().

Approved by: fenner
2003-01-08 22:12:01 +00:00
Bill Fenner a90e161be3 Import tcpdump 3.7.1, from
http://www.tcpdump.org/release/tcpdump-3.7.1.tar.gz
2002-06-21 00:43:23 +00:00
Bill Fenner 39eaefddae Virgin import of tcpdump.org tcpdump v3.6.3 2001-07-23 23:15:13 +00:00
Bill Fenner 7e9c480713 Check in the diff for rev 1.11 of tcpdump.org's print-smb.c
to replace freebsd.org's rev 1.2.
2001-04-04 00:11:06 +00:00
Bill Fenner 685295f4d7 Virgin import of tcpdump.org tcpdump v3.6.2 2001-04-03 07:45:48 +00:00
Bill Fenner b045338223 Virgin import of tcpdump.org tcpdump v3.5 2000-01-30 00:45:58 +00:00
Bill Fenner 4644f044b2 Virgin import of LBL tcpdump v3.4 1998-09-15 19:36:32 +00:00
Bill Fenner 4de76e3137 Virgin import of LBL tcpdump v3.3 1997-05-27 02:11:31 +00:00
Paul Traina 4edb46e9a8 Virgin import of unmodified tcpdump v3.2.1 distribution from LBL.
Obtained from: ftp://ftp.ee.lbl.gov/tcpdump.tar.Z on 19-Aug-1996.
1996-08-19 20:34:12 +00:00