FreeBSD jail_attach allows elevated privileges

freebsd-jailattach-gain-privileges (15344) The risk level is classified as HighHigh Risk


FreeBSD could allow users to bypass access control and obtain elevated privileges, caused by a vulnerability in the FreeBSD kernel. The jail_attach function fails to properly validate privileges. By changing the root directory, a local attacker with superuser privileges in a jailed environment, could gain unauthorized access to another jail.


Gain Privileges


For FreeBSD:
Upgrade to the latest version of FreeBSD (5.2.1-RELEASE or RELENG_5_2 dated after 2004-02-19 or RELENG_5_1 dated after 2004-02-25 or later), as listed in FreeBSD, Inc. Security Advisory FreeBSD-SA-04:03.jail. See References.


Apply the jail patch, as listed in FreeBSD Security Advisory FreeBSD-SA-04:03.jail. See References.


  • FreeBSD Security Advisory FreeBSD-SA-04:03.jail: Jailed processes can attach to other jails.
  • BID-9762: FreeBSD Unauthorized Jailed Process Attaching Vulnerability
  • CVE-2004-0126: The jail_attach system call in FreeBSD 5.1 and 5.2 changes the directory of a calling process even if the process doesn't have permission to change directory, which allows local users to gain read/write privileges to files and directories within another jail.
  • OSVDB ID: 4101: FreeBSD jail_attach() Privilege Escalation

Platforms Affected:

  • FreeBSD FreeBSD 5.1
  • FreeBSD FreeBSD 5.2


Feb 27, 2004

The information within this database may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. In no event shall the author/distributor (IBM Internet Security Systems X-Force) be held liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

For corrections or additions please email ignore thisxforceignore this@ignore thisus.ignore thisibm.comignore this

Return to the main page