Issue
This article contains steps to workaround SECURITY-3911 / SECURITY-3930 for CloudBees CI clients who are not yet upgraded to version 2.568.2.37664.
CloudBees CI 2.568.2.37664 contains additional fixes for security issues that this Java agent does not protect from. Those security issues have additional prerequisites that make exploitation more difficult. Update CloudBees CI to protect from all issues fixed in that release.
|
Workaround for CloudBees CI on traditional platforms
-
Download the workaround jar into the
JENKINS_HOMEfor the operations center and all controllerscurl -L -o /var/jenkins_home/security3911-3930-workaround.jar https://github.com/jenkinsci-cert/SECURITY-3911-3930/releases/download/security3911-3930-workaround-1.0/security3911-3930-workaround-1.0.jar -
Update the operations center and all controllers to add the following Java argument, as per: How to add Java arguments to CloudBees CI?
-javaagent:/var/jenkins_home/security3911-3930-workaround.jar -
Restart the operations center and all controllers to pick up the new Java argument
This workaround should be removed as soon as you upgrade to version 2.568.2.37664 or newer.
|
Workaround for CloudBees CI on modern cloud platforms
If you have any controllers that are offline, start all controllers.
To start all controllers using a cluster operation:
-
On the root level or within a folder of operations center, select New Item.
-
Specify a name for the cluster operation, for example "Start all controllers".
-
Select Cluster Operations as the item type.
-
Select Add Operation > managed controllers
-
Under Source, select From Operations Center Root.
-
Select .
-
Select , and check
Fail on error -
Select Save.
-
Run the cluster operation
-
Confirm the cluster operation passed, and that all controllers are now online
Now that all controllers are online, apply the workaround:
-
Download the workaround jar into the operations center and all managed controller pods
NAMESPACE='ci'(1) kubectl get pods -n "${NAMESPACE}" -l 'com.cloudbees.cje.type in (master,cjoc)' -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' > pods.txt(2) while IFS= read -r pod; do kubectl exec "$pod" -n "${NAMESPACE}" -- curl -L -o /var/jenkins_home/security3911-3930-workaround.jar https://github.com/jenkinsci-cert/SECURITY-3911-3930/releases/download/security3911-3930-workaround-1.0/security3911-3930-workaround-1.0.jar(3) done < pods.txt1 Update cito be the namespace for your cluster. If you have multiple namespaces, run this for each namespace that contains controllers or operations centers.2 Saves the operations center and all controller pod names in the namespace to pods.txt 3 Downloads the workaround jar into each pod -
Update the helm values for CloudBees CI to add
-javaagent:/var/jenkins_home/security3911-3930-workaround.jarto the operations center and all managed controllers:OperationsCenter: JavaOpts: -javaagent:/var/jenkins_home/security3911-3930-workaround.jar Master: JavaOpts: -javaagent:/var/jenkins_home/security3911-3930-workaround.jar -
The operations center will be automatically restarted when you apply the helm values
-
Reprovision (or stop and start) all managed controllers to pick up the new JavaOpts
-
On the root level or within a folder of operations center, select New Item.
-
Specify a name for the cluster operation, for example "Reprovision all controllers".
-
Select Cluster Operations as the item type.
-
Select Add Operation > managed controllers
-
Under Source, select From Operations Center Root.
-
Select and check
Fail on errorandForce -
Select Save.
-
Run the cluster operation
-
Confirm the cluster operation passed, and all controllers have restarted
-
-
If you have Traditional controllers connected to your Modern operations center:
-
Follow the steps from Workaround for CloudBees CI on traditional platforms
-
This workaround should be removed as soon as you upgrade to version 2.568.2.37664 or newer.
|
Verification the workaround is active
-
For the operations center:
-
Go to
-
Run the scripts from this page to verify SECURITY-3911-3930 verification
-
The output from both scripts should contain
PROTECTEDif the workaround is active
-
-
For the controllers:
-
Validating on an individual controller
-
Navigate to (if using High Availability (HA), go to )
-
Run the scripts from this page to verify SECURITY-3911-3930 verification
-
The output from both scripts should contain
PROTECTEDif the workaround is active
-
-
Validating on multiple controllers via cluster operation:
-
On the root level or within a folder of operations center, select New Item.
-
Specify a name for the cluster operation, for example "Validate SECURITY-3911 SECURITY-3930 Workaround on all controllers".
-
Select Cluster Operations as the item type.
-
Select Add Operation > Controllers
-
Under Source, select From Operations Center Root.
-
Select and add the the script from SECURITY-3911 verification
-
Select and add the the script from SECURITY-3930 verification
-
Select Save.
-
Run the cluster operation job
-
Review the logs from each controller in the cluster operation job log, the output from both scripts should contain
PROTECTEDif the workaround is active
-
-