Patching Windows Server without needing to reboot is a handy feature – but it's only available on Azure

Trampolines and Retpoline: Applying patches at the function level

Microsoft has posted details of how its Hotpatching feature applies security patches to Windows Server without requiring a reboot – but although the company said it is working on broader availability, it remains Azure-only.

Credited to "Andrea Allievi & Hotpatch Team," Allievi being a Senior Core OS Engineer at Microsoft, the post explains both the rationale and the technology behind the feature. It is not just about convenience.

"Often, users and system administrators will delay the installation of a patch because of the reboot that is frequently required upon completing the installation. This delay in patching, while seemingly convenient, is actually a security issue," the post published on 19 November explains, referencing a report showing that 42 per cent of exploited vulnerabilities occur after a patch has been released.

Microsoft focused on the problem in the context of Azure host machines. "The instances of Windows Server that power the Azure fleet are required to be highly available. However, we also require these operating system instances to be secure," the post adds. Therefore Hotpatch has been "in use in Azure Host OS for a while," making the technique "battle-tested."

The reboot method of patching is easy to understand: The system shuts down, cleanly terminating all processes, then the binary files which implement the Windows NT kernel are updated, and the processes in the restarted system call functions in the updated files.

Hotpatching is different in kind. According to the team, it "works at the function level, which means that functions are individually patched and not individual files or components." The way this operates is by redirection of calls to the unpatched function to "a patched function belonging to a hotpatch image." This works with x64, ARM64 (new in Windows Server 2022), and 32-bit code.

The path of a Hotpatched function

The path of a Hotpatched function

Implementing this solution requires a Hotpatch engine, "mostly in the NT and Secure Kernel," the engineers explain, the Secure Kernel being part of the operating system that runs in a more secure and isolated environment called VTL1 (Virtual Trust Level 1). The Hotpatch engine identifies patch images, verifies that they match the unpatched base image, and then maps the patch image in the same address space as the base image.

The engine is smart enough to update references to global variables in patched functions to point to the global variables in the base image. Then it performs the patch, causing "functions in the original base image to jump to the corresponding functions in the patch image." This bouncing of code paths is described as "the trampoline."

Patching a system in this way indefinitely would lead to increasing convolution. Therefore, there is a periodic refresh with a new set of base images, implemented as a traditional cumulative update and requiring a reboot. The current documentation does this every three months. There is a hint that even better patching techniques may come. "Hotpatching is one of the first techniques geared to bringing users a reboot-less security update future," the team said.

Windows Server 2022 introduces not only the ARM64 support mentioned above but also compatibility with Retpoline, a return trampoline introduced to overcome Spectre v2 side-channel attacks.

The snag with these features is in the final paragraph of the post. "Hotpatch-based security updates are available to customers running Windows Server 2019 and Windows Server 2022 Azure Edition images in the Azure cloud within the automanage framework," says the team. That is little comfort to the countless other users of Windows Server.

"The hotpatch feature for Azure is great but on-prem servers are long overdue for a replacement or new method of patching that isn't WSUS," commented a customer in July in response, also observing that "every month the server chokes for hours trying to synchronize the WSUS database after updates are released." WSUS is Windows Server Update Services, deployed on business networks to roll out patches internally.

At the time, principal program manager Ned Pyle said that "we have an answer for this coming soon, but I can't say more yet." Now the hotpatch teams says "we are working on bringing hotpatch-based security updates to a wider set of Windows customers." Note that Hotpatch for Azure VMs is still in preview. The documentation described it as "a new way to install updates on supported Windows Server Azure Edition virtual machine."

The impact of Hotpatch could be considerable since it is quicker and less disruptive than the existing patch and reboot cycle, and can be automated without introducing downtime. But Microsoft has not yet stated why it is Azure only. If it is for testing the feature in a controlled environment before more general availability anywhere Windows Server can run, that is understandable. If it is a way of giving Microsoft's cloud an artificial advantage over both on-premises and other public clouds and hosting companies, that would be unwelcome to customers. ®

Similar topics

