IBM Support

IV75770: ARITHMETICEXCEPTION WHEN CALLING KEYSTORE.GETKEY() FOR PKCS12

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR status

  • Closed as program error.

Error description

  • Error Message: When calling KeyStore.getKey() for PKCS12
    keystore, an ArithmeticException is thrown which is unexpected.
    The expected exception should be UnrecoverableKeyException as
    described in Java Docs.
    .
    Stack Trace: java.lang.ArithmeticException: divide by zero
            at com.ibm.crypto.provider.bb.a(Unknown Source)
            at com.ibm.crypto.provider.bb.a(Unknown Source)
            at
    com.ibm.crypto.provider.PBEWithSHAAnd3KeyTripleDESCipher.engineI
    nit(Unknown Source)
            at com.ibm.crypto.provider.z.a(Unknown Source)
            at
    com.ibm.crypto.provider.PKCS12KeyStore.engineGetKey(Unknown
    Source)
            at java.security.KeyStore.getKey(KeyStore.java:804)
            at JREIssue.main(JREIssue.java:10)
    .
    

Local fix

Problem summary

  • Wrong exception thrown when calling KeyStore.getKey() for
    PKCS12KeyStore
    

Problem conclusion

  • The fix is to add a check for the length of data before dividing
    its length.
    The associated RTC PR is 96283
    The associated Austin CMVC defect is 116783
    The associated Hursley CMVC defect is 202842
    The associated APAR is IV74999
    JVMs affected : Java 5.0, Java 6.0, Java 6.1, Java 7.0, Java 7.1
    and Java 8.0
    The fix was delivered for Java 5.0 SR16 FP14, Java 6.0 SR16
    FP15, Java 6.1 SR8 FP15, Java 7.0 SR9 FP20, Java 7.1 SR3 FP20
    and Java 8.0 SR2
    The affected jar is "ibmjceprovider.jar".
    The build level of this jar for the affected releases is
    "20150714"
    .
    This APAR will be fixed in the following Java Releases:
       7    SR9 FP20  (7.0.9.20)
       6    SR16 FP15 (6.0.16.15)
       6 R1 SR8 FP15  (6.1.8.15)
       5.0  SR16 FP14 (5.0.16.14)
       8    SR2       (8.0.2.0)
       7 R1 SR3 FP20  (7.1.3.20)
    .
    Contact your IBM Product's Service Team for these Service
    Refreshes and Fix Packs.
    For those running stand-alone, information about the available
    Service Refreshes and Fix Packs can be found at:
               https://www.ibm.com/developerworks/java/jdk/
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV75770

  • Reported component name

    SECURITY

  • Reported component ID

    620700125

  • Reported release

    260

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-08-04

  • Closed date

    2015-08-04

  • Last modified date

    2015-08-04

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IV75771

Fix information

  • Fixed component name

    SECURITY

  • Fixed component ID

    620700125

Applicable component levels

  • R260 PSY

       UP

  • R600 PSY

       UP

  • R270 PSY

       UP



Document information

More support for: Runtimes for Java Technology
Security

Software version: 260

Reference #: IV75770

Modified date: 04 August 2015