bug 11904: Fix regression caused by OpenJDK 1.6.0 security fix
bug 11904: Fix regression caused by OpenJDK 1.6.0 security fix

It’s due to an security fix of OpenJDK 1.6.0 added by Redhat. Here is excerpt
of [RHSA-2011:1380-01] Critical: java-1.6.0-openjdk security update(
https://www.redhat.com/archives/rhsa-announce/2011-October/msg00011.html)

    A flaw was found in the way the SSL 3 and TLS 1.0 protocols used block
    ciphers in cipher-block chaining (CBC) mode. An attacker able to perform a
    chosen plain text attack against a connection mixing trusted and untrusted
    data could use this flaw to recover portions of the trusted data sent over
    the connection. (CVE-2011-3389)

    Note: This update mitigates the CVE-2011-3389 issue by splitting the first
    application data record byte to a separate SSL/TLS protocol record. This
    mitigation may cause compatibility issues with some SSL/TLS implementations
    and can be disabled using the jsse.enableCBCProtection boolean property.
    This can be done on the command line by appending the flag
    "-Djsse.enableCBCProtection=false" to the java command.

To our knowledge, there are two condition need to be met to trigger this bug:
1.    Using old keystore generated by mgmt. server 2.2.8, which is signed with
SHA1withDSA. Any version later than 2.2.8 would generate keystore signed with
SHA1withRSA. RSA one seems fine with us so far.
2.    Use OpenJDK >=1.6.0.

The reason is, due to the security fix above, the assumption that one packet
would contain only one SSL record is broken. The decrypted data maybe only
contained the first byte of original application data. Then result in buffer
underflow when mgmt server want to read more from it.

To workaround it, according to the message above, add
"-Djsse.enableCBCProtection=false" to tomcat6.conf JAVA_OPTS line would work.
Notice the parameter would only work with latest version of OpenJDK, so simply
add it to the all setup would not work.

This patch provided a fix for it.

status 11904: resolved fixed

GabrielBrascher/cloudstack,jcshen007/cloudstack,jcshen007/cloudstack,wido/cloudstack,argv0/cloudstack,mufaddalq/cloudstack-datera-driver,mufaddalq/cloudstack-datera-driver,resmo/cloudstack,GabrielBrascher/cloudstack,cinderella/incubator-cloudstack,cinderella/incubator-cloudstack,wido/cloudstack,wido/cloudstack,argv0/cloudstack,GabrielBrascher/cloudstack,mufaddalq/cloudstack-datera-driver,argv0/cloudstack,argv0/cloudstack,resmo/cloudstack,resmo/cloudstack,wido/cloudstack,cinderella/incubator-cloudstack,resmo/cloudstack,resmo/cloudstack,resmo/cloudstack,DaanHoogland/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack,cinderella/incubator-cloudstack,GabrielBrascher/cloudstack,GabrielBrascher/cloudstack,mufaddalq/cloudstack-datera-driver,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,argv0/cloudstack,mufaddalq/cloudstack-datera-driver,wido/cloudstack,resmo/cloudstack,DaanHoogland/cloudstack,mufaddalq/cloudstack-datera-driver,wido/cloudstack,argv0/cloudstack,jcshen007/cloudstack,jcshen007/cloudstack,cinderella/incubator-cloudstack,wido/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,DaanHoogland/cloudstack