CPU Monitor for ProxySG or Advanced Secure Gateway (ASG) is reporting high CPU utilization in SSL and Cryptography.
High CPU being reported on the ProxySG/ASG can be due to one or more of the reasons which are listed below, or something else entirely. However, the most common reasons for high CPU in SSL and Cryptography are as follows:
To determine if there is something in the network causing continuous policy evaluations, Blue Coat Reporter can be leveraged. The following Reporter reports can be helpful to further diagnose the issue:
Additionally, the Blocked web browsing per user and Default Bandwidth reports are also useful.
If after reviewing the access logs significant ssl traffic to specific sites is seen, apply a policy to disable SSL interception for a particular site(s).
For example, to disable SSL interception for Facebook, Google, and Microsoft apply the following policy (for explicit deployment):
High CPU utilization can result when one or more clients send a high number of requests to the proxy. Examples include opening many simultaneous sessions to the same destination, or applications that do not understand proxy authentication leading to a loop of requests or authentication prompts.
To identify this situation, use the management console. Navigate to Statistics > Sessions > Active Sessions and see if a single user tries to make a large number of connections to the same destination. One possible resolution for this situation is to enable the Attack Detection feature by issuing the following commands at the CLI:
proxy>enable
proxy#conf t
proxy#(config)attack-detection
proxy#(config attack-detection)client
proxy#(config client)enable-limits
These commands limit the number of sessions that are permitted from any client up to 100 simultaneous sessions and subsequent sessions for this client IP are dropped. Care should be used when implementing this policy as it may prevent legitimate applications from connecting correctly to the Internet.
Note: This configuration is not recommended to be done globally on the proxy in case of:
Beginning in SGOS 6.5.9.9 and 6.6.4.3 a fix was introduced to address this issue.
In SGOS releases before 6.5.9.9 and 6.6.4.3 an issue can occur where multiple certificates use the same common name. This situation causes the ProxySG to continuously recreate its version of the certificates which can be a CPU-intensive process. Only if you are unable to upgrade to the latest version, the following workaround can be used. Change the SSL forward proxy policy in the VPM:
$(x-rs-certificate-serial-number)$(x-rs-certificate-valid-from)$(x-rs-certificate-valid-to)
<ssl-intercept>
ssl.forward_proxy(https) ssl.forward_proxy.splash_text("$(x-rs-certificate-serial-number)$(x-rs-certificate-valid-from)$(x-rs-certificate-valid-to)")
You can monitor the cert cache by accessing the following URL on the ProxySG appliance: https://<PROXYIP>:8082/sslproxy/certcache
To get the most out of the changes if the proxy is running SGOS 6.5.5.1 or later, increase the certificate cache timeout from the default of 2 hours to 72 hours, from the CLI:
proxy>enable
proxy#conf t
proxy#(config)ssl
proxy#(config ssl)proxy set-cert-cache-timeout 96
With SSL-Interception, the ProxySG emulates original certificates from the websites and uses the configured key size to generate them.
Decrease the size of the ssl-interception private keys from the CLI:
proxy>enable
proxy#conf t
proxy#(config)ssl
proxy#(config ssl)proxy force-emulated-cert-keysize 2048
On a Proxy Sysinfo or Snapshot, you may see something similar to the following lines flooding the file:
2019-02-22 22:46:51-00:00UTC "Server certificate validation failed: CERT_UNTRUSTED_ISSUER, Name in certificate: " 0 300000:1 te_transaction.cpp:1746
2019-02-22 22:46:51-00:00UTC "Server certificate validation failed: CERT_UNTRUSTED_ISSUER, Name in certificate: instance-2" 0 300000:1 te_transaction.cpp:1746
2019-02-22 22:46:51-00:00UTC "Server certificate validation failed: CERT_UNTRUSTED_ISSUER, Name in certificate: " 0 300000:1 te_transaction.cpp:1746
2019-02-22 22:46:51-00:00UTC "Server certificate validation failed: CERT_UNTRUSTED_ISSUER, Name in certificate: " 0 300000:1 te_transaction.cpp:1746
2019-02-22 22:46:51-00:00UTC "Server certificate validation failed: CERT_UNTRUSTED_ISSUER, Name in certificate: " 0 300000:1 te_transaction.cpp:1746
This indicates that the Edge SWG is not trusting certificates from the upstream devices (reasons include certificates being expired or common-name mismatches, or other possible causes).
Workaround:
- Apply the following CPL:
<SSL>
server.certificate.validate(no)
You should see the CPU utilization lower drastically within a few minutes.
Note:
Disabling certificate validation makes the ProxySG vulnerable to "Man In the Middle" attacks.
Solution:
In order to fix this issue permanently, identify the upstream devices causing the problem and troubleshoot the certificate issues on them.
To help during the troubleshooting process, reproduce the issue on a maintenance window (or before applying the fix) and:
Once you have identified the destination(s) of the errors, you may apply the rule above to only those destinations, while the problematic certificates are being fixed.
DHE ciphers are disabled by default. ECDHE ciphers were added to provide a similar level of encryption with fewer CPU resource requirements. For more details on the ciphers shipped with SGOS, please refer to Cipher support on ProxySG.
proxy>enable
proxy#conf t
proxy#(config)ssl
proxy#(config ssl) proxy dhe-ciphers disable
If you go through these steps and still have issues with high CPU utilization in the HTTP or FTP process group, open a ticket with Broadcom Support.
In addition to the details from the CPU Monitor, you may also be asked to provide the following:
Configure snapshots on the Edge SWG to occur every five minutes (default is 60), and run for at least 20 minutes during the CPU spike.
Depending on the nature and symptoms of the high utilization issue, you may be asked to provide a full core dump of the Edge SWG (ProxySG).