trussed-dev / trussed

Modern Cryptographic Firmware

Home Page:https://trussed.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Restrict file paths for FilesystemClient syscalls

robin-nitrokey opened this issue · comments

All functions in FilesystemClient should make sure that the client does not escape its dat namespace.

pub fn actual_path(&self, client_path: &PathBuf) -> PathBuf {
let mut path = PathBuf::new();
path.push(&self.client_id);
path.push(&PathBuf::from("dat"));
path.push(client_path);
path
}