hannes [Mon, 25 Apr 2005 09:16:35 +0000 (09:16 +0000)]
bugfix: do not attempt to decode zero-length TLVs, only attempt to decode IS-REACH (varlength) TLVs if the TLV length indicates that there is at least a single byte on the wire
guy [Fri, 27 Aug 2004 07:19:55 +0000 (07:19 +0000)]
From Andrew Church <[email protected]>: when testing for
"pcap_version", "pcap_debug", and "yydebug", don't add our own functions
referring to those variables - GCC 3.4.1 optimizes the test code out
before the link is done, as it's in a function that's not called.
guy [Fri, 27 Aug 2004 03:56:21 +0000 (03:56 +0000)]
Use %u to print unsigned quantities.
Check, and use, the supplied packet length in the PPPoE dissector. (It
reflects the actual packet length; snapend reflects the captured packet
length.)
As we're now doing bounds checks with TCHECK, the loop over the tagged
fields doesn't have to check against snapend.
guy [Wed, 28 Jul 2004 20:11:31 +0000 (20:11 +0000)]
Propagate from the main branch
revision 1.117
date: 2004/07/15 00:13:01; author: guy; state: Exp; lines: +3 -3
"sizeof()" could be "unsigned long" or "unsigned int"; cast it to
"unsigned long" and print it with "%lu", so it works in either case,
regardless of whether "long" is the same size as "int" or not.
hannes [Tue, 13 Jul 2004 16:00:25 +0000 (16:00 +0000)]
from Darren Reed <[email protected]>:
catch the self-set null pointer if handle_ctrl_proto()
stumbles across an unknown control-proto for which we
have no specific options decoder;
guy [Wed, 16 Jun 2004 00:16:48 +0000 (00:16 +0000)]
Propagate from the main branch:
revision 1.33
date: 2004/06/16 00:12:35; author: guy; state: Exp; lines: +29 -4
From Shinsuke Suzuki <[email protected]>: a patch to support some DHCPv6
options. It includes the following two features:
- decode the names of all the DHCPv6 Options defined in
RFC3315
- support DHCPv6-Lifetime option, as defined in
draft-ietf-dhc-lifetime-00.txt
Note that the latter doesn't have an official DHCPv6 type number, so
it's subject to change.
----------------------------
revision 1.32
date: 2004/01/21 03:53:08; author: itojun; state: Exp; lines: +8 -11
use official assigned numbers for DHCPv6 prefix delegation options.
suz@kame
guy [Wed, 16 Jun 2004 00:07:31 +0000 (00:07 +0000)]
From Shinsuke Suzuki <[email protected]>: a patch to sync ICMPv6-Type number
with the current IANA assignment (Apr 13 2004). It consists of the
following four parts:
- added inverse-neighbor-discovery (RFC3122)
- shift MTRACE-related type numbers, since it collides
with inverse-neighbor-discovery.
- added MLDv2 (draft-vida-mld-v2-08.txt)
- shifted Mobile-IPv6 numbers from interim value to the
official one. (draft-ietf-mobile-ipv6-24.txt)
guy [Thu, 22 Apr 2004 19:07:10 +0000 (19:07 +0000)]
Propagate to the x.8 branch
revision 1.175
date: 2004/01/31 05:26:51; author: guy; state: Exp; lines: +6 -6
AC_LIBOBJ takes the name of an object file without the extension (as the
extension is platform-dependent).
Fixed a bug that caused "windump" with no parameters not to display the
adapter name correctly on win32.
Modified some code so that windump retrieves the winpcap lib version
with "pcap_lib_version()" on win32.
Upgraded the Wpcap_version string to 3.1.
guy [Fri, 2 Apr 2004 06:53:51 +0000 (06:53 +0000)]
Make the "addr_len" variable a "u_int", as we pass a pointer to it to a
routine that expects a "u_int *", and we never use it in a way that
requires it to be signed.
guy [Fri, 2 Apr 2004 06:49:25 +0000 (06:49 +0000)]
Save the host-byte-order values for the rule number and sub rule number
in variables; this means we put them in host byte order only once, and
also gets rid of some "int format, long int argument" warnings.
fenner [Sun, 28 Mar 2004 21:01:41 +0000 (21:01 +0000)]
If libpcap has pcap_findalldevs, make sure that pcap.h has pcap_if_t.
Certain paths of upgrades for MacOS X can result in inconsistent library
and header.
Use correct prerequisites when checking for <netinet/if_ether.h>
Require autoconf 2.50 for AC_CHECK_TYPES.
fenner [Sun, 28 Mar 2004 20:54:00 +0000 (20:54 +0000)]
Rewrite bitstring truncation check; it would incorrectly trigger
on a query like
IP 127.0.0.1.49859 > 127.0.0.1.53: 13041+ PTR? \[xdead000000000000000000000000beef/128].ip6.arpa. (44)
guy [Wed, 24 Mar 2004 04:14:31 +0000 (04:14 +0000)]
"getname()" is not always passed a pointer to packet data, so it cannot
take responsibility for checking whether that data is present in the
packet; the callers must do so. Having checked in a number of changes
to make the callers do so (which fixes some other potential problems as
well!), we remove the change to do the check in "getname()".
guy [Fri, 12 Mar 2004 02:18:30 +0000 (02:18 +0000)]
From Bill Fenner: add checks to make sure we don't run past the end of
the captured data in the packet.
Have "rawprint()" return a success-or-failure indication and have its
callers (if they don't know that it can't fail) print a truncation
indication if it fails.
guy [Fri, 12 Mar 2004 01:27:27 +0000 (01:27 +0000)]
Pass the length from the payload header to the print routines for
various payload types. Use that in those routines rather than getting
the length ourselves (which fixes a case where we were getting it
incorrectly, forgetting to "ntohs()" it).
In "isakmp_id_print()", if the item length is less than the size of the
fixed-length portion of the payload, don't subtract the latter from the
former and use it as the length of the variable-length portion, just set
the length in question to 0.
hannes [Tue, 2 Mar 2004 07:45:13 +0000 (07:45 +0000)]
From: alex medvedev <[email protected]>
catch a segfault:
option 81 min size should be 4 bytes:
http://sunsite.uakom.sk/doc/rfc/bootp-dhcp-option-81
hannes [Wed, 18 Feb 2004 15:13:04 +0000 (15:13 +0000)]
security patch from jonathan heusser:
addrtoname.c:getname() does not check its argument. Assuming the
argument is e.g. NULL
and the function is called leads to a segmentation fault in memcpy().
Which is problematic since it is heavily used, either as getname() or
ipaddr_string().
guy [Tue, 27 Jan 2004 23:39:38 +0000 (23:39 +0000)]
Propagate from the main branch
revision 1.9
date: 2004/01/27 23:36:59; author: guy; state: Exp; lines: +2 -3
Remove "bpf_dump.o" from the list of things to build - "bpf_dump()" now
comes with libpcap.
Remove "print-netbios.o" from the list of things to build - it's not
used any more.
Add "oui.o" to the list of things to build - it *is* used.
Remove a backslash from the last entry in the list of things to build.
revision 1.8
date: 2004/01/26 14:29:15; author: risso; state: Exp; lines: +3 -1
Added some missing files in order to correctly compile under Cygnus
guy [Mon, 26 Jan 2004 01:42:17 +0000 (01:42 +0000)]
Adapted from a more extensive change from Chris Cogdon
<[email protected]>: check whether the file number for "-C" is too large
to fit in the buffer we allocated for the file name.
Close the current capture file before trying to allocate the buffer for
the new file's name, so that if that allocation fails we've at least
written out all of the previous file.
hannes [Fri, 16 Jan 2004 10:07:20 +0000 (10:07 +0000)]
- bugfix: rework the AS_PATH decoder per draft-ietf-idr-rfc3065bis:
CONFED_AS_SET and CONFED_AS_SEQUENCE codepoints have changed;
- rework the SEQ and SET display output in accordance with contemporary
routing software
( AS ) indicates an CONFED AS SEQUENCE segment
{ AS } indicates an AS SET segment
({ AS }) indicates an CONFED AS SET segment
guy [Wed, 7 Jan 2004 22:51:34 +0000 (22:51 +0000)]
Note that Mac OS X, as one of the BSDs, has SIGINFO; note that
Digital/Tru64 UNIX has it as well (although the tty(7) man page doesn't
mention VSTATUS - stty(1) mentions "status", however, and signal(4)
mentions SIGINFO, and some Tru64->HP-UX transition pages mention SIGINFO
as a feature available in Tru64 but not HP-UX).
Note that on some systems (e.g., Mac OS X), you might have to set your
"status" character as it defaults, on those systems, to "not set".
Get rid of the reference to "traffic(1C)" (it's not referred to in the
man page, and about the only connection it has with tcpdump is that they
both watch network traffic; traffic(1C) is a SunOS 4.x-ism, not present
on other platforms), and add a reference to pfconfig(8) for
Digital/Tru64 (it *is* referred to, in the section of what privileges
you need in order to capture traffic).
The first critical piece of code is found in print-isakmp.c:332. The
function rawprint() does not check its arguments thus it's easy for
an attacker to pass a big 'len' or a bogus 'loc' leading to a
segmentation fault in the for loop.
The second bug is located in print-radius.c:471. The for loop of
print_attr_string() is written in an unsafe manner. 'length'
and 'data' should be checked.
hannes [Mon, 29 Dec 2003 22:42:20 +0000 (22:42 +0000)]
- pass on ident string to hex_print()
- pass on ident string to ascii_print()
- pave the way for eliminating print_unknown_data()
and subsequent hex_print() replacement
- clean up the default_print() related functions:
- call always into print_ascii() b/c just hexdump data
is uninteresting; hex-offsets plus ascii representation
is what most people are looking for
- remove default_print_unaligned() as it is now obsolete