Commit a8d694c651356ec89452e15b0189c061fb7e1cf1

Authored by Timo Teras
Committed by David S. Miller
1 parent e918085aaf

af_key: initialize xfrm encap_oa

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -1285,6 +1285,7 @@
1285 1285 ext_hdrs[SADB_X_EXT_NAT_T_DPORT-1];
1286 1286 natt->encap_dport = n_port->sadb_x_nat_t_port_port;
1287 1287 }
  1288 + memset(&natt->encap_oa, 0, sizeof(natt->encap_oa));
1288 1289 }
1289 1290  
1290 1291 err = xfrm_init_state(x);