diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-06-26 23:52:30 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-28 16:18:35 -0700 |
commit | 3a35ccb6009ad66aa21f821a3c99ca0374b59a28 (patch) | |
tree | 2d9fa3a09595d05e33bbf11acb93142671164531 | |
parent | 7a4957b92965755a246b52c4721a6c9a47f5bf31 (diff) | |
download | kernel_samsung_espresso10-3a35ccb6009ad66aa21f821a3c99ca0374b59a28.zip kernel_samsung_espresso10-3a35ccb6009ad66aa21f821a3c99ca0374b59a28.tar.gz kernel_samsung_espresso10-3a35ccb6009ad66aa21f821a3c99ca0374b59a28.tar.bz2 |
af_key: fix info leaks in notify messages
[ Upstream commit a5cc68f3d63306d0d288f31edfc2ae6ef8ecd887 ]
key_notify_sa_flush() and key_notify_policy_flush() miss to initialize
the sadb_msg_reserved member of the broadcasted message and thereby
leak 2 bytes of heap memory to listeners. Fix that.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | net/key/af_key.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 8f92cf8..01eb92c 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -1705,6 +1705,7 @@ static int key_notify_sa_flush(const struct km_event *c) hdr->sadb_msg_version = PF_KEY_V2; hdr->sadb_msg_errno = (uint8_t) 0; hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); + hdr->sadb_msg_reserved = 0; pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net); @@ -2686,6 +2687,7 @@ static int key_notify_policy_flush(const struct km_event *c) hdr->sadb_msg_version = PF_KEY_V2; hdr->sadb_msg_errno = (uint8_t) 0; hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); + hdr->sadb_msg_reserved = 0; pfkey_broadcast(skb_out, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net); return 0; |