Users login

Create an account »

JOIN XATRIX

Users login

Home » Hacking News » FreeBSD-SA-02:37.kqueue

FreeBSD-SA-02:37.kqueue

by Nikola Strahija on August 6th, 2002 The kqueue mechanism allows a process to register interest in particular events on particular file descriptors, and receive asynchronous notification when these events occur on the selected descriptors.


II. Problem Description

If a pipe was created with the pipe(2) system call, and one end of the
pipe was closed, registering an EVFILT_WRITE filter on the other end
would cause a kernel panic.

A common scenario in which this could occur is when a process uses a
pipe to communicate with a child and uses kqueue to monitor the pipe,
and the child dies shortly after the fork(2) call, before the parent
has had time to register the filter.

III. Impact

A local attacker may cause the system to panic by executing their own
malicious application.

IV. Workaround

There is no known workaround.

V. Solution

The following patch has been verified to apply to FreeBSD 4.4, 4.5, and
4.6 systems.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:37/kqueue.patch
# fetch
ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:37/kqueue.patch.asc

b) Apply the patch.

# cd /usr/src
# patch and reboot the
system.

VI. Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.

Path Revision
Branch
- -------------------------------------------------------------------------
sys/kern/sys_pipe.c
RELENG_4 1.60.2.13
RELENG_4_6 1.60.2.12.2.1
RELENG_4_5 1.60.2.11.2.1
RELENG_4_4 1.60.2.10.2.1
- -------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iQCVAwUBPU8OFlUuHi5z0oilAQFTugP/S+2u/BK8Oz53oFTcTY84ReNRJZMEJ8dX
PVHMWZ7xl4stYoeo8iX+moq+R2riZqEfzT+lx1lYZBkYkkmIwGxI+6qJgBqkPriL
acswOhfdzLSgwIoXNJsGdO9vlYwsNqiRsf5Yay+gKDqRUxCPA27X528uc1jhtAdd
UzagA6Lhrk8=
=uTZC
-----END PGP SIGNATURE-----


Newsletter signup

Signup to our monthly newsletter and stay in touch with IT news!

Free E-books

We've got ebooks! But they're not online. :( Please give us a few days to bring downloads back.

Contact

Have something to say or just wanna drop us a line? Please keep this in mind: to spam, we reply with spam.

Contact us »