-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

=============================================================================
FreeBSD-EN-15:17.libc                                           Errata Notice
                                                          The FreeBSD Project

Topic:          libc incorrectly handles signals for multi-threaded processes

Category:       core
Module:         libc
Announced:      2015-09-16
Credits:        Konstantin Belousov
Affects:        FreeBSD 10.2
Corrected:      2015-09-05 08:55:51 UTC (stable/10, 10.2-STABLE)
                2015-09-16 20:59:41 UTC (releng/10.2, 10.2-RELEASE-p3)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit
<URL:https://security.freebsd.org/>.

I.   Background

The FreeBSD libc library is the core C runtime library which implements
the ANSI C, POSIX APIs and BSD extensions for applications on top of the
FreeBSD kernel.  The internal operations of libc change when the threading
library is loaded, ensuring service implementations are operational in
multi-threaded environments, while avoiding unnecessary overhead for
applications not utilizing threads.  The implementation of some services
is delegated to the threading library, for instance, the signal management.

II.  Problem Description

Signal-related services, such as signal(3), sigprocmask(2), and sigwait(2)
are not properly redirected to the threading library implementation when
used by libc directly.

III. Impact

The full impact of the bug is difficult to enumerate precisely based on the
nature of the problem, though some visible effects include runtime linker
hang during signal delivery, and delivery of a signal to the application
at an unexpected time.

IV.  Workaround

No workaround is available.

V.   Solution

Perform one of the following:

1) Upgrade your system to a supported FreeBSD stable or release / security
branch (releng) dated after the correction date.

2) To update your present 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

3) To update your present 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/EN-15:17/libc.patch
# fetch https://security.FreeBSD.org/patches/EN-15:17/libc.patch.asc
# gpg --verify libc.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.

Reboot the system.

VI.  Correction details

The following list contains the correction revision numbers for each
affected branch.

Branch/path                                                      Revision
- -------------------------------------------------------------------------
stable/10/                                                        r287480
releng/10.2/                                                      r287872
- -------------------------------------------------------------------------

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:

<URL:https://svnweb.freebsd.org/base?view=revision&revision=NNNNNN>

VII. References

The latest revision of this Errata Notice is available at
https://security.FreeBSD.org/advisories/FreeBSD-EN-15:17.libc.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.1.8 (FreeBSD)

iQIcBAEBCgAGBQJV+dppAAoJEO1n7NZdz2rnKb8P/1D1VyY3WoenCbDAx/diaqpf
yFV5ncQBF2yQ+ADJ9WcGVmVqx4AjP56a2PGZ0YaEG/wUbqrfdzABfA+phr+tIm65
7QaNcPFSnvtGUH28hXkGT4sf4tpb2H/dD3eGTz4a8Fp8KbDcnYyg0kvOlBo1m7l7
kfPt0fBH9yn5nf36mI6hD7SsajLnh92pvHG0tIlojDDU34zgrqA408BV7nWM8tvf
jZxS7dLm0ZXUnlwXohwuESqT+GTsANjIv8pldWLxBAN+0qJ6+ZMvhgknkN9pu42D
Zi/Hb/C/g6HmeglXbHvAbFzdLLfcduY3B469CuPPYwm7qVmkJvsbsyj+Tq/OtswX
r50fFALF3LcRVzuRwRXDUciXufw0AdBNMCykl0kfai2r2R1CHvtfGC2bLyZoRk21
1Kr/uh/eMqBs6OyW14ASfB6jOtjInYnVMYyjNeo75qUYOj7z5ybieNfM5X1kNfs1
7Qckinr0bW9o2MMAj4bewJ6KkLlN1YAQqa3lx4JipFz/jut/9L1XWzsJMYNT7N7J
G/qOBGjoH1lF56VvtngOVYTOdsxdZfu0s8KweH8SyzZHsnf7jHeHinp/ECo36hR6
+xQQO01w97xQLlKx5P0uODQb3aXMpfS3SjmSbGuAu60bXw74oMBeLlkSXR3t5DT+
nw53+Y2BwV4yWz//iacR
=lA5q
-----END PGP SIGNATURE-----