mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 16:41:25 +00:00
[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>
This commit is contained in:
parent
e4553eddae
commit
526bdb80a2
1 changed files with 2 additions and 1 deletions
|
@ -140,8 +140,9 @@ enum {
|
||||||
XFRM_MSG_FLUSHPOLICY,
|
XFRM_MSG_FLUSHPOLICY,
|
||||||
#define XFRM_MSG_FLUSHPOLICY 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_user_tmpl {
|
||||||
struct xfrm_id id;
|
struct xfrm_id id;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue