diff options
author | Vasiliy Kulikov <segooon@gmail.com> | 2010-10-30 10:26:21 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-12-01 18:04:35 -0500 |
commit | 5520d20f68310fc158dcbbecfd5eac5cdfc5a241 (patch) | |
tree | 05b0f420d0634bd98e80ed58618e9b03917e08a1 /net/bluetooth | |
parent | 127178d24c7eb2df53b1ba2b6f6f743e88178a1b (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/bluetooth')
-rw-r--r-- | net/bluetooth/bnep/core.c | 1 |
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) | |||
648 | 648 | ||
649 | static void __bnep_copy_ci(struct bnep_conninfo *ci, struct bnep_session *s) | 649 | static void __bnep_copy_ci(struct bnep_conninfo *ci, struct bnep_session *s) |
650 | { | 650 | { |
651 | memset(ci, 0, sizeof(*ci)); | ||
651 | memcpy(ci->dst, s->eh.h_source, ETH_ALEN); | 652 | memcpy(ci->dst, s->eh.h_source, ETH_ALEN); |
652 | strcpy(ci->device, s->dev->name); | 653 | strcpy(ci->device, s->dev->name); |
653 | ci->flags = s->flags; | 654 | ci->flags = s->flags; |