Вход на сайт

Просмотр новости

Найдите то, что Вас интересует

Linux 7.2-rc2 BPF Code Being Hardened Against JIT Spraying Attacks

Дата публикации: 03-07-2026 10:49:59

Some post-merge-window code changes merged overnight ahead of Linux 7.2-rc2 this weekend is hardening the kernel's BPF code against JIT spraying attacks...

Основное содержимое страницы с новостью.

LINUX KERNEL

Some post-merge-window code changes merged overnight ahead of Linux 7.2-rc2 this weekend is hardening the kernel's BPF code against JIT spraying attacks.

A bit peculiar coming post-merge-window and not clear if motivated by recent security discoveries, but the Linux kernel's BPF code is now seeing hardening to held fend off JIT spraying attacks. At the same time, surprising the Linux BPF code wasn't already hardened against JIT spraying attacks.

Intel engineer Pawan Gupta landed this patch to support hardening BPF against JIT spraying:

"The BPF JIT allocator packs many small programs into larger executable allocations and reuses space within those allocations as programs are loaded and freed. When fresh code is written into space that a previous program occupied, an indirect jump into the new program can reuse a branch prediction left behind by the old one.

Flush the indirect branch predictors before reusing JIT memory so that indirect jumps into a newly written program don't reuse predictions from an old program that occupied the same space.

Introduce bpf_arch_pred_flush_enabled static key and bpf_arch_pred_flush static call for flushing the branch predictors on JIT memory reuse. Architectures that need a flush, can update it to a predictor flush function. By default, its a NOP and does not emit any CALL.

Allocations larger than a pack are not covered by this flush. That is safe because cBPF programs (the unprivileged attack surface) are bounded well below a pack size. Issue a warning if this assumption is ever violated while the flush is active."

Beyond that is another partch also by Intel's Pawan Gupta to enable Indirect Branch Predictor Barrier (IBPB) flushes on BPF JIT allocations:

"Enable hardening against JIT spraying when Spectre-v2 mitigations are in use. Specifically, issue an IBPB flush on BPF JIT memory reuse. Skip enabling the IBPB flush if the BPF dispatcher is already using a retpoline sequence.

This hardening applies only when BPF-JIT is in use. Guard the enabling under CONFIG_BPF_JIT so that bugs.c still builds with CONFIG_BPF_JIT=n."

This BPF JIT hardening work is now merged to Linux Git and will be part of the Linux 7.2-rc2 release on Sunday.

Схожие новости

#Наименование новостиТональностьИнформативностьДата публикации
1Linux 7.2-rc2 Raising The Default RISC-V 64-bit CPU Limit To 256 Cores0504-07-2026
2Linux 7.2-rc4 drops with critical fixes for gaming handhelds, Wi-Fi, and car systems0720-07-2026
3Linux 7.3 Adding More Graphics PCI IDs For Intel Nova Lake S0504-07-2026
4Linux DRM Scheduler Patches Yield Massive Improvement For Job Submission Latency7804-07-2026
5Intel Prepares More Nova Lake Graphics/Display Enablement For Linux 7.30703-07-2026
6Линус Торвальдс выпустил Linux 7.2-rc3 с патчами для Dreamcast и RISC-V0713-07-2026
7Rocky Linux ruby Important Command Injection Threat RLSA-2026-335140530-06-2026
8Hardening Linux KVM Against VM Escape Attacks0707-07-2026
9Rocky Linux git-lfs Major Privilege Escalation Patch RLSA-2026-308540701-07-2026
10В Linux 7.2 улучшили EROFS для разреженных AI-датасетов и эффективного ввода-вывода0725-06-2026

Классификация: Информация. Схожих патентов: 0. Схожих новостей: 10. Тональность: 0. Информативность: 5. Источник: www.phoronix.com.