Bitstream Breach: Critical Security Flaw Discovered in FPGA ChipsApril 20, 2020 by Gary Elinoff
Xilinx is one of the world's leading FPGA manufacturers. So, what happens when a critical security vulnerability is discovered in their FPGA chips?
Scientists at the Horst Görtz Institute for IT Security and the Max Planck Institute for Security and Privacy have discovered a critical security vulnerability in Xilinx's 7-series FPGAs. The bug, dubbed by researchers as the “StarBleed,” affects Xilinx’s Virtex, Artix, Spartan, and Kintex FPGAs.
The researchers found that FPGAs' remote programmability is a double-edged sword. Image used courtesy of the Horst Görtz Institute for IT Security
Unfortunately, the bug is in the devices’ hardware, not the software. Thus, the security risk can only be expunged by replacing the chip. Xilinx has since commented on StarBleed, explaining that an attacker would need close, physical proximity to the device to achieve such a breach.
A basic explanation of the nature of FPGAs will help us to dissect the issue of StarBleed.
The Nature of FPGAs
The Karlsruhe Institute of Technology describes field-programmable gate arrays (FPGAs) as “a computer manufacturer’s 'Lego bricks': electronic components that can be employed in a more flexible way than other computer chips.”
As a simplistic description, think of FPGAs as huge blocks of digital logic choices that can be modified as needed. They give designers the speed and latency of digital logic and the flexibility of programmable MPUs. They are often used during product development before the design is mature enough for designers to commit to it, saving the expense of developing and manufacturing a dedicated digital logic chip.
They are also deployed in applications where designers anticipate future design changes. And, because they are low-power devices, they are also well suited for use by cloud service providers in server farms.
Designers will often remotely reprogram FPGAs online. Designers of FPGAs are ever aware of the inherent dangers of bad actors hijacking the devices. They devote a huge amount of time, effort, and money to avoid such security threats, but they are not always successful.
The StarBleed Security Flaw
FPGAs contain an onboard file called a bitstream, which defines the way the “lego bricks” are interconnected. Because the bitstream is used to program the FPGA, designers protect this file with a plethora of encryption methods. The research teams at Horst Görtz Institute for IT Security and the Max Planck Institute for Security and Privacy succeeded in breaching these encryption barriers to the FPGA's bitstream.
Overview of the bitstream structure. Image used courtesy of the Horst Görtz Institute for IT Security
If hackers could recreate the efforts of these researchers, they would have total control of the FPGA and the end device that the FPGA is a central part of. Additionally, they could insert a hardware Trojan into the FPGA and steal whatever intellectual property is held within.
Xilinx recognizes the essential place of an encrypted bitstream in security, too. In an app note, Xilinx provides a step-by-step manual to generate and program an encrypted bitstream into a Xilinx 7 series FPGA using Xilinx's Vivado Design Suite.
Overcoming the Encryption
The scientists describe that the FPGAs' main virtue was also its downfall: programmability.
In the 7-series FPGAs datasheet, Xilinx explains, "In all 7 series FPGAs (except XC7S6 and XC7S15), the FPGA bitstream, which contains sensitive customer IP, can be protected with 256-bit AES encryption and HMAC/SHA-256 authentication to prevent unauthorized copying of the design."
But the researchers were able to push past these security measures when the FPGAs' update and fallback feature revealed a gateway by which the researchers could alter the encrypted bitstream during online configuration. During this configuration process, the researchers rerouted the decrypted information to a "WBSTAR configuration register." Once the researchers hit reset, they could then read out the content.
Depiction of the attack bitstream. Image used courtesy of the Horst Görtz Institute for IT Security
You can read the full details of the research team's “white hacking” methods in their published research paper, titled "The Unpatchable Silicon: A Full Break of the Bitstream Encryption of Xilinx 7-Series FPGAs."
Xilinx Takes Security Seriously
According to Horst Görtz Institute's Amir Moradi, "We informed Xilinx about this vulnerability and subsequently worked closely together during the vulnerability disclosure process. Furthermore, it appears highly unlikely that this vulnerability will occur in the manufacturer's latest series."
A Xilinx spokesperson has responded to the StarBleed vulnerability, explaining, "We have read the paper and have issued a security advisory to our customers addressing it, located here. The only proven way to perform the so-called “Starbleed” attack is to have close, physical access to the system."
The comment continues, "It is also important to recognize that when an adversary has close, physical access to the system there are many other threats to be concerned about. We advise all of our customers to design their systems with tamper protection such that close, physical access is difficult to achieve.”
Xilinx historically prides itself on its FPGA encryption, providing a host of resources to ensure the highest level of on-device security.
Staying One Step Ahead
Research such as this is vital to bettering hardware security. Ethical, reputable manufacturers such as Xilinx are grateful to rectify flaws discovered by researchers so they can be cataloged and corrected before the “bad guys” have a chance to exploit them.
Xilinx's pyramid of design security. Image used courtesy of Xilinx
While this specific issue will be most relevant to FPGA manufacturers, the lessons will be undoubtedly valuable to security specialists industry-wide.
Update: Since the publication of this article, Xilinx has responded to the StarBleed breach. A spokesperson's responses are now included in the article.
If you work with FPGAs, what are your top concerns when it comes to security? Share your thoughts in the comments below.