Multiple jail filesystem root escapes
FreeBSD
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| FreeBSD FreeBSD |
| No fix yet |
Original description
renameat(2) did not enforce FD_RESOLVE_BENEATH on its directory arguments. A jailed process could rename a directory relative to a restricted descriptor, then escape the jail root via fchdir(2). This requires the directory to reside on a filesystem that is also reachable from the jail's root.
A process in a jail that has received a directory file descriptor from another jail can use these techniques to escape the jail's filesystem root restriction.