APAR status
Closed as program error.
Error description
Error Message: An intermittent exception is seen by the IBMPKCS11Impl provider on the z/OS platform when attempting to verify an ECDSA signature based upon the secp521r1 curve. The exception is: com.ibm.pkcs11.PKCS11Exception: Signature length is out of range at com.ibm.pkcs11.nat.NativePKCS11Session.verify(Native Method) at com.ibm.crypto.pkcs11impl.provider.Session.verify(Session.java:5 30) at com.ibm.crypto.pkcs11impl.provider.Signature.engineVerify(Signat ure.java:532) at com.ibm.crypto.pkcs11impl.provider.GeneralSignature.engineVerify (GeneralSignature.java:523) at java.security.Signature$Delegate.engineVerify(Signature.java:123 0) at java.security.Signature.verify(Signature.java:661) at ecdsa.testDataECDSA213(ecdsa.java:79) at ecdsa.main(ecdsa.java:38) This error was introduced by an Oracle Security Bulletin which updated the Signature.asn1ToECDSA() method. The new method trims leading zeroes from the "r" and "s" values of an ECDSA signature prior to signature verification by the hardware. However, the error appears to be related to the length of the data buffer allocated to hold the trimmed signature. No exceptions have been seen by the IBMPKCS11Impl provider when using either SafeNet or Thales HSMs. . Stack Trace: com.ibm.pkcs11.PKCS11Exception: Signature length is out of range at com.ibm.pkcs11.nat.NativePKCS11Session.verify(Native Method) at com.ibm.crypto.pkcs11impl.provider.Session.verify(Session.java:5 30) at com.ibm.crypto.pkcs11impl.provider.Signature.engineVerify(Signat ure.java:532) at com.ibm.crypto.pkcs11impl.provider.GeneralSignature.engineVerify (GeneralSignature.java:523) at java.security.Signature$Delegate.engineVerify(Signature.java:123 0) at java.security.Signature.verify(Signature.java:661) at ecdsa.testDataECDSA213(ecdsa.java:79) at ecdsa.main(ecdsa.java:38) .
Local fix
Problem summary
An intermittent exception is seen by the IBMPKCS11Impl provider on the z/OS platform when attempting to verify an ECDSA signature based upon the secp521r1 curve. The exception is: com.ibm.pkcs11.PKCS11Exception: Signature length is out of range at com.ibm.pkcs11.nat.NativePKCS11Session.verify(Native Method) at com.ibm.crypto.pkcs11impl.provider.Session.verify(Session.java:5 30) at com.ibm.crypto.pkcs11impl.provider.Signature.engineVerify(Signat ure.java:532) at com.ibm.crypto.pkcs11impl.provider.GeneralSignature.engineVerify (GeneralSignature.java:523) at java.security.Signature$Delegate.engineVerify(Signature.java:123 0) at java.security.Signature.verify(Signature.java:661) at ecdsa.testDataECDSA213(ecdsa.java:79) at ecdsa.main(ecdsa.java:38) This error was introduced by an Oracle Security Bulletin which updated the Signature.asn1ToECDSA() method. The new method trims leading zeroes from the "r" and "s" values of an ECDSA signature prior to signature verification by the hardware. However, the error appears to be related to the length of the data buffer allocated to hold the trimmed signature. No exceptions have been seen by the IBMPKCS11Impl provider when using either SafeNet or Thales HSMs.
Problem conclusion
A fix has been applied to the Signature.asn1toECDSA( ) method for the z/OS platform only. . This APAR will be fixed in the following Java Releases: 8 SR5 FP25 (8.0.5.25) 7 R1 SR4 FP35 (7.1.4.35) 7 SR10 FP35 (7.0.10.35) . 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
IJ09107
Reported component name
SECURITY
Reported component ID
620700125
Reported release
270
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2018-09-12
Closed date
2018-09-17
Last modified date
2018-09-17
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
SECURITY
Fixed component ID
620700125
Applicable component levels
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSNVBF","label":"Runtimes for Java Technology"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"270","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]
Document Information
Modified date:
07 December 2020