From: Vasiliy Kulikov Date: Thu, 10 Feb 2011 17:59:42 +0000 (+0300) Subject: Bluetooth: l2cap: fix 1 byte infoleak to userspace X-Git-Tag: v3.0~349^2~16^2~578^2~196^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e3fb592b15602196d38b225dc78aab8d631a5f89;p=platform%2Fkernel%2Flinux-amlogic.git Bluetooth: l2cap: fix 1 byte infoleak to userspace Structure l2cap_options has one padding byte between max_tx and txwin_size fields. This byte in "opts" is copied to userspace uninitialized. Signed-off-by: Vasiliy Kulikov Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c index adf4169..21f5385 100644 --- a/net/bluetooth/l2cap_sock.c +++ b/net/bluetooth/l2cap_sock.c @@ -392,6 +392,7 @@ static int l2cap_sock_getsockopt_old(struct socket *sock, int optname, char __us switch (optname) { case L2CAP_OPTIONS: + memset(&opts, 0, sizeof(opts)); opts.imtu = l2cap_pi(sk)->imtu; opts.omtu = l2cap_pi(sk)->omtu; opts.flush_to = l2cap_pi(sk)->flush_to;