-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
=============================================================================
FreeBSD-SA-24:02.tty Security Advisory
The FreeBSD Project
Topic: jail(2) information leak
Category: core
Module: jail
Announced: 2024-02-14
Credits: Pawel Jakub Dawidek
Affects: All supported versions of FreeBSD.
Corrected: 2024-02-12 16:25:54 UTC (stable/14, 14.0-STABLE)
2024-02-14 06:05:46 UTC (releng/14.0, 14.0-RELEASE-p5)
2024-02-12 16:27:37 UTC (stable/13, 13.3-STABLE)
2024-02-14 06:06:01 UTC (releng/13.2, 13.2-RELEASE-p10)
CVE Name: CVE-2024-25941
For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit .
I. Background
The jail(2) system call allows a system administrator to lock a process
and all of its descendants inside an environment with a very limited
ability to affect the system outside that environment, even for
processes with superuser privileges. It is an extension of, but
far more powerful than, the traditional UNIX chroot(2) system call.
tty(4) is a general terminal device.
II. Problem Description
The jail(2) system call has not limited a visiblity of allocated TTYs
(the kern.ttys sysctl). This gives rise to an information leak about
processes outside the current jail.
III. Impact
Attacker can get information about TTYs allocated on the host or in other
jails. Effectively, the information printed by "pstat -t" may be leaked.
IV. Workaround
No workaround is available.
V. Solution
Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date
and reboot.
Perform one of the following:
1) To update your vulnerable system via a binary patch:
Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms,
or the i386 platform on FreeBSD 13, can be updated via the freebsd-update(8)
utility:
# freebsd-update fetch
# freebsd-update install
# shutdown -r +10min "Rebooting for a security update"
2) To update your vulnerable system via a source code patch:
The following patches have been verified to apply to the applicable
FreeBSD release branches.
a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.
# fetch https://security.FreeBSD.org/patches/SA-24:02/tty.patch
# fetch https://security.FreeBSD.org/patches/SA-24:02/tty.patch.asc
# gpg --verify tty.patch.asc
b) Apply the patch. Execute the following commands as root:
# cd /usr/src
# patch < /path/to/patch
c) Recompile your kernel as described in
and reboot the
system.
VI. Correction details
This issue is corrected as of the corresponding Git commit hash in the
following stable and release branches:
Branch/path Hash Revision
- -------------------------------------------------------------------------
stable/14/ 215bb03edc54 stable/14-n266676
releng/14.0/ 4d354159d150 releng/14.0-n265407
stable/13/ 9bff7ec98354 stable/13-n257418
releng/13.2/ 17257e6e9a23 releng/13.2-n254658
- -------------------------------------------------------------------------
Run the following command to see which files were modified by a
particular commit:
# git show --stat
Or visit the following URL, replacing NNNNNN with the hash:
To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:
# git rev-list --count --first-parent HEAD
VII. References
The latest revision of this advisory is available at
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEthUnfoEIffdcgYM7bljekB8AGu8FAmXMY8YACgkQbljekB8A
Gu8vuQ//VNUQjTgpzQhgctLldORwlkshwsHjGgGYdnQqidPk7gznBEHsngKUgZdx
ocXJ/IkDrzUJ3djm+5qa/3c1sCFrKXV77vtOsVU53SSgbCJdtGi40uE4TXFtPzjQ
otdGqQtgzxspx9Z2oJkBqugmfdcMXiE4+FQBTuvkCS0xAoMBcP1iVoXBQCPyWe8b
xGZ/ZDznso+75//Eaj1Szgsh4lZi5M11vDeFKpH4pO3f2O0f/ge1Wtju8EaE0zJQ
cLPCcJTRPXMUnpYt97dCeHgeNoXfjtDSf2XJGl86z1QZ4OBx2VNcpalF6YZtUxAx
LJh5hwXXbLgknSHVctqCecaMz+D7xSX2/pxkjbFflBeZznIJJkmQjStUSUE5Ldad
O8lfcDe5ZmhVWD9o05ccqr8pa2EBkeSL5hDLyatVA3T7UxRlZpfaPnnvvglen1kI
WJo3ciUMp/iSuFp6Dpy/zg5S7DYc5MM3ifWDW5Sd5X2jvuTDAhz98U0gTtKD8BuB
RyGkL46bHculeQO7c4Q/Cd//4h/VOmGpj54ag8sJS6AZ515j1OVmxeFwmNClR2VK
SHbEP8B/vRI8ek1Ja1CY8RghFJ/v9qkntapfpmP7NLDqgKe1htqDz4KHR12NUQjE
hUHAkOJ8bFS+lJG0lrci2gfmmAUQTh5csw0GA4QEUH0nHLRqW/Y=
=dMqk
-----END PGP SIGNATURE-----