Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-679

Integer overflow in OpenMapRealMatrix

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 3.0
    • Labels:
      None

      Description

      computeKey() has an integer overflow. Since it is a sparse matrix, this is quite easily encountered long before heap space is exhausted. The attached code demonstrates the problem, which could potentially be a security vulnerability (for example, if one was to use this matrix to store access control information).

      Workaround: never create an OpenMapRealMatrix with more cells than are addressable with an int.

        Attachments

        1. Flaw.java
          0.3 kB
          Christopher Berner

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              cberner Christopher Berner
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: