Skip to content

Commit

Permalink
af_key: initialize xfrm encap_oa
Browse files Browse the repository at this point in the history
Currently encap_oa is left uninitialized, so it contains garbage data which
is visible to userland via Netlink. Initialize it by zeroing it out.

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
fabled authored and davem330 committed Jan 26, 2009
1 parent e918085 commit a8d694c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/key/af_key.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,7 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct net *net,
ext_hdrs[SADB_X_EXT_NAT_T_DPORT-1];
natt->encap_dport = n_port->sadb_x_nat_t_port_port;
}
memset(&natt->encap_oa, 0, sizeof(natt->encap_oa));
}

err = xfrm_init_state(x);
Expand Down

0 comments on commit a8d694c

Please sign in to comment.