Side-Channel Flaws Allow Exploits on Latest Linux Kernel

A recent study conducted by researchers at Graz University of Technology has revealed critical side-channel vulnerabilities in the latest Linux kernel defenses.

These flaws, stemming from Translation Lookaside Buffer (TLB) contention patterns, enable attackers to bypass memory randomization strategies and reliably exploit security-critical kernel objects.

The findings highlight significant risks in modern Linux kernels, particularly versions ranging from v5.15 to v6.8, and on Intel CPUs spanning the 8th to 14th generations.

The high-level overview of our work

Kernel Defenses Amplify Side-Channel Leaks

According to the Report, The study systematically analyzed 127 kernel defenses recommended by the Kernel Self-Protection Project (KSPP) and Google’s KernelCTF bug bounty program.

It identified three specific defenses strict memory permissions (CONFIG_STRICT_MODULE_RWX), virtualized kernel heap (CONFIG_SLAB_VIRTUAL), and virtualized kernel stack (CONFIG_VMAP_STACK) as introducing exploitable fine-grained TLB contention patterns.

These defenses, while intended to enhance security against memory corruption vulnerabilities, inadvertently expose the system to precise location disclosure attacks.

The researchers demonstrated that enabling these defenses changes the memory mapping of kernel objects from 2 MB pages to finer-grained 4 kB pages.

This alteration creates observable contention patterns in the TLB, which attackers can exploit using an Evict+Reload side-channel attack.

By strategically massaging kernel allocators, attackers can deduce the locations of critical kernel objects such as heap objects (e.g., msg_msg, pipe_buffer, cred), page tables, and stacks with high reliability.

Exploitation Techniques Enabled by Disclosure Attacks

The study showcased how these location disclosure attacks re-enable previously mitigated exploit techniques and introduce new ones.

For example:

  1. Unlink Primitive Exploits: Attackers can corrupt linked-list structures within kernel objects like pipe_buffer, enabling arbitrary read/write capabilities.
  2. Use-After-Free (UAF) and Out-of-Bounds (OOB) Write Exploits: Vulnerabilities leveraging UAF or OOB writes can be converted into powerful primitives for privilege escalation.
  3. Constrained Write Exploits: Even limited write primitives can be used to hijack control flow via kernel stack manipulation.

These techniques were tested on real hardware running Ubuntu with generic Linux kernels v6.8 and v6.6 (patched with CONFIG_SLAB_VIRTUAL).

The attacks achieved nearly 100% reliability with runtimes ranging from 0.3 seconds to 17.8 seconds.

While these defenses aim to mitigate exploitation risks, the study argues that their side-channel leakage undermines their effectiveness.

For instance, the virtualized kernel stack defense (CONFIG_VMAP_STACK), designed to prevent stack overflows, allows attackers to leak stack locations and perform reliable control-flow hijacking attacks.

The researchers warn that these vulnerabilities significantly increase the reliability of kernel exploits, making them more stable and less prone to crashes.

They also highlight broader implications for other kernel objects mapped with 4 kB pages, such as eBPF bytecode used for network filtering, which could be similarly exploited.

Addressing these vulnerabilities poses significant engineering challenges.

Potential solutions include redesigning memory allocators to avoid placing kernel objects in 4 kB mappings or introducing hardware-based mitigations like Intel’s upcoming Linear Address-Space Separation (LASS).

However, such measures may impact performance or require substantial architectural changes.

This research underscores a critical trade-off in modern kernel security: while defenses close one attack vector, they may inadvertently open another through side-channel leakage.

The findings call for a reevaluation of defense strategies in light of emerging exploitation techniques facilitated by TLB side channels.

Find this Story Interesting! Follow us on LinkedIn, and X to Get More Instant Updates

Mandvi
Mandvi
Mandvi is a Security Reporter covering data breaches, malware, cyberattacks, data leaks, and more at Cyber Press.

Recent Articles

Related Stories

LEAVE A REPLY

Please enter your comment!
Please enter your name here