Intel MPX


Intel MPX is a set of extensions to the x86 instruction set architecture. With compiler, runtime library and operating system support, Intel MPX claimed to enhance security to software by checking pointer references whose normal compile-time intentions are maliciously exploited at runtime due to buffer overflows. In practice, there have been too many flaws discovered in the design for it to be useful, and support has been deprecated or removed from most compilers and operating systems.

Extensions

Intel MPX introduces new bounds registers, and new instruction set extensions that operate on these registers. Additionally, there is a new set of "bound tables" that store bounds beyond what can fit in the bounds registers.
MPX uses four new 128-bit bounds registers, BND0 to BND3, each storing a pair of 64-bit lower bound and upper bound values of a buffer. The upper bound is stored in ones' complement form, with BNDMK and BNDCU performing the conversion. The architecture includes two configuration registers BNDCFGx, and a status register BNDSTATUS, which provides a memory address and error code in case of an exception.
Two-level address translation is used for storing bounds in memory. The top layer consists of a Bounds Directory created on the application startup. Each BD entry is either empty or contains a pointer to a dynamically created Bounds Table, which in turn contains a set of pointer bounds along with the linear addresses of the pointers. The bounds load and store instructions transparently perform the address translation and access bounds in the proper BT entry.
Intel MPX was introduced as part of the Skylake microarchitecture.
Intel Goldmont microarchitecture also supports Intel MPX.

Software support

A study examined a detailed cross-layer dissection of the MPX system stack and comparison with three prominent software-based memory safety systems and presents the following conclusions.
In addition, a review concluded MPX was not production ready, and AddressSanitizer was a better option. A review by Kostya Serebryany at Google, AddressSanitizer's developer, had similar findings.

Meltdown

Another study exploring the scope of Spectre and Meltdown security vulnerabilities discovered that Meltdown can be used to bypass Intel MPX, using the Bound Range Exceeded hardware exception. According to their publication, the researchers were able to leak information through a Flush+Reload covert channel from an out-of-bound access on an array safeguarded by the MPX system. Their Proof Of Concept has not been publicly disclosed.