In the upcoming release of Fedora Linux 45, scheduled for autumn 2026, it is planned to enable the use of shadow stack by default on x86_64 systems to block exploits that overwrite function return addresses in case of a stack buffer overflow. The protection is intended to be activated for all applications and libraries compiled using gcc (C, C++), clang (C, C++) and rustc (Rust). This plan has not yet been approved by the FESCo (Fedora Engineering Steering Committee), which is responsible for the technical development of Fedora Linux. The initiative to include shadow stack in Fedora comes from Arjun Shankar of Red Hat, who maintains the glibc packages in Fedora and RHEL.
The protection is implemented using the hardware capabilities of processors and involves the fact that after control is transferred to a function, return addresses are saved by the processor not only in the regular stack but also in a separate 'shadow' stack, which cannot be directly modified. Before exiting the function, the return address is extracted from the shadow stack and compared with the return address from the main stack. A mismatch in addresses leads to the generation of an exception, blocking situations where an exploit managed to overwrite the address in the main stack. The shadow stack mechanism is supported starting from the 11th generation of Intel processors ('Tiger Lake' and 'Rocket Lake') and the Zen3 microarchitecture in AMD processors.
Bron: opennet.ru
