Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-12334 HP Fortify Analysis
  3. CASSANDRA-12326

Use of getByAddress() to retrieve InetAddress object

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Normal
    • Resolution: Unresolved
    • None
    • Legacy/Coordination
    • None

    Description

      Overview:
      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.

      Issue:
      There are four places in the Cassandra source code that rely upon a call to getByAddress() to retrieve an InetAddress object. The information returned by getByAddress() is not trustworthy. Attackers can spoof DNS entries and depending on getByAddress alone invites DNS spoofing attacks.

      The four places in the Cassandra source code where getByAddress() is used:
      MutationVerbHandler.java Line 58
      CompactEndpointSerializationHelper.java Line 38
      InetAddressSerializer.java Line 38, 58

      MutationVerbHandler.java, lines 49-59:

      49 if (from == null)
      50 {
      51     replyTo = message.from;
      52     byte[] forwardBytes = message.parameters.get(Mutation.FORWARD_TO);
      53     if (forwardBytes != null)
      54         forwardToLocalNodes(message.payload, message.verb, forwardBytes, message.from);
      55 }
      56 else
      57 {
      58     replyTo = InetAddress.getByAddress(from);
      59 }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            EdAInWestOC Eduardo Aguinaga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: