Copyright 2022 - CSIM - Asian Institute of Technology

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Subject: [FreeBSD-Announce] FreeBSD Errata Notice FreeBSD-EN-19:05.kqueue
From: FreeBSD Errata Notices <This email address is being protected from spambots. You need JavaScript enabled to view it.>
Date: Wed, 9 Jan 2019 19:40:30 +0000 (UTC)

Hash: SHA512

FreeBSD-EN-19:05.kqueue                                         Errata Notice
                                                          The FreeBSD Project

Topic:          kqueue race condition and kernel panic

Category:       core
Module:         kqueue
Announced:      2019-01-09
Credits:        Mark Johnston
Affects:        FreeBSD 11.2
Corrected:      2019-11-24 17:11:47 UTC (stable/11, 11.2-STABLE)
                2019-01-09 18:57:38 UTC (releng/11.2, 11.2-RELEASE-p8)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit

I.   Background

kevent(2) is a system call which provides a generic method of notifying the
caller when a caller-specified event happens or a condition holds.  One use
for kevent(2) is to wait for a specified timeout to elapse.

II.  Problem Description

The kevent(2) implementation in the kernel contains a race condition which
can be triggered when an event is added and fires shortly after.  Most event
types are not affected, but timer events can trigger the race if the timeout
duration is very short.

III. Impact

The race condition can cause corruption of a queue structure, leading to
a kernel panic when it is later accessed.  Applications using kevent(2) may
trigger the panic if their usage causes the race condition to occur.

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, and reboot.

2) To update your 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
# shutdown -r +30 "Rebooting for errata update"

3) To update your 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 11.2]
# fetch
# fetch
# gpg --verify kqueue.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:> and reboot the

VI.  Correction details

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

Branch/path                                                      Revision
- -------------------------------------------------------------------------
stable/11/                                                        r340904
releng/11.2/                                                      r342899
- -------------------------------------------------------------------------

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://

Or visit the following URL, replacing NNNNNN with the revision number:


VII. References

The latest revision of this advisory is available at

This email address is being protected from spambots. You need JavaScript enabled to view it. mailing list
To unsubscribe, send any mail to "This email address is being protected from spambots. You need JavaScript enabled to view it."

Powered by: MHonArc

Login Form


School of Engineering and technologies     Asian Institute of Technology