IBM Support

IV27834: JAVA.LANG.NEGATIVEARRAYSIZEEXCEPTION WHEN DECRYPT WITH CORRUPTED DATA

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

  • java.lang.NegativeArraySizeException when decrypt with corrupted
    data
    
    Error message:
    ==============
    N/A
    
    Stack Trace:
    ============
    java.lang.NegativeArraySizeException
            at com.ibm.crypto.provider.h.a(Unknown Source)
            at com.ibm.crypto.provider.ELGamalCipher.a(Unknown
    Source)
            at
    com.ibm.crypto.provider.ELGamalCipher.engineDoFinal(Unknown
    Source)
            at javax.crypto.Cipher.doFinal(Unknown Source)
            at
    ElgamalTest_BadCipherBlock.main(ElgamalTest_BadCipherBlock.java:
    199)
    
    
    Other Error Information:
    ========================
    A more meaningful exception is expected when Elgamal decryption
    failed with corrupted data.
    

Local fix

  • N/A
    

Problem summary

  •    java.lang.NegativeArraySizeException when
    ELGamal decryption is performed with corrupted data
    
    PROBLEM DESCRIPTION:
    
    A more meaningful exception is expected when ELGamal decryption
    fails with corrupted data.
    Today, the following exception is thrown:
    
    java.lang.NegativeArraySizeException
            at com.ibm.crypto.provider.h.a(Unknown Source)
            at com.ibm.crypto.provider.ELGamalCipher.a(Unknown
    Source)
            at
    com.ibm.crypto.provider.ELGamalCipher.engineDoFinal(Unknown
    Source)
            at javax.crypto.Cipher.doFinal(Unknown Source)
            at
    ElgamalTest_BadCipherBlock.main(ElgamalTest_BadCipherBlock.java:
    199)
    

Problem conclusion

  • PROBLEM RESOLUTION:
    
    The code for the ELGamal Cipher has been modified to throw a
    "Data Corrupt" exception
    if corrupted data is detected.
    
    
    
    The associated Hursley CMVC defect is 193764
    The associated Austin CMVC defect is 113292
    The fix is being delivered for Java 5.0 SR15, Java 6.0 SR12,
    Java 626 SR4, and Java 7.0 SR3.
    
    The affected jar is "ibmjceprovider.jar".
    The build level of this jar for all affected releases is
    "20120910".
    This fix has also been delivered to Java 6.0 SR13  FP1, Java 7.0
     SR4 FP1, and Java 626 SR5 FP1.  The build level for that jar
    was 20130219.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV27834

  • Reported component name

    TIV JAVA CRYPTO

  • Reported component ID

    TIVSECJCE

  • Reported release

    100

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-09-11

  • Closed date

    2012-09-12

  • Last modified date

    2013-02-22

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

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

Fix information

  • Fixed component name

    TIV JAVA CRYPTO

  • Fixed component ID

    TIVSECJCE

Applicable component levels

  • R100 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCZL42","label":"JCE"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"100","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
22 February 2013