From owner-p4-projects@FreeBSD.ORG Sun Jul 16 19:48:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA8E116A4E2; Sun, 16 Jul 2006 19:48:21 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 979E416A4DD for ; Sun, 16 Jul 2006 19:48:21 +0000 (UTC) (envelope-from clem1@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4ED9443D6B for ; Sun, 16 Jul 2006 19:48:21 +0000 (GMT) (envelope-from clem1@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6GJmLFS068497 for ; Sun, 16 Jul 2006 19:48:21 GMT (envelope-from clem1@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6GJmLlo068494 for perforce@freebsd.org; Sun, 16 Jul 2006 19:48:21 GMT (envelope-from clem1@FreeBSD.org) Date: Sun, 16 Jul 2006 19:48:21 GMT Message-Id: <200607161948.k6GJmLlo068494@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to clem1@FreeBSD.org using -f From: Clément Lecigne To: Perforce Change Reviews Cc: Subject: PERFORCE change 101715 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jul 2006 19:48:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=101715 Change 101715 by clem1@clem1_ipv6vulns on 2006/07/16 19:47:39 IPComp support for pcs, libnet and isicng. Affected files ... .. //depot/projects/soc2006/clem1_ipv6vulns/fuzzers/isicng/ChangeLog#4 edit .. //depot/projects/soc2006/clem1_ipv6vulns/fuzzers/isicng/Makefile.in#2 edit .. //depot/projects/soc2006/clem1_ipv6vulns/fuzzers/isicng/ipcompsicng.c#1 add .. //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-functions.h#7 edit .. //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-headers.h#6 edit .. //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-structures.h#5 edit .. //depot/projects/soc2006/clem1_ipv6vulns/libnet/src/Makefile.in#4 edit .. //depot/projects/soc2006/clem1_ipv6vulns/libnet/src/libnet_build_ipcomp.c#1 add .. //depot/projects/soc2006/clem1_ipv6vulns/pcs/pcs/packets/ipcomp.py#1 add Differences ... ==== //depot/projects/soc2006/clem1_ipv6vulns/fuzzers/isicng/ChangeLog#4 (text+ko) ==== @@ -1,4 +1,8 @@ -ISICNG (v0.0.3) 06/07/05, by Clément Lecigne (clem1@FreeBSD.org) +ISICNG (v0.01.4) 06/07/16, by Clément Lecigne (clem1@FreeBSD.org) + + o ipcompsicng generates random ipcomp (IPCompression) packets. + +ISICNG (v0.01.3) 06/07/05, by Clément Lecigne (clem1@FreeBSD.org) o randipv6() improvements o -L number of link local random ipv6 addresses (in percent) @@ -7,7 +11,7 @@ will generate a random ipv6 packet as data... especially for *6_ctlinput() functions fuzzing. -ISICNG (v0.0.2) 06/07/04, by Clément Lecigne (clem1@FreeBSD.org) +ISICNG (v0.01.2) 06/07/04, by Clément Lecigne (clem1@FreeBSD.org) o Some new feature added to icmpsicng.c o new parameters related to packet size @@ -17,7 +21,7 @@ o bug fix around checksum calculation. -ISICNG (v0.0.1) 06/07/03, by Clément Lecigne (clem1@FreeBSD.org) +ISICNG (v0.01.1) 06/07/03, by Clément Lecigne (clem1@FreeBSD.org) o Port of all *sic.c to IPv6 isicng.c supports IPv6 and extension headers fuzzing. ==== //depot/projects/soc2006/clem1_ipv6vulns/fuzzers/isicng/Makefile.in#2 (text+ko) ==== @@ -15,7 +15,7 @@ VERSION = 0.01 DEFS += -DVERSION=\"$(VERSION)\" -BINS = isicng tcpsicng udpsicng icmpsicng +BINS = isicng tcpsicng udpsicng icmpsicng ipcompsicng all: $(BINS) @@ -31,6 +31,9 @@ icmpsicng: icmpsicng.c isicng.h gcc -o icmpsicng icmpsicng.c -Wall -W $(CFLAGS) $(DEFS) $(LIBS) $(LDFLAGS) +ipcompsicng: ipcompsicng.c isicng.h + gcc -o ipcompsicng ipcompsicng.c -Wall -W $(CFLAGS) $(DEFS) $(LIBS) $(LDFLAGS) + realclean: distclean distclean: clean rm -f config.cache config.log config.status ==== //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-functions.h#7 (text+ko) ==== @@ -1348,6 +1348,21 @@ u_int32_t payload_s, libnet_t *l, libnet_ptag_t ptag); /** + * Builds an RFC 2393 IP Compression header. + * @param nx next header field + * @param flags reserved for future use + * @param cpi compression parameter index + * @param payload optional payload or NULL + * @param payload_s payload length or 0 + * @param l pointer to a libnet context + * @param ptag protocol tag to modify an existing header, 0 to build a new one + * @return protocol tag value on success, -1 on error + */ +libnet_ptag_t +libnet_build_ipcomp(u_int8_t nx, u_int8_t flags, u_int16_t cpi, +u_int8_t *payload, u_int32_t payload_s, libnet_t *l, libnet_ptag_t ptag); + +/** * Builds an RFC 1035 version 4 DNS header. Additional DNS payload information * should be specified using the payload interface. * @param id DNS packet id ==== //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-headers.h#6 (text+ko) ==== @@ -90,6 +90,7 @@ #define LIBNET_IPSEC_ESP_HDR_H 0x0c /**< IPSEC ESP header: 12 bytes */ #define LIBNET_IPSEC_ESP_FTR_H 0x02 /**< IPSEC ESP footer: 2 bytes */ #define LIBNET_IPSEC_AH_H 0x10 /**< IPSEC AH header: 16 bytes */ +#define LIBNET_IPCOMP_H 0x04 /**< IPCOMP header: 4 bytes */ #define LIBNET_ISL_H 0x1a /**< ISL header: 26 bytes */ #define LIBNET_GRE_H 0x04 /**< GRE header: 4 bytes */ #define LIBNET_GRE_SRE_H 0x04 /**< GRE SRE header: 4 bytes */ @@ -1329,6 +1330,23 @@ /* + * IPCOMP header + * IP Compression porotocol + * Static header size: 4 bytes + * RFC2393 + */ +#ifndef IPPROTO_IPCOMP +#define IPPROTO_IPCOMP 108 +#endif +struct libnet_ipcomp_hdr +{ + u_int8_t nh; /* Next header */ + u_int8_t flags; /* Flags */ + u_int16_t cpi; /* Compression param idex */ +}; + + +/* * ISL header * Cisco Inter-Switch Link * Static header size: 26 bytes ==== //depot/projects/soc2006/clem1_ipv6vulns/libnet/include/libnet/libnet-structures.h#5 (text+ko) ==== @@ -164,6 +164,7 @@ #define LIBNET_PBLOCK_ICMPV6_OPT_PI_H 0x4f /* ICMP6 option prefix information header */ #define LIBNET_PBLOCK_ICMPV6_OPT_RH_H 0x50 /* ICMP6 option redirect header */ #define LIBNET_PBLOCK_ICMPV6_OPT_MTU_H 0x51 /* ICMP6 option MTU header */ +#define LIBNET_PBLOCK_IPCOMP_H 0x52 /* IPCOMP header */ u_int8_t flags; /* control flags */ #define LIBNET_PBLOCK_DO_CHECKSUM 0x01 /* needs a checksum */ libnet_ptag_t ptag; /* protocol block tag */ ==== //depot/projects/soc2006/clem1_ipv6vulns/libnet/src/Makefile.in#4 (text+ko) ==== @@ -130,6 +130,7 @@ libnet_build_igmp.c \ libnet_build_ip.c \ libnet_build_ipsec.c \ + libnet_build_ipcomp.c \ libnet_build_isl.c \ libnet_build_mpls.c \ libnet_build_ntp.c \ @@ -188,7 +189,7 @@ libnet_build_dhcp.$(OBJEXT) libnet_build_dns.$(OBJEXT) \ libnet_build_ethernet.$(OBJEXT) libnet_build_fddi.$(OBJEXT) \ libnet_build_gre.$(OBJEXT) libnet_build_icmpv6.$(OBJEXT) \ - libnet_build_icmpv4.$(OBJEXT) \ + libnet_build_icmpv4.$(OBJEXT) libnet_build_ipcomp.$(OBJEXT) \ libnet_build_igmp.$(OBJEXT) libnet_build_ip.$(OBJEXT) \ libnet_build_ipsec.$(OBJEXT) libnet_build_isl.$(OBJEXT) \ libnet_build_mpls.$(OBJEXT) libnet_build_ntp.$(OBJEXT) \