aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/xfrm.h
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2005-05-03 17:26:01 -0400
committerDavid S. Miller <davem@davemloft.net>2005-05-03 17:26:01 -0400
commit526bdb80a23b2e10ed4ccc3fcf309c9118d892d6 (patch)
treed1e681c9404a7ce9ab24f14d198b44b316043f6d /include/linux/xfrm.h
parente4553eddae592b948c9695c9a0002169b0cab6fc (diff)
[XFRM]: Prevent off-by-one access to xfrm_dispatch
Makes the type > XFRM_MSG_MAX check behave correctly to protect access to xfrm_dispatch. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/xfrm.h')
-rw-r--r--include/linux/xfrm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h
index f0df02ae68a4..4d19b9e65317 100644
--- a/include/linux/xfrm.h
+++ b/include/linux/xfrm.h
@@ -140,8 +140,9 @@ enum {
140 XFRM_MSG_FLUSHPOLICY, 140 XFRM_MSG_FLUSHPOLICY,
141#define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY 141#define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY
142 142
143 XFRM_MSG_MAX 143 __XFRM_MSG_MAX
144}; 144};
145#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)
145 146
146struct xfrm_user_tmpl { 147struct xfrm_user_tmpl {
147 struct xfrm_id id; 148 struct xfrm_id id;