VeriFence: Lightweight and Precise Spectre Defenses for Untrusted Linux Kernel Extensions

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Gerhorst, Luis, Herzog, Henriette, Wägemann, Peter, Ott, Maximilian, Kapitza, Rüdiger, Hönig, Timo
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916556507709440
author Gerhorst, Luis
Herzog, Henriette
Wägemann, Peter
Ott, Maximilian
Kapitza, Rüdiger
Hönig, Timo
author_facet Gerhorst, Luis
Herzog, Henriette
Wägemann, Peter
Ott, Maximilian
Kapitza, Rüdiger
Hönig, Timo
contents High-performance IO demands low-overhead communication between user- and kernel space. This demand can no longer be fulfilled by traditional system calls. Linux's extended Berkeley Packet Filter (BPF) avoids user-/kernel transitions by just-in-time compiling user-provided bytecode and executing it in kernel mode with near-native speed. To still isolate BPF programs from the kernel, they are statically analyzed for memory- and type-safety, which imposes some restrictions but allows for good expressiveness and high performance. However, to mitigate the Spectre vulnerabilities disclosed in 2018, defenses which reject potentially-dangerous programs had to be deployed. We find that this affects 31% to 54% of programs in a dataset with 844 real-world BPF programs from popular open-source projects. To solve this, users are forced to disable the defenses to continue using the programs, which puts the entire system at risk. To enable secure and expressive untrusted Linux kernel extensions, we propose VeriFence, an enhancement to the kernel's Spectre defenses that reduces the number of BPF application programs rejected from 54% to zero. We measure VeriFence's overhead for all mainstream performance-sensitive applications of BPF (i.e., event tracing, profiling, and packet processing) and find that it improves significantly upon the status-quo where affected BPF programs are either unusable or enable transient execution attacks on the kernel.
format Preprint
id arxiv_https___arxiv_org_abs_2405_00078
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle VeriFence: Lightweight and Precise Spectre Defenses for Untrusted Linux Kernel Extensions
Gerhorst, Luis
Herzog, Henriette
Wägemann, Peter
Ott, Maximilian
Kapitza, Rüdiger
Hönig, Timo
Cryptography and Security
Operating Systems
68M25
D.4.6
High-performance IO demands low-overhead communication between user- and kernel space. This demand can no longer be fulfilled by traditional system calls. Linux's extended Berkeley Packet Filter (BPF) avoids user-/kernel transitions by just-in-time compiling user-provided bytecode and executing it in kernel mode with near-native speed. To still isolate BPF programs from the kernel, they are statically analyzed for memory- and type-safety, which imposes some restrictions but allows for good expressiveness and high performance. However, to mitigate the Spectre vulnerabilities disclosed in 2018, defenses which reject potentially-dangerous programs had to be deployed. We find that this affects 31% to 54% of programs in a dataset with 844 real-world BPF programs from popular open-source projects. To solve this, users are forced to disable the defenses to continue using the programs, which puts the entire system at risk. To enable secure and expressive untrusted Linux kernel extensions, we propose VeriFence, an enhancement to the kernel's Spectre defenses that reduces the number of BPF application programs rejected from 54% to zero. We measure VeriFence's overhead for all mainstream performance-sensitive applications of BPF (i.e., event tracing, profiling, and packet processing) and find that it improves significantly upon the status-quo where affected BPF programs are either unusable or enable transient execution attacks on the kernel.
title VeriFence: Lightweight and Precise Spectre Defenses for Untrusted Linux Kernel Extensions
topic Cryptography and Security
Operating Systems
68M25
D.4.6
url https://arxiv.org/abs/2405.00078