From: Timo Teras <timo.teras@iki.fi>
To: netdev@vger.kernel.org
Cc: Timo Teras <timo.teras@iki.fi>, Herbert Xu <herbert@gondor.apana.org.au>
Subject: [PATCH] af_key: initialize xfrm encap_oa
Date: Fri, 23 Jan 2009 14:30:28 +0200 [thread overview]
Message-ID: <1232713828-6725-1-git-send-email-timo.teras@iki.fi> (raw)
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>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
net/key/af_key.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/key/af_key.c b/net/key/af_key.c
index f8bd8df..7dcbde3 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -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);
--
1.5.6.3
next reply other threads:[~2009-01-23 12:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 12:30 Timo Teras [this message]
2009-01-23 22:11 ` [PATCH] af_key: initialize xfrm encap_oa Herbert Xu
2009-01-26 4:49 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1232713828-6725-1-git-send-email-timo.teras@iki.fi \
--to=timo.teras@iki.fi \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).