Other stories you might like

  • Lonestar plans to put datacenters in the Moon's lava tubes
    How? Founder tells The Register 'Robots… lots of robots'

    Imagine a future where racks of computer servers hum quietly in darkness below the surface of the Moon.

    Here is where some of the most important data is stored, to be left untouched for as long as can be. The idea sounds like something from science-fiction, but one startup that recently emerged from stealth is trying to turn it into a reality. Lonestar Data Holdings has a unique mission unlike any other cloud provider: to build datacenters on the Moon backing up the world's data.

    "It's inconceivable to me that we are keeping our most precious assets, our knowledge and our data, on Earth, where we're setting off bombs and burning things," Christopher Stott, founder and CEO of Lonestar, told The Register. "We need to put our assets in place off our planet, where we can keep it safe."

    Continue reading
  • Conti: Russian-backed rulers of Costa Rican hacktocracy?
    Also, Chinese IT admin jailed for deleting database, and the NSA promises no more backdoors

    In brief The notorious Russian-aligned Conti ransomware gang has upped the ante in its attack against Costa Rica, threatening to overthrow the government if it doesn't pay a $20 million ransom. 

    Costa Rican president Rodrigo Chaves said that the country is effectively at war with the gang, who in April infiltrated the government's computer systems, gaining a foothold in 27 agencies at various government levels. The US State Department has offered a $15 million reward leading to the capture of Conti's leaders, who it said have made more than $150 million from 1,000+ victims.

    Conti claimed this week that it has insiders in the Costa Rican government, the AP reported, warning that "We are determined to overthrow the government by means of a cyber attack, we have already shown you all the strength and power, you have introduced an emergency." 

    Continue reading
  • China-linked Twisted Panda caught spying on Russian defense R&D
    Because Beijing isn't above covert ops to accomplish its five-year goals

    Chinese cyberspies targeted two Russian defense institutes and possibly another research facility in Belarus, according to Check Point Research.

    The new campaign, dubbed Twisted Panda, is part of a larger, state-sponsored espionage operation that has been ongoing for several months, if not nearly a year, according to the security shop.

    In a technical analysis, the researchers detail the various malicious stages and payloads of the campaign that used sanctions-related phishing emails to attack Russian entities, which are part of the state-owned defense conglomerate Rostec Corporation.

    Continue reading
  • FTC signals crackdown on ed-tech harvesting kid's data
    Trade watchdog, and President, reminds that COPPA can ban ya

    The US Federal Trade Commission on Thursday said it intends to take action against educational technology companies that unlawfully collect data from children using online educational services.

    In a policy statement, the agency said, "Children should not have to needlessly hand over their data and forfeit their privacy in order to do their schoolwork or participate in remote learning, especially given the wide and increasing adoption of ed tech tools."

    The agency says it will scrutinize educational service providers to ensure that they are meeting their legal obligations under COPPA, the Children's Online Privacy Protection Act.

    Continue reading
  • Mysterious firm seeks to buy majority stake in Arm China
    Chinese joint venture's ousted CEO tries to hang on - who will get control?

    The saga surrounding Arm's joint venture in China just took another intriguing turn: a mysterious firm named Lotcap Group claims it has signed a letter of intent to buy a 51 percent stake in Arm China from existing investors in the country.

    In a Chinese-language press release posted Wednesday, Lotcap said it has formed a subsidiary, Lotcap Fund, to buy a majority stake in the joint venture. However, reporting by one newspaper suggested that the investment firm still needs the approval of one significant investor to gain 51 percent control of Arm China.

    The development comes a couple of weeks after Arm China said that its former CEO, Allen Wu, was refusing once again to step down from his position, despite the company's board voting in late April to replace Wu with two co-chief executives. SoftBank Group, which owns 49 percent of the Chinese venture, has been trying to unentangle Arm China from Wu as the Japanese tech investment giant plans for an initial public offering of the British parent company.

    Continue reading
  • SmartNICs power the cloud, are enterprise datacenters next?
    High pricing, lack of software make smartNICs a tough sell, despite offload potential

    SmartNICs have the potential to accelerate enterprise workloads, but don't expect to see them bring hyperscale-class efficiency to most datacenters anytime soon, ZK Research's Zeus Kerravala told The Register.

    SmartNICs are widely deployed in cloud and hyperscale datacenters as a means to offload input/output (I/O) intensive network, security, and storage operations from the CPU, freeing it up to run revenue generating tenant workloads. Some more advanced chips even offload the hypervisor to further separate the infrastructure management layer from the rest of the server.

    Despite relative success in the cloud and a flurry of innovation from the still-limited vendor SmartNIC ecosystem, including Mellanox (Nvidia), Intel, Marvell, and Xilinx (AMD), Kerravala argues that the use cases for enterprise datacenters are unlikely to resemble those of the major hyperscalers, at least in the near term.

    Continue reading

Biting the hand that feeds IT © 1998–2022