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

AArch64: SEGV in stub code cipherBlockChaining_decryptAESCrypt

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b143
    • CPU:
      aarch64

      Description


      Jtreg test jdk/test/com/sun/crypto/provider/Cipher/CTS/CTSMode.java
      failed with SIGSEGV on option "-Xcomp -XX:-TieredCompilation".

      The crash happens at stub code cipherBlockChaining_decryptAESCrypt.

      Checking the jdk source code CipherTextStealing.decryptFinal and its
      callee CipherBlockChaining.decrypt/implDecrypt, we can see that
      cipherLen which is passed to the stub code can be 0. The unexpected
      len_reg value makes the load from invalid address.

      The following patch could fix this issue:

      http://people.linaro.org/~ningsheng.jian/webrev/cbc-stub-fix/webrev.00/

      It aligns with the Java code implementation and passed JTreg tests. To
      make code consistent, I also update the encrypt part.

        Issue Links

          Activity

          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/hs/hotspot/rev/08b6c4e9431a
          User: aph
          Date: 2016-10-18 17:41:05 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs/hotspot/rev/08b6c4e9431a User: aph Date: 2016-10-18 17:41:05 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/08b6c4e9431a
          User: lana
          Date: 2016-11-03 02:17:58 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/08b6c4e9431a User: lana Date: 2016-11-03 02:17:58 +0000

            People

            • Assignee:
              aph Andrew Haley
              Reporter:
              aph Andrew Haley
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: