summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorVasiliy Kulikov <segooon@gmail.com>2010-10-30 18:26:21 +0400
committerGustavo F. Padovan <padovan@profusion.mobi>2010-11-09 02:20:47 -0200
commit0298c5eef78af91a54a11b54fd027d9b79f12f23 (patch)
tree14716560151085c97f00321c636630d71009e99d /net
parent229aebb873e29726b91e076161649cf45154b0bf (diff)
Bluetooth: bnep: fix information leak to userland
Structure bnep_conninfo is copied to userland with the field "device" that has the last elements unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov <segooon@gmail.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/bnep/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index f10b41fb05a0..5868597534e5 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -648,6 +648,7 @@ int bnep_del_connection(struct bnep_conndel_req *req)
static void __bnep_copy_ci(struct bnep_conninfo *ci, struct bnep_session *s)
{
+ memset(ci, 0, sizeof(*ci));
memcpy(ci->dst, s->eh.h_source, ETH_ALEN);
strcpy(ci->device, s->dev->name);
ci->flags = s->flags;