DOI QR코드

DOI QR Code

Understanding The Role of Smart Pointers in the Rust Memory

Rust 언어 메모리 안전 모델에서 스마트 포인터의 역할에 대한 연구

  • Martin Kayondo (Dept. of Electrical and Computer Engineering and Inter-University Semiconductor Research Center(ISRC), Seoul National University) ;
  • Inyoung Bang (Dept. of Electrical and Computer Engineering and Inter-University Semiconductor Research Center(ISRC), Seoul National University) ;
  • Yunheung Paek (Dept. of Electrical and Computer Engineering and Inter-University Semiconductor Research Center(ISRC), Seoul National University)
  • Published : 2023.05.18

Abstract

Rust has gained popularity as a memory safe systems programming language. At the center of its memory safety is a strict memory ownership model with stringent rules enforced by the compiler. This paper aims to shed light on this memory safety model and the role smart pointers play towards its success. We study specific smart pointers, their purposes and contribution to Rust's memory safety. We further explore weaknesses of these smart pointers and their APIs, and provide scenarios under which they may lead to memory vulnerabilities in Rust programs.

Keywords

Acknowledgement

This work was supported by the National Information Society Agency, funded by the Ministry of Science and ICT in 2023 (No. 2021-0-00528), to develop standard protocols for hardware-based trusted computing and distributed data protection platforms.