lockc-project / lockc

Making containers more secure with eBPF and Linux Security Modules (LSM)
https://lockc-project.github.io/
Apache License 2.0
218 stars 19 forks source link

Apply `sb_mount` policy only on BTRFS #224

Closed vadorovsky closed 1 year ago

vadorovsky commented 1 year ago

Container runtimes use bind mounts on BTRFS filesystems, so tracking the source directory is trivial - it's provided in the dev_name argument. However, it's not that easy with overlayfs - in that case, dev_name is overlay and the source path is provided in options, which end up in the data argument.

Checking the data argument (of type *void with the page size) is trickier and requires more work.