Prevent off-by-one access to xfrm_dispatch
Subsystems (2)
PATCH 1/2 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 <[email protected]>
include/linux/xfrm.h +2 -1
@@ -140,8 +140,9 @@ 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;
Quoted 4 lines · On Sun, 1 May 2005 20:47:31 +0200 Thomas Graf <[email protected]> wrote:
Makes the type >
XFRM_MSG_MAXcheck behave correctly to protect access toxfrm_dispatch.Signed-off-by Thomas Graf <[email protected]>
Applied, thanks Thomas.