Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8261462

GCM ByteBuffer decryption problems

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 16-pool, 17
    • Fix Version/s: 17
    • Component/s: security-libs
    • Labels:
      None
    • Subcomponent:
    • Introduced In Version:
      16
    • Resolved In Build:
      b13

      Description

      Two problems:
      1) The input bytebuffer during decryption was not moved to the limit, The code uses bytebuffer duplicate() to do operations that do not effect the original input buffer.
      2) Buffered data in decryption isn't cleared after the first operation is done. This can cause the buffered data to be used if the op is not re-initialized. Buffers are created during update() operations. Note while the fix does include an encryption fix too, GCM must be reinitialized per the GCM spec for key & IV.
      3) Test fix for a manual test which an internal initialization NPE

      There appear to be no jck or regression tests that handle the top two situations.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ascarpino Anthony Scarpino
              Reporter:
              ascarpino Anthony Scarpino
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: