FEX icon indicating copy to clipboard operation
FEX copied to clipboard

Library for path canonicalization

Open Sonicadvance1 opened this issue 5 years ago • 2 comments

With our rootfs implementation, we need to support path canonicalization with explicit support for the rootfs as the root directory. Then on top of that a regular canonicalize that treats / as a rootfs as well. This is required to support both so applications can't trick our path checking

eg: /proc/../cpuinfo would currently trick our emulation and get a real host `/proc/cpuinfo

eg: /usr/../../test.txt would escape the rootfs and load a test.txt in the same folder as the rootfs if one existed

Sonicadvance1 avatar Aug 25 '20 15:08 Sonicadvance1

At least one gvisor tests picks up this

skmp avatar Jan 22 '21 09:01 skmp

fwiw bubblewrap might be of use here - Flatpak can use it and qemu-user-static (or a binfmt_misc executable of your choice) to emulate non-native arches easily, and it runs at (as fast as possible/native) speeds.

orowith2os avatar Jul 21 '23 05:07 orowith2os