Rustで記述されたLinuxカーネルドライバの安全性検査に向けて

書誌事項

タイトル別名
  • Towards the Safety Checking of Linux Kernel Drivers Written in Rust

抄録

Rustは,メモリ安全で効率の良いプログラミングが実現できることを標榜するプログラミング言語である.OSやWebブラウザ等の基盤システムにおいて,その採用が広がっている.特に,Linux 6.1以降,Rustで書かれたカーネルモジュールが利用できるようになった.本論文では,将来的にRustでカーネルモジュールが記述されるようになった時代でも潜む脅威について議論する.まず,Rustにおける所有権と借用の概念を確認し,Rustが保証する安全性とその仮定を整理する.これらの仮定は,Rustにおけるunsafeコードが満たすべき条件を与える.具体例として,Rust-for-Linuxプロジェクトで試験実装されているNVMeドライバを題材に,検査を行った結果を報告する.また,unsafeコードを使わなくとも,提供されたRust側のインターフェイスのみを利用して,メモリ脆弱性を残してしまう危険性があることも示す.

Rust is one of programming languages advocating to realize memory-safety and memory-efficient programming. It has been adopted in several important foundation system such as OS and Web browsers. Linux kernel since version 6.1 supports to load kernel modules written in Rust. In this paper, in foreseeable future such that many Linux kernel modules are written in Rust, we reveal what kind of vulnerabilities may be contained in such Rust kernel modules. We review the ownership and borrowing of Rust, then clarify the safety ensured by Rust and its assumptions. These assumptions gives some of conditions for Rust unsafe code to satisfy.As an example, we will check the experimental NVMe driver proposed by the Rust for Linux project, and report some results. We found a risk that some kind of memory vulnerabilities will be left as only using safely provided Rust interface without any unsafe code.

収録刊行物

詳細情報 詳細情報について

問題の指摘

ページトップへ