APAR status
Closed as program error.
Error description
Error Message: An intermittent exception is seen by the IBMPKCS11Impl provider on the z/OS and z/Linux platforms 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 . 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 and z/Linux platforms when attempting to verify an ECDSA signature based upon the secp521r1 curve. The exception seen 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 update made for a Security Bulletin which updated the Signature.asn1ToECDSA() method. The updated method now trims leading zeroes from the "r" and "s" values of an ECDSA signature prior to signature verification by the crypto hardware. The crypto hardware used on System z appears unable to handle the length of the data buffer allocated to hold the trimmed signature. This exception has not been seen with the IBMPKCS11Impl provider when using either SafeNet or Thales crypto hardware.
Problem conclusion
A fix has been applied to the Signature.asn1toECDSA( ) method of the IBMPKCS11Impl provider, for the z/OS and z/Linux platforms only, to ensure that the length of the signature being verified will be acceptable to the System z crypto hardware. . This APAR will be fixed in the following Java Releases: 8 SR5 FP25 (8.0.5.25) 7 SR10 FP35 (7.0.10.35) 7 R1 SR4 FP35 (7.1.4.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
IJ10136
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-10-04
Closed date
2018-10-05
Last modified date
2018-10-05
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