Applicable Scenario
- Product:
ZCF - Component:
ZStack Cloud - Versions:
4.8.xand4.6.x - Operating system:
C76 - Deployment: dual management nodes
- Trigger condition: a security scan reports
CVE-2024-6387and exposure of ZStack Cloud port8080.
Symptoms
OpenSSHis affected by the race-condition vulnerabilityCVE-2024-6387.- ZStack Cloud port
8080is exposed externally. - The remediation requires both port hardening and an
OpenSSH/OpenSSLupgrade.
Diagnostic Procedure
- After port hardening, check
iptables -nvxL -t mangle. - After the component upgrade, check the
openssh/opensslversions. - After restarting
sshd, verify host connectivity and ZStack Cloud resource status.
Cause
The remediation addresses two independent risks. The OpenSSH race-condition vulnerability requires an upgrade to 10.2.Xp1; the exposed ZStack Cloud service port 8080 requires access restrictions through the security-hardening script.
Resolution
- Preparation
- Risk level: low.
- Disable global VM high availability.
- Back up the databases on both management nodes.
- During changes on every node, monitor connectivity.
- Port-hardening procedure
- Upload
safe_script_4.6.x.tar.gzto a management node. - Extract and run the script:
tar zxvf safe_script_v4.6.tar.gz
cd safe_script
bash safe.sh
- Expected result: the security-hardening menu opens.
- Select
3 -> 1in the menu to restrict port8080.
- Note: unless additional requirements apply, press Enter at the IP allowlist prompt.
- Expected result: external access to
8080is restricted.
- Check the rule:
iptables -nvxL -t mangle
- Expected result: the port-hardening rule has taken effect.
- OpenSSH / OpenSSL upgrade procedure
- Check current versions:
rpm -qa | grep openssh
rpm -qa | grep openssl
- Expected result: the current version baseline is confirmed.
- Upload the upgrade package to
/rooton every node and prepare a directory:
mkdir openssh-10.2.p1
mv openssh-10.2p1-1.el7.tar.gz openssh-10.2.p1
cd openssh-10.2.p1
tar -xvf openssh-10.2p1-1.el7.tar.gz
- Expected result: the upgrade package is extracted.
- Perform the upgrade:
yum --disablerepo=* --enablerepo=zstack-mn install ./*rpm
- Expected result:
OpenSSH/OpenSSLis upgraded successfully.
- Check the versions again:
rpm -qa | grep openssh
rpm -qa | grep openssl
- Expected result: the versions are updated to the target range.
- Restart
sshd:
systemctl restart sshd.service
- Expected result: the new versions take effect.
- Upgrade the remaining nodes one by one using the same procedure.
- After all nodes are complete, confirm that resources are connected normally and enable global VM high availability.
- Expected result: remediation is complete.
Verification
- Verify that an
8080rule exists iniptables -nvxL -t mangle. - Verify that
rpm -qa | grep opensshandrpm -qa | grep opensslshow the target versions. - Verify that connectivity is normal after
sshdrestarts. - Verify that platform resources and workloads operate normally.
Risks and Rollback
- Risk: an incorrect port allow rule can affect platform API reachability.
- Risk: an
OpenSSH/OpenSSLupgrade issue can affect remote login. - Risk level: low.
- Rollback:
- Use the security-hardening script to restore the port configuration.
- Roll back
OpenSSH:
yum remove openssh-askpass openssh-debuginfo
yum --disablerepo=* --enablerepo=zstack-mn downgrade openssh*
- Restore the previous version on each node in sequence.
