The Microsoft Security Response Centre released a blog post this week about a Service Fabric (SF) Linux Cluster vulnerability. This bug has been identified on both Linux and Windows operating systems, however Microsoft claims only Linux is vulnerable to attack. This vulnerability was published as CVE-2022-30137 by Microsoft earlier this month.
Azure Service Fabric is a distributed systems platform for deploying microservices and containers. It is host to more than 1 million applications, all of which could be compromised due to an exploit of this vulnerability. Microsoft products including Cortana, Skype for Business, Dynamics 365, Microsoft Intune, and Microsoft Power BI are hosted through SF, as well as many Azure applications, such as Azure SQL Database, Azure Event Hubs, Azure IoT Hub, and Azure CosmosDB.
Through elevation of privileges, malicious actors can access and control the SF host node and cause the entire SF Linux cluster to become compromised. The attack begins when they gain access to a Docker image running on a Service Fabric cluster. This allows them to exploit a race condition in the Data Collection Agent (DCA) which pulls logs from all the containers in the cluster. Attackers then have the ability to execute malicious code inside a container with access to the SF runtime, as this access is granted by default to every container. Because the DCA runs as root on the cluster and has access into all the containers, compromising the DCA process results in gaining control over the whole cluster and all the containers within it.
This attack is only possible because Service Fabric cluster is a single tenant environment by default, so there is usually no isolation in place between applications to prevent an attack from spreading to all nodes in the cluster. Disabling access to the runtime can prevent applications from accessing the log directory that is necessary to exploit this vulnerability. This can be used as a workaround to allow for systems that have not yet been updated, as well as being good practice for running untrustworthy applications in cluster environments.
A patch for this vulnerability was first released on 26th May 2022, and should have been applied to all users with automatic updates by the 14th June 2022. Microsoft have advised that all customers with automatic updates enabled for their Linux clusters do not need to take any further action at this time. However, all Microsoft customers who use both Linux and Windows operating systems should be actively reviewing all containerised workloads which have access to their host clusters in order to stay vigilant about the potential for exploit. Any users without automatic updates enabled should check they are updated to the most recent version; Service Fabric 9.0 First Refresh Release.
“We were very impressed with the service, I will say, the vulnerability found was one our previous organisation had not picked up, which does make you wonder if anything else was missed.”
Aim Ltd Chief Technology Officer (CTO)