PostgreSQL considers seccomp() filters
PostgreSQL considers seccomp() filters
Posted Oct 3, 2019 6:09 UTC (Thu) by cyphar (subscriber, #110703)In reply to: PostgreSQL considers seccomp() filters by mjg59
Parent article: PostgreSQL considers seccomp() filters
If the purpose would be stop malicious programs from doing something bad -- I think it would be more productive to just use mount namespaces and isolate away the rest of the filesystem entirely. Maybe you could make use of path-based filtering in combination with a read-only mount namespace, but I'm still not completely convinced.
If the purpose is to stop a trusted program from being tricked into operating on the wrong kinds of paths by an attacker, I think openat2 and the stuff I'm working on with libpathrs[1] (which takes advantage of existing tricks involving O_PATH and procfs) would be a better solution.