aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorjamal <hadi@cyberus.ca>2010-02-08 22:59:38 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-12 16:27:47 -0500
commitc28e93040b497e895d5c41b54abef3bc8db17fa9 (patch)
tree825a6c41cd26d051a9391a36b61d788c7ef10c69 /net
parentd707204c1fd21ab49242aad17f92f949538e1507 (diff)
xfrm: validate attributes
Some XFRM attributes were not going through basic validation. Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/xfrm/xfrm_user.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index d5a712976004..943c8712bd97 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -2054,6 +2054,10 @@ static const int xfrm_msg_min[XFRM_NR_MSGTYPES] = {
2054#undef XMSGSIZE 2054#undef XMSGSIZE
2055 2055
2056static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = { 2056static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = {
2057 [XFRMA_SA] = { .len = sizeof(struct xfrm_usersa_info)},
2058 [XFRMA_POLICY] = { .len = sizeof(struct xfrm_userpolicy_info)},
2059 [XFRMA_LASTUSED] = { .type = NLA_U64},
2060 [XFRMA_ALG_AUTH_TRUNC] = { .len = sizeof(struct xfrm_algo_auth)},
2057 [XFRMA_ALG_AEAD] = { .len = sizeof(struct xfrm_algo_aead) }, 2061 [XFRMA_ALG_AEAD] = { .len = sizeof(struct xfrm_algo_aead) },
2058 [XFRMA_ALG_AUTH] = { .len = sizeof(struct xfrm_algo) }, 2062 [XFRMA_ALG_AUTH] = { .len = sizeof(struct xfrm_algo) },
2059 [XFRMA_ALG_CRYPT] = { .len = sizeof(struct xfrm_algo) }, 2063 [XFRMA_ALG_CRYPT] = { .len = sizeof(struct xfrm_algo) },