Bluetooth: RFCOMM - Fix info leak in getsockopt(BT_SECURITY)
[linux-3.10.git] / net / bluetooth / rfcomm / sock.c
index 7e1e596..64f55ca 100644 (file)
@@ -822,6 +822,7 @@ static int rfcomm_sock_getsockopt(struct socket *sock, int level, int optname, c
                }
 
                sec.level = rfcomm_pi(sk)->sec_level;
+               sec.key_size = 0;
 
                len = min_t(unsigned int, len, sizeof(sec));
                if (copy_to_user(optval, (char *) &sec, len))