FreeBSD POSIX shm Globally Shared Namespace May Let Local Users Deny Service or Gain Elevated Privileges
SecurityTracker Alert ID: 1039810|
SecurityTracker URL: http://securitytracker.com/id/1039810
(Links to External Site)
Date: Nov 16 2017
Denial of service via local system, User access via local system|
Fix Available: Yes Vendor Confirmed: Yes |
Version(s): 10.3, 10.4|
A vulnerability was reported in FreeBSD. A local user can cause denial of service conditions on the target system. A local user can obtain elevated privileges on the target system.|
A local user in a jailed system can specify a named path via shm_open(2) to modify the contents of POSIX shared memory objects created by a process in another jail. If a process in the other jail uses the shared memory, a local user may be able to exploit this to cause denial of service conditions or gain elevated privileges on the target system.
Whitewinterwolf reported this vulnerability.
A local user can cause denial of service conditions on the target system.|
A local user can obtain elevated privileges on the target system.
FreeBSD has issued a fix.|
The FreeBSD advisory is available at:
Vendor URL: security.FreeBSD.org/advisories/FreeBSD-SA-17:09.shm.asc (Links to External Site)
Access control error|
Source Message Contents
Subject: FreeBSD Security Advisory FreeBSD-SA-17:09.shm|
-----BEGIN PGP SIGNED MESSAGE-----
FreeBSD-SA-17:09.shm Security Advisory
The FreeBSD Project
Topic: POSIX shm allows jails to access global namespace
Affects: FreeBSD 10.x
Corrected: 2017-11-13 23:21:17 UTC (stable/10, 10.4-STABLE)
2017-11-15 22:45:50 UTC (releng/10.4, 10.4-RELEASE-p3)
2017-11-15 22:45:13 UTC (releng/10.3, 10.3-RELEASE-p24)
CVE Name: CVE-2017-1087
For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit <URL:https://security.FreeBSD.org/>.
POSIX shared memory objects allow realtime inter-process communication by
sharing a memory area through the use of a named path (see shm_open(2)).
This is used by some multi-process applications to share data between running
processes, such as a common cache or to implement a producer-consumer model
where several worker processes handle requests pushed by a producer process.
II. Problem Description
Named paths are globally scoped, meaning a process located in one jail can
read and modify the content of POSIX shared memory objects created by a
process in another jail or the host system.
A malicious user that has access to a jailed system is able to abuse shared
memory by injecting malicious content in the shared memory region. This
memory region might be executed by applications trusting the shared memory,
This issue could lead to a Denial of Service or local privilege escalation.
No workaround is available, but systems without jails or jails not having
local users are not vulnerable.
1) Upgrade your vulnerable system to a supported FreeBSD stable or
release / security branch (releng) dated after the correction date.
Reboot the system for the update to take effect.
2) To update your vulnerable system via a binary patch:
Systems running a RELEASE version of FreeBSD on the i386 or amd64
platforms can be updated via the freebsd-update(8) utility:
# freebsd-update fetch
# freebsd-update install
Reboot the system for the update to take effect.
3) 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.
[FreeBSD 10.4, FreeBSD 10-STABLE]
# fetch https://security.FreeBSD.org/patches/SA-17:09/shm-10.patch
# fetch https://security.FreeBSD.org/patches/SA-17:09/shm-10.patch.asc
# gpg --verify shm-10.patch.asc
# fetch https://security.FreeBSD.org/patches/SA-17:09/shm-10.3.patch
# fetch https://security.FreeBSD.org/patches/SA-17:09/shm-10.3.patch.asc
# gpg --verify shm-10.3.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
<URL:https://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the
VI. Correction details
The following list contains the correction revision numbers for each
To see which files were modified by a particular revision, run the
following command, replacing NNNNNN with the revision number, on a
machine with Subversion installed:
# svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base
Or visit the following URL, replacing NNNNNN with the revision number:
The latest revision of this advisory is available at
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "email@example.com"