3 ms·
I agree that they complement each other. Pledge isn't an evolution of chroot, it's an evolution of chroot jails. And I meant evolution in the sense of continuin
by wahern 10y ago
I agree that they complement each other. Pledge isn't an evolution of chroot, it's an evolution of chroot jails. And I meant evolution in the sense of continuing the approach of implementation centric, non-policy-based security limits orchestrated by the developer, not the system administrator in terms of access to logical resources. Capsicum is also similar in that respect.
And I meant solution in the sense that it's a solution to limiting namespace visibility and visibility of vulnerable software interfaces. It's not a security "solution" in the sense of it guarantees, on its own complete safety. Security is a process, not a product. But in distinction to containers it is a security solution, just like a gun is a self-defense solution. Whereas containers are no more a security solution than metallurgy is a self-defensive solution. A container by itself doesn't limit anything, where as a chroot jail, however imperfectly done, does create a concrete a defensive posture by its very nature. Just like ASLR despite ROP attacks.
I should have been more careful in making those distinctions. It's especially important because chroot jails are something of a hack given the origin and original purpose of the chroot syscall, which leaves it open to lazy criticism. But it's still an effective hack as far as its limits go. Criticisms of chroot jails, and discussion of exploits, usually boil down to not properly creating the chroot jail, not because there's no way to ever create the chroot.
That it can be difficult to create the jail properly and to keep from breaking it later on as an application becomes more complex, such as by accidentally keeping a directory descriptor open across the jail creation, or mounting /proc, is a valid criticism. But as you say it's not as difficult as people make it seem. Setting up seccomp jails isn't trivial, either. With chroot, seccomp, SELinux, and any security method it's always going to be the case that some innocuous-seeming capability or resource preserved out of convenience turned out to be a portal for breaking out of the jail. And convenience is always a concern, otherwise we'd always limit processes to nothing but read(2) and write(2), sort of like the original seccomp that few people could make practical use of.