In May through June of 2016 a static analysis was performed on version 3.0.5 of the Cassandra source code. The analysis included an automated analysis using HP Fortify v4.21 SCA and a manual analysis utilizing SciTools Understand v4. The results of that analysis includes the issue below.
Sockets are low level resources that must be explicitly released so subsequent callers will have access to previously used sockets. In the file SSLFactory.java on line 62 a SSL server socket is acquired and eventually returned to the caller on line 69.
If an exception is thrown by any of the code between lines 62 and 69 the socket acquired on line 62 will not be released for subsequent reuse..
SSLFactory.java, lines 59-70:
59 public static SSLServerSocket getServerSocket(EncryptionOptions options, InetAddress address, int port) throws IOException
61 SSLContext ctx = createSSLContext(options, true);
62 SSLServerSocket serverSocket = (SSLServerSocket)ctx.getServerSocketFactory().createServerSocket();
64 String suites = filterCipherSuites(serverSocket.getSupportedCipherSuites(), options.cipher_suites);
68 serverSocket.bind(new InetSocketAddress(address, port), 500);
69 return serverSocket;