umoci icon indicating copy to clipboard operation
umoci copied to clipboard

security: switch from SecureJoin to libpathrs

Open cyphar opened this issue 7 years ago • 2 comments

I'm currently working with upstream kernels to allow for safe, race-free protection against escapes with O_THISROOT. It's a fairly powerful mechanism which should entirely remove the need for securejoin.SecureJoin.

However since it's not merged yet (and we'd have to support older kernels anyway) we need to add some additional hardening to verify that SecureJoin paths don't become unsafe after their creation. In particular we can do this by checking the readlink of /proc/self/fd/$fd when we open a file -- though we'd need to add some additional complications like opening it O_PATH and similar fun things like that.

EDIT: The new project is called https://github.com/openSUSE/libpathrs.

cyphar avatar Nov 13 '18 05:11 cyphar

Depends on openSUSE/libpathrs#3 and god knows how many more things.

cyphar avatar Dec 30 '19 04:12 cyphar