Skip to content

Commit

Permalink
Bluetooth: bnep: fix information leak to userland
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasiliy Kulikov authored and Gustavo F. Padovan committed Dec 1, 2010
1 parent 127178d commit 5520d20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/bluetooth/bnep/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5520d20

Please sign in to comment.