[연구] 이호준교수 연구실, 학술대회 (USENIX SEC) 게재승인 소식
- 소프트웨어융합대학
- 조회수925
- 2023-12-11
시스템보안 연구실 (지도교수 이호준, https://sslab.skku.edu)의 조규원(박사과정), 김종윤(박사과정), Dinh Duy Kha(박사과정), 임하정(박사과정) 의 "RustSan: Retrofitting AddressSanitizer for Efficient Sanitization of Rust" 논문이 보안분야 4대 학회 중 하나인 USENIX Security Symposium 2024에 게재 승인되어 2024년 8월에 발표될 예정입니다.
오늘날 Rust는 C/C++과 비슷한 성능을 가지면서도 안전한 시스템 프로그래밍 언어로 주목받고 있습니다. 그러나 unsafe Rust라는 기능의 존재와 이를 활용하는 많은 프로그램들로 인하여 아직 여전히 메모리 버그가 발생할 수 있기에, 따라서 퍼징과 같은 소프트웨어 테스팅 기법들이 여전히 필요합니다. 본 논문에서는 메모리 버그 탐지의 state-of-the-art 기술인 Address Sanitizer(ASan)가 C/C++에 초점을 맞추어 설계되어 있고, Rust의 특징을 전혀 반영하지 못하여 불필요한 높은 성능 오버헤드가 발생한다는 문제점을 설명합니다. 이 논문에서는 Rust의 특징들을 반영해 표준 탐지기술인 ASan을 최적화하고 불필요한 오버헤드를 제거하는 RustSan이라는 소프트웨어 메모리 오류 탐지기술 (Sanitizer)을 제시합니다. RustSan은 이를 위하여 Rust 코드의 더 정확한 분석을 위해 Rust MIR/HIR과 LLVM IR 병행을 분석하는 Cross-IR Analysis를 도입했으며, ASan의 shadow memory scheme의 binary한 탐지 기능을 확장하여, Rust에 적합한 tri-state 탐지 기능을 도입했습니다.
RustSan은 총 57개의 Rust 프로그램들에 대하여 탐지 능력과 런타임 성능을 검증하였습니다. 테스트된 31개의 CVE부여 취약점을 모두 성능저하를 획기적으로 줄이면서 탐지하는데 성공하였고, 성능은 기존 표준기술 ASan대비 일반 프로그램 벤치마크 20종에서 평균 63.3%, Fuzzing 벤치마크에서 평균 23.52%/최고 57.08%의 성능향상을 보여주었습니다. RustSan은 최초의 Rust언어특화 메모리 오류 탐지기술로, 앞으로 Rust프로그램의 메모리 오류 검출을 훨씬 효율적으로 할수 있는 방향을 제시하였습니다.
영문 Abstract:
Rust is gaining traction as a safe systems programming language with its strong type and memory safety guarantees. However, Rust’s guarantees are not infallible. The use of unsafe Rust, a subvariant of Rust, allows the programmer to temporarily escape the strict Rust language semantics to trade security for flexibility. Memory errors within unsafe blocks in Rust have far-reaching ramifications for the program’s safety. As a result, the conventional dynamic memory error detection (e.g., fuzzing) has been adapted as a common practice for Rust and proved its effectiveness through a trophy case ofdiscovered CVEs.
RustSan is a retrofitted design of AddressSanitizer(ASan) for efficient dynamic memory error detection of Rust programs. Our observation is that a significant portion of instrumented memory access sites in a Rust program compiled with ASan is redundant, as the Rust security guarantees can still be valid at the site. RustSan identifies and instruments the sites that definitely or may undermine Rust security guarantees while lifting instrumentation on safe sites. To this end, RustSan employs a cross-IR program analysis for accurate tracking of unsafe sites and also extends ASan’s shadow memory scheme for checking non-uniform memory access validation necessary for Rust. We conduct a comprehensive evaluation of RustSan in terms of detection capability and performance using 57 Rust crates. RustSan successfully detected all 31 tested cases of CVE-issued memory errors. Also, RustSan shows an average of 62.3% performance increase against ASan in general benchmarks that involved 20 Rust crates. In the fuzzing experiment with 6 crates, RustSan marked an average of 23.52%, and up to 57.08% of performance improvement.