FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

FreeBSD -- jail_remove(2) fails to kill all jailed processes

Affected packages
12.2 <= FreeBSD-kernel < 12.2_4
11.4 <= FreeBSD-kernel < 11.4_8

Details

VuXML ID 31ad2f10-7711-11eb-b87a-901b0ef719ab
Discovery 2021-02-24
Entry 2021-02-25

Problem Description:

Due to a race condition in the jail_remove(2) implementation, it may fail to kill some of the processes.

Impact:

A process running inside a jail can avoid being killed during jail termination. If a jail is subsequently started with the same root path, a lingering jailed process may be able to exploit the window during which a devfs filesystem is mounted but the jail's devfs ruleset has not been applied, to access device nodes which are ordinarily inaccessible. If the process is privileged, it may be able to escape the jail and gain full access to the system.

References

CVE Name CVE-2020-25581
FreeBSD Advisory SA-21:04.jail_remove