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

Integer overflow in OpenMapRealMatrix

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.2
    • 3.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: