Skip to content

Commit

Permalink
[XFRM]: Prevent off-by-one access to xfrm_dispatch
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Graf authored and David S. Miller committed May 3, 2005
1 parent e4553ed commit 526bdb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 526bdb8

Please sign in to comment.