~ubuntu-branches/ubuntu/hardy/openswan/hardy-updates

« back to all changes in this revision

Viewing changes to debian/openswan-modules-source-build/modules/openswan/linux/include/freeswan/ipsec_ah.h

  • Committer: Bazaar Package Importer
  • Author(s): Rene Mayrhofer
  • Date: 2005-01-27 16:10:11 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050127161011-idgybmyz3vwhpfiq
Tags: 2.3.0-2
Urgency HIGH due to security issue and problems with build-deps in sarge.
* Fix the security issue. Please see
  http://www.idefense.com/application/poi/display?id=190&
      type=vulnerabilities&flashstatus=false
  for more details. Thanks to Martin Schulze for informing me about
  this issue.
  Closes: #292458: Openswan XAUTH/PAM Buffer Overflow Vulnerability
* Added a Build-Dependency to lynx.
  Closes: #291143: openswan: FTBFS: Missing build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Authentication Header declarations
3
 
 * Copyright (C) 1996, 1997  John Ioannidis.
4
 
 * Copyright (C) 1998, 1999, 2000, 2001  Richard Guy Briggs.
5
 
 * 
6
 
 * This program is free software; you can redistribute it and/or modify it
7
 
 * under the terms of the GNU General Public License as published by the
8
 
 * Free Software Foundation; either version 2 of the License, or (at your
9
 
 * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
10
 
 * 
11
 
 * This program is distributed in the hope that it will be useful, but
12
 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
 
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
 
 * for more details.
15
 
 *
16
 
 * RCSID $Id: ipsec_ah.h,v 1.21 2003/12/13 19:10:16 mcr Exp $
17
 
 */
18
 
 
19
 
#include "ipsec_md5h.h"
20
 
#include "ipsec_sha1.h"
21
 
 
22
 
#ifndef IPPROTO_AH
23
 
#define IPPROTO_AH 51
24
 
#endif /* IPPROTO_AH */
25
 
 
26
 
#include "ipsec_auth.h"
27
 
 
28
 
#ifdef __KERNEL__
29
 
 
30
 
extern struct inet_protocol ah_protocol;
31
 
 
32
 
struct options;
33
 
 
34
 
struct ahhdr                            /* Generic AH header */
35
 
{
36
 
        __u8    ah_nh;                  /* Next header (protocol) */
37
 
        __u8    ah_hl;                  /* AH length, in 32-bit words */
38
 
        __u16   ah_rv;                  /* reserved, must be 0 */
39
 
        __u32   ah_spi;                 /* Security Parameters Index */
40
 
        __u32   ah_rpl;                 /* Replay prevention */
41
 
        __u8    ah_data[AHHMAC_HASHLEN];/* Authentication hash */
42
 
};
43
 
#define AH_BASIC_LEN 8      /* basic AH header is 8 bytes, nh,hl,rv,spi
44
 
                             * and the ah_hl, says how many bytes after that
45
 
                             * to cover. */
46
 
 
47
 
extern struct xform_functions ah_xform_funcs[];
48
 
 
49
 
#ifdef CONFIG_IPSEC_DEBUG
50
 
extern int debug_ah;
51
 
#endif /* CONFIG_IPSEC_DEBUG */
52
 
#endif /* __KERNEL__ */
53
 
 
54
 
/*
55
 
 * $Log: ipsec_ah.h,v $
56
 
 * Revision 1.21  2003/12/13 19:10:16  mcr
57
 
 *      refactored rcv and xmit code - same as FS 2.05.
58
 
 *
59
 
 * Revision 1.22  2003/12/11 20:14:58  mcr
60
 
 *      refactored the xmit code, to move all encapsulation
61
 
 *      code into protocol functions. Note that all functions
62
 
 *      are essentially done by a single function, which is probably
63
 
 *      wrong.
64
 
 *      the rcv_functions structures are renamed xform_functions.
65
 
 *
66
 
 * Revision 1.21  2003/12/06 21:21:19  mcr
67
 
 *      split up receive path into per-transform files, for
68
 
 *      easier later removal.
69
 
 *
70
 
 * Revision 1.20  2003/02/06 02:21:34  rgb
71
 
 *
72
 
 * Moved "struct auth_alg" from ipsec_rcv.c to ipsec_ah.h .
73
 
 * Changed "struct ah" to "struct ahhdr" and "struct esp" to "struct esphdr".
74
 
 * Removed "#ifdef INBOUND_POLICY_CHECK_eroute" dead code.
75
 
 *
76
 
 * Revision 1.19  2002/09/16 21:19:13  mcr
77
 
 *      fixes for west-ah-icmp-01 - length of AH header must be
78
 
 *      calculated properly, and next_header field properly copied.
79
 
 *
80
 
 * Revision 1.18  2002/05/14 02:37:02  rgb
81
 
 * Change reference from _TDB to _IPSA.
82
 
 *
83
 
 * Revision 1.17  2002/04/24 07:36:46  mcr
84
 
 * Moved from ./klips/net/ipsec/ipsec_ah.h,v
85
 
 *
86
 
 * Revision 1.16  2002/02/20 01:27:06  rgb
87
 
 * Ditched a pile of structs only used by the old Netlink interface.
88
 
 *
89
 
 * Revision 1.15  2001/12/11 02:35:57  rgb
90
 
 * Change "struct net_device" to "struct device" for 2.2 compatibility.
91
 
 *
92
 
 * Revision 1.14  2001/11/26 09:23:47  rgb
93
 
 * Merge MCR's ipsec_sa, eroute, proc and struct lifetime changes.
94
 
 *
95
 
 * Revision 1.13.2.1  2001/09/25 02:18:24  mcr
96
 
 *      replace "struct device" with "struct netdevice"
97
 
 *
98
 
 * Revision 1.13  2001/06/14 19:35:08  rgb
99
 
 * Update copyright date.
100
 
 *
101
 
 * Revision 1.12  2000/09/12 03:21:20  rgb
102
 
 * Cleared out unused htonq.
103
 
 *
104
 
 * Revision 1.11  2000/09/08 19:12:55  rgb
105
 
 * Change references from DEBUG_IPSEC to CONFIG_IPSEC_DEBUG.
106
 
 *
107
 
 * Revision 1.10  2000/01/21 06:13:10  rgb
108
 
 * Tidied up spacing.
109
 
 * Added macros for HMAC padding magic numbers.(kravietz)
110
 
 *
111
 
 * Revision 1.9  1999/12/07 18:16:23  rgb
112
 
 * Fixed comments at end of #endif lines.
113
 
 *
114
 
 * Revision 1.8  1999/04/11 00:28:56  henry
115
 
 * GPL boilerplate
116
 
 *
117
 
 * Revision 1.7  1999/04/06 04:54:25  rgb
118
 
 * Fix/Add RCSID Id: and Log: bits to make PHMDs happy.  This includes
119
 
 * patch shell fixes.
120
 
 *
121
 
 * Revision 1.6  1999/01/26 02:06:01  rgb
122
 
 * Removed CONFIG_IPSEC_ALGO_SWITCH macro.
123
 
 *
124
 
 * Revision 1.5  1999/01/22 06:17:49  rgb
125
 
 * Updated macro comments.
126
 
 * Added context types to support algorithm switch code.
127
 
 * 64-bit clean-up -- converting 'u long long' to __u64.
128
 
 *
129
 
 * Revision 1.4  1998/07/14 15:54:56  rgb
130
 
 * Add #ifdef __KERNEL__ to protect kernel-only structures.
131
 
 *
132
 
 * Revision 1.3  1998/06/30 18:05:16  rgb
133
 
 * Comment out references to htonq.
134
 
 *
135
 
 * Revision 1.2  1998/06/25 19:33:46  rgb
136
 
 * Add prototype for protocol receive function.
137
 
 * Rearrange for more logical layout.
138
 
 *
139
 
 * Revision 1.1  1998/06/18 21:27:43  henry
140
 
 * move sources from klips/src to klips/net/ipsec, to keep stupid
141
 
 * kernel-build scripts happier in the presence of symlinks
142
 
 *
143
 
 * Revision 1.4  1998/05/18 22:28:43  rgb
144
 
 * Disable key printing facilities from /proc/net/ipsec_*.
145
 
 *
146
 
 * Revision 1.3  1998/04/21 21:29:07  rgb
147
 
 * Rearrange debug switches to change on the fly debug output from user
148
 
 * space.  Only kernel changes checked in at this time.  radij.c was also
149
 
 * changed to temporarily remove buggy debugging code in rj_delete causing
150
 
 * an OOPS and hence, netlink device open errors.
151
 
 *
152
 
 * Revision 1.2  1998/04/12 22:03:17  rgb
153
 
 * Updated ESP-3DES-HMAC-MD5-96,
154
 
 *      ESP-DES-HMAC-MD5-96,
155
 
 *      AH-HMAC-MD5-96,
156
 
 *      AH-HMAC-SHA1-96 since Henry started freeswan cvs repository
157
 
 * from old standards (RFC182[5-9] to new (as of March 1998) drafts.
158
 
 *
159
 
 * Fixed eroute references in /proc/net/ipsec*.
160
 
 *
161
 
 * Started to patch module unloading memory leaks in ipsec_netlink and
162
 
 * radij tree unloading.
163
 
 *
164
 
 * Revision 1.1  1998/04/09 03:05:55  henry
165
 
 * sources moved up from linux/net/ipsec
166
 
 *
167
 
 * Revision 1.1.1.1  1998/04/08 05:35:02  henry
168
 
 * RGB's ipsec-0.8pre2.tar.gz ipsec-0.8
169
 
 *
170
 
 * Revision 0.4  1997/01/15 01:28:15  ji
171
 
 * Added definitions for new AH transforms.
172
 
 *
173
 
 * Revision 0.3  1996/11/20 14:35:48  ji
174
 
 * Minor Cleanup.
175
 
 * Rationalized debugging code.
176
 
 *
177
 
 * Revision 0.2  1996/11/02 00:18:33  ji
178
 
 * First limited release.
179
 
 *
180
 
 *
181
 
 */