-----BEGIN PGP SIGNED MESSAGE-----
AUSCERT External Security Bulletin Redistribution
ESB-2000.115 -- NetBSD Security Advisory 2000-004
SysV semaphore denial-of-service
01 June 2000
AusCERT Security Bulletin Summary
Product: NetBSD kernel
Operating System: NetBSD
Impact: Denial of Service
Access Required: Local
- --------------------------BEGIN INCLUDED TEXT--------------------
- -----BEGIN PGP SIGNED MESSAGE-----
NetBSD Security Advisory 2000-004
Topic: SysV semaphore denial-of-service
Version: all prior to 2000/05/27
Severity: minor (local denial of service to programs using the
rarely-used semaphore facility)
An undocumented system call permits any user process to lock up the
entire semaphore subsystem, preventing processes using semaphores from
locking or unlocking them, and preventing processes holding semaphores
Note: FreeBSD-SA-00:19 describes a similar, but significantly more
severe problem affecting FreeBSD, and notes that NetBSD is also
affected. The impact of the problem on NetBSD is much less, because
NetBSD's semaphore implementation was fixed (in 1994) so that only
semaphore-using processes would be blocked at exit time.
The undocumented semconfig(2) system call is used by ipcs(1) to
"freeze" the state of semaphores so that a self-consistant snapshot
could be displayed. However, this could then be abused to lock the
semaphore system, preventing all semaphore operations from
progressing, and leave it locked until the locking process exited.
The fix is to disable this unnecessary locking; other comparable
/dev/kmem-reading programs such as ps(1) and netstat(1) have never
needed this sort of locking.
Solutions and Workarounds
Only programs which make use of semaphores are affected by this
If you are unsure if any applications use semaphores, use the ipcs(1)
command; if it displays more than simple column headers, there is
active use of semaphores on your system. For example:
% ipcs -s
T ID KEY MODE OWNER GROUP
s 524288 -1 --rw------- wes wheel
Note that this test is not 100% conclusive; however, use of System V
semaphores is extremely rare.
If you determine that your system may run programs which use semaphore
you should patch your kernel as follows:
For formal NetBSD releases, you should to download the appropriate
source patch listed below, apply it to your kernel source tree using
the patch(1) command. For NetBSD-current, you should update your
source tree (with either sup or anonymous CVS). In both cases, you
then need to rebuild, install the newly built kernel, and reboot. For
more information on how to do this, see:
For NetBSD 1.4, 1.4.1, and 1.4.2:
A patch is available in
NetBSD-current since 20000527 contains all the fixes, and is not
vulnerable. Users of NetBSD-current should upgrade to a source tree
dated 20000527 or later.
The FreeBSD security officer, for bringing the problem to our
Bill Sommerfeld for coding and testing the fix.
2000/05/27 - initial version.
Information about NetBSD and NetBSD security can be found at
http://www.NetBSD.ORG/ and http://www.NetBSD.ORG/Security/.
Copyright 2000, The NetBSD Foundation, Inc. All Rights Reserved.
$NetBSD: NetBSD-SA2000-004.txt,v 1.3 2000/05/29 01:01:11 sommerfeld Exp $
- -----BEGIN PGP SIGNATURE-----
- -----END PGP SIGNATURE-----
- --------------------------END INCLUDED TEXT--------------------
This security bulletin is provided as a service to AusCERT's members. As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.
NOTE: This is only the original release of the security bulletin. It may
not be updated when updates to the original are made. If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.
Contact information for the authors of the original document is included
in the Security Bulletin above. If you have any questions or need further
information, please contact them directly.
Previous advisories and external security bulletins can be retrieved from:
If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Internet Email: firstname.lastname@example.org
Facsimile: (07) 3365 7031
Telephone: (07) 3365 4417 (International: +61 7 3365 4417)
AusCERT personnel answer during Queensland business hours
which are GMT+10:00 (AEST).
On call after hours for emergencies.
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----