aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2011-02-10 12:59:42 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-11 12:21:29 -0500
commite3fb592b15602196d38b225dc78aab8d631a5f89 (patch)
treee105066cfe0e797fe02d47eae396d934d3c23a18 /net/bluetooth/l2cap_sock.c
parent6d1d4ea4a82f8c17a3ff7c2f677bc3d41ea7484b (diff)
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 <segoon@openwall.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index adf41692daf3..21f5385ca24d 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
392 392
393 switch (optname) { 393 switch (optname) {
394 case L2CAP_OPTIONS: 394 case L2CAP_OPTIONS:
395 memset(&opts, 0, sizeof(opts));
395 opts.imtu = l2cap_pi(sk)->imtu; 396 opts.imtu = l2cap_pi(sk)->imtu;
396 opts.omtu = l2cap_pi(sk)->omtu; 397 opts.omtu = l2cap_pi(sk)->omtu;
397 opts.flush_to = l2cap_pi(sk)->flush_to; 398 opts.flush_to = l2cap_pi(sk)->flush_to;