what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

netbsd.2000-004.semaphore

netbsd.2000-004.semaphore
Posted Jun 1, 2000

NetBSD Security Advisory 2000-004 - 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 from exiting.

systems | netbsd
SHA-256 | c73d42a54f6b2912c562ac008d2fceb0d23730edbc94c5372e844549d8e71073

netbsd.2000-004.semaphore

Change Mirror Download
-----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)


Abstract
========

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
from exiting.

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.

Technical Details
=================

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
problem.

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

http://www.netbsd.org/Documentation/kernel/#building_a_kernel

For NetBSD 1.4, 1.4.1, and 1.4.2:
A patch is available in

ftp://ftp.NetBSD.ORG/pub/NetBSD/misc/security/patches/20000527-sysvsem

For NetBSD-current:

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.



Thanks To
=========

The FreeBSD security officer, for bringing the problem to our
attention.

Bill Sommerfeld for coding and testing the fix.

Revision History
================

2000/05/27 - initial version.

More Information
================

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-----
Version: 2.6.3ia
Charset: noconv

iQCVAwUBOTHBbD5Ru2/4N2IFAQG1zQP+LYnjsZzLPKKSur1ywCsZQN+kqt3wpVa+
qP3pTcCTDbrh7QbwwTibzkGo5h7dnbwVGYHP0yGSDpVmRN//q+sOo5g92NMqC5Bn
iodYJPyE5pu3IJrKtSCQOIddUV49TKRV7NnQVHTJIEfxxbgRWRjlbNAwLS7qscV3
Gc8JOKs0ev0=
=KhiA
-----END PGP SIGNATURE-----

Login or Register to add favorites

File Archive:

September 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Sep 1st
    261 Files
  • 2
    Sep 2nd
    17 Files
  • 3
    Sep 3rd
    38 Files
  • 4
    Sep 4th
    52 Files
  • 5
    Sep 5th
    23 Files
  • 6
    Sep 6th
    27 Files
  • 7
    Sep 7th
    0 Files
  • 8
    Sep 8th
    0 Files
  • 9
    Sep 9th
    0 Files
  • 10
    Sep 10th
    0 Files
  • 11
    Sep 11th
    0 Files
  • 12
    Sep 12th
    0 Files
  • 13
    Sep 13th
    0 Files
  • 14
    Sep 14th
    0 Files
  • 15
    Sep 15th
    0 Files
  • 16
    Sep 16th
    0 Files
  • 17
    Sep 17th
    0 Files
  • 18
    Sep 18th
    0 Files
  • 19
    Sep 19th
    0 Files
  • 20
    Sep 20th
    0 Files
  • 21
    Sep 21st
    0 Files
  • 22
    Sep 22nd
    0 Files
  • 23
    Sep 23rd
    0 Files
  • 24
    Sep 24th
    0 Files
  • 25
    Sep 25th
    0 Files
  • 26
    Sep 26th
    0 Files
  • 27
    Sep 27th
    0 Files
  • 28
    Sep 28th
    0 Files
  • 29
    Sep 29th
    0 Files
  • 30
    Sep 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close