From: Vasiliy Kulikov Date: Sat, 30 Oct 2010 14:26:26 +0000 (+0400) Subject: Bluetooth: cmtp: fix information leak to userland X-Git-Tag: v2.6.38-rc1~476^2~169^2^2~91^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3185fbd9d7bb166992f072440b3329f58bf2c60a;p=platform%2Fkernel%2Flinux-3.10.git Bluetooth: cmtp: fix information leak to userland Structure cmtp_conninfo is copied to userland with some padding fields unitialized. It leads to leaking of contents of kernel stack memory. Signed-off-by: Vasiliy Kulikov Acked-by: Marcel Holtmann Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c index ec0a134..8e5f292 100644 --- a/net/bluetooth/cmtp/core.c +++ b/net/bluetooth/cmtp/core.c @@ -78,6 +78,7 @@ static void __cmtp_unlink_session(struct cmtp_session *session) static void __cmtp_copy_session(struct cmtp_session *session, struct cmtp_conninfo *ci) { + memset(ci, 0, sizeof(*ci)); bacpy(&ci->bdaddr, &session->bdaddr); ci->flags = session->flags;