summaryrefslogtreecommitdiffstats
path: root/include/linux/xfrm.h
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2005-05-03 14:26:01 -0700
committerDavid S. Miller <davem@davemloft.net>2005-05-03 14:26:01 -0700
commit526bdb80a23b2e10ed4ccc3fcf309c9118d892d6 (patch)
treed1e681c9404a7ce9ab24f14d198b44b316043f6d /include/linux/xfrm.h
parente4553eddae592b948c9695c9a0002169b0cab6fc (diff)
downloadlinux-526bdb80a23b2e10ed4ccc3fcf309c9118d892d6.tar.gz
linux-526bdb80a23b2e10ed4ccc3fcf309c9118d892d6.tar.bz2
linux-526bdb80a23b2e10ed4ccc3fcf309c9118d892d6.zip
[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 {
XFRM_MSG_FLUSHPOLICY,
#define XFRM_MSG_FLUSHPOLICY XFRM_MSG_FLUSHPOLICY
- XFRM_MSG_MAX
+ __XFRM_MSG_MAX
};
+#define XFRM_MSG_MAX (__XFRM_MSG_MAX - 1)
struct xfrm_user_tmpl {
struct xfrm_id id;