diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-07-28 16:04:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-07-30 19:26:16 -0400 |
commit | ff862a4668dd6dba962b1d2d8bd344afa6375683 (patch) | |
tree | d8ee90780d2637297ed02d2c2c22c1dc8c311cc3 /net/key | |
parent | a264b981f2c76e281ef27e7232774bf6c54ec865 (diff) |
af_key: more info leaks in pfkey messages
This is inspired by a5cc68f3d6 "af_key: fix info leaks in notify
messages". There are some struct members which don't get initialized
and could disclose small amounts of private information.
Acked-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/key')
-rw-r--r-- | net/key/af_key.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 9da862070dd8..ab8bd2cabfa0 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -2081,6 +2081,7 @@ static int pfkey_xfrm_policy2msg(struct sk_buff *skb, const struct xfrm_policy * | |||
2081 | pol->sadb_x_policy_type = IPSEC_POLICY_NONE; | 2081 | pol->sadb_x_policy_type = IPSEC_POLICY_NONE; |
2082 | } | 2082 | } |
2083 | pol->sadb_x_policy_dir = dir+1; | 2083 | pol->sadb_x_policy_dir = dir+1; |
2084 | pol->sadb_x_policy_reserved = 0; | ||
2084 | pol->sadb_x_policy_id = xp->index; | 2085 | pol->sadb_x_policy_id = xp->index; |
2085 | pol->sadb_x_policy_priority = xp->priority; | 2086 | pol->sadb_x_policy_priority = xp->priority; |
2086 | 2087 | ||
@@ -3137,7 +3138,9 @@ static int pfkey_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *t, struct | |||
3137 | pol->sadb_x_policy_exttype = SADB_X_EXT_POLICY; | 3138 | pol->sadb_x_policy_exttype = SADB_X_EXT_POLICY; |
3138 | pol->sadb_x_policy_type = IPSEC_POLICY_IPSEC; | 3139 | pol->sadb_x_policy_type = IPSEC_POLICY_IPSEC; |
3139 | pol->sadb_x_policy_dir = XFRM_POLICY_OUT + 1; | 3140 | pol->sadb_x_policy_dir = XFRM_POLICY_OUT + 1; |
3141 | pol->sadb_x_policy_reserved = 0; | ||
3140 | pol->sadb_x_policy_id = xp->index; | 3142 | pol->sadb_x_policy_id = xp->index; |
3143 | pol->sadb_x_policy_priority = xp->priority; | ||
3141 | 3144 | ||
3142 | /* Set sadb_comb's. */ | 3145 | /* Set sadb_comb's. */ |
3143 | if (x->id.proto == IPPROTO_AH) | 3146 | if (x->id.proto == IPPROTO_AH) |
@@ -3525,6 +3528,7 @@ static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, | |||
3525 | pol->sadb_x_policy_exttype = SADB_X_EXT_POLICY; | 3528 | pol->sadb_x_policy_exttype = SADB_X_EXT_POLICY; |
3526 | pol->sadb_x_policy_type = IPSEC_POLICY_IPSEC; | 3529 | pol->sadb_x_policy_type = IPSEC_POLICY_IPSEC; |
3527 | pol->sadb_x_policy_dir = dir + 1; | 3530 | pol->sadb_x_policy_dir = dir + 1; |
3531 | pol->sadb_x_policy_reserved = 0; | ||
3528 | pol->sadb_x_policy_id = 0; | 3532 | pol->sadb_x_policy_id = 0; |
3529 | pol->sadb_x_policy_priority = 0; | 3533 | pol->sadb_x_policy_priority = 0; |
3530 | 3534 | ||