LinuxSecurity.com
Share your story
The central voice for Linux and Open Source security news
Home News Topics Advisories HOWTOs Features Newsletters About Register

Welcome!
Sign up!
EnGarde Community
Login
Polls
Is Mandatory Access Control Too Much Security For Enterprise's Linux?
 
Advisories
Community
Linux Events
Linux User Groups
Link to Us
Security Center
Book Reviews
Security Dictionary
Security Tips
SELinux
White Papers
Featured Blogs
Emily Ratliff: OS Security
DanWalsh LiveJournal
Security Bloggers Network
Latest Newsletters
Linux Advisory Watch: October 10th, 2008
Linux Security Week: October 6th, 2008
Subscribe
LinuxSecurity Newsletters
E-mail:
Choose Lists:
About our Newsletters
RSS Feeds
Get the LinuxSecurity news you want faster with RSS
Powered By

  
FreeBSD: kernel file descriptor leak Print E-mail
User Rating:      How can I rate this item?
Posted by LinuxSecurity.com Team   
FreeBSD A programming error in the readv system call can result in the givenfile descriptor's reference count being erroneously incremented.

=============================================================================
FreeBSD-SA-03:16.filedesc                                   Security Advisory
                                                          The FreeBSD Project

Topic:          file descriptor leak in readv

Category:       core
Module:         kernel
Announced:      2003-10-02
Credits:        Joost Pol <joost@pine.nl>
Affects:        FreeBSD 4.3-RELEASE through 4.8-RELEASE
                4-STABLE prior to the correction date
Corrected:      2003-10-02 15:08:01 UTC (RELENG_4, 4.9-RC)
                2003-10-02 15:54:48 UTC (RELENG_4_8, 4.8-RELEASE-p11)
                2003-10-02 15:55:54 UTC (RELENG_4_7, 4.7-RELEASE-p21)
                2003-10-02 15:56:56 UTC (RELENG_4_6, 4.6-RELEASE-p24)
                2003-10-02 15:57:48 UTC (RELENG_4_5, 4.5-RELEASE-p35)
                2003-10-02 15:58:53 UTC (RELENG_4_4, 4.4-RELEASE-p45)
                2003-10-02 16:05:44 UTC (RELENG_4_3, 4.3-RELEASE-p41)
FreeBSD only:   YES

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit 
http://www.freebsd.org/security/.

I.   Background

The readv(2) system call performs a scatter read: it reads from the
input file descriptor and stores the data into multiple buffers as
instructed by the caller.

II.  Problem Description

A programming error in the readv system call can result in the given
file descriptor's reference count being erroneously incremented.

III. Impact

A local attacker may cause the operating system to crash by repeatedly
calling readv on a file descriptor until the reference count wraps to
a negative value, and then calling close on that file descriptor.

Similarly, it may be possible to cause a file descriptor to reference
unallocated kernel memory, but remain valid.  If a new file is later
opened and the kernel allocates the new file structure at the same
memory location, then an attacker may be able to gain read or write
access to that file.  This may in turn lead to privilege escalation.

IV.  Workaround

There is no workaround.

V.   Solution

The following patch has been verified to apply to FreeBSD 4.3, 4.4,
4.5, 4.6, 4.7, and 4.8 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-03:16/filedesc.patch
# fetch  ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:16/filedesc.patch.asc

b) Apply the patch.

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

c) Recompile your kernel as described in
http://www.freebsd.org/handbook/kernelconfig.html> and reboot the
system.

VI.  Correction details

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

Branch                                                           Revision
  Path
- -------------------------------------------------------------------------
RELENG_4
  src/sys/kern/sys_generic.c                                    1.55.2.11
RELENG_4_8
  src/UPDATING                                             1.73.2.80.2.13
  src/sys/conf/newvers.sh                                  1.44.2.29.2.12
  src/sys/kern/sys_generic.c                               1.55.2.10.12.1
RELENG_4_7
  src/UPDATING                                             1.73.2.74.2.24
  src/sys/conf/newvers.sh                                  1.44.2.26.2.23
  src/sys/kern/sys_generic.c                               1.55.2.10.10.1
RELENG_4_6
  src/UPDATING                                             1.73.2.68.2.53
  src/sys/conf/newvers.sh                                  1.44.2.23.2.41
  src/sys/kern/sys_generic.c                                1.55.2.10.8.1
RELENG_4_5
  src/UPDATING                                             1.73.2.50.2.52
  src/sys/conf/newvers.sh                                  1.44.2.20.2.36
  src/sys/kern/sys_generic.c                                1.55.2.10.6.1
RELENG_4_4
  src/UPDATING                                             1.73.2.43.2.53
  src/sys/conf/newvers.sh                                  1.44.2.17.2.44
  src/sys/kern/sys_generic.c                                1.55.2.10.4.1
RELENG_4_3
  src/UPDATING                                             1.73.2.28.2.40
  src/sys/conf/newvers.sh                                  1.44.2.14.2.30
  src/sys/kern/sys_generic.c                                1.55.2.10.2.1
- -------------------------------------------------------------------------

VII. References
 
http://www.pine.nl/press/pine-cert-20030901.txt

 
< Prev   Next >
    
Partner:

 

Latest Features
Never Installed a Firewall on Ubuntu? Try Firestarter
Review: Hacking Exposed Linux, Third Edition
Security Features of Firefox 3.0
Review: The Book of Wireless
April 2008 Open Source Tool of the Month: sudo
Open Source Tool of March: ZoneMinder
Meet the Anti-Nmap: PSAD
Yesterday's Edition

QuickLinks: Comunity , HOWTOs , Blogs , Features , Book Reviews , Networking ,
  Security Projects ,   Latest News ,  Newsletters ,  SELinux ,  Privacy ,  Home,
 Hardening ,   About Us,   Advertise,   Legal Notice,   RSS,   Guardian Digital

(c)Copyright 2008 Guardian Digital, Inc. All rights reserved.