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

pine-cert-20030901.txt

pine-cert-20030901.txt
Posted Oct 3, 2003
Authored by Joost Pol | Site pine.nl

Pine Digital Security Advisory PINE-CERT-20030901 - An integer overflow condition that is exploitable under FreeBSD versions 4.3 to present allows for a denial of service and/or privilege escalation.

tags | advisory, denial of service, overflow
systems | freebsd
SHA-256 | f754c8aed03b7474ca466d0f22cdec167687afafce591d4700b55c4268ac9b84

pine-cert-20030901.txt

Change Mirror Download
-------------------------------------------------------------------------------
Pine Digital Security Advisory
-------------------------------------------------------------------------------
Advisory ID : PINE-CERT-20030901
Authors : Joost Pol
Vendor Informed : 2003-23-09
Issue date : 2003-01-10
Application : kernel / fhold
Version(s) : All 4.X versions since 4.3
Platforms : FreeBSD
Availability : http://www.pine.nl/press/pine-cert-20030901.txt
References : http://www.pine.nl/press/pine-cert-20030101.txt
-------------------------------------------------------------------------------

Synopsis

While performing an audit for a customer, Pine Digital Security
encountered an integer overflow condition which could lead to
a denial of service attack or privilege escalation.

This vulnerability is similar to the fpathconf vulnerability:

http://www.pine.nl/press/pine-cert-20030101.txt

Versions

FreeBSD RELENG_4.X: All versions >= 4.3 are vulnerable.

FreeBSD RELENG_5.X: Not vulnerable.

Impact

Serious.

Local users can exploit this vulnerability to cause a system
panic (denial of service) or potentially escalate their
privileges.

Description

Inside the readv(2) system call we spotted a condition where a
call to fdrop() is missing. When issueing a readv(2) call with
an oversized iovcnt parameter the function will return without
releasing the outstanding file reference.

Due to the missing fdrop() call inside the readv(2) system call
is it possible to overflow the reference counter of the file
structure (int f_count).

Quoting PINE-CERT-20030101:

Inside the FreeBSD kernel each file (socket, device or regular
file) opened is represented by a file structure (sys/file.h).

Amongst other members this structure holds a reference counter
(int f_count). This reference counter is increased by the fhold()
function and decreased by the fdrop() function. (both in sys/file.h)

For example, when a file is open(2)ed or dup(2)ed the reference
counter is increased and when the file is close(2)ed again the
reference counter is decreased. Once the reference counter reaches
zero, the file structure itself is deallocated.

Most system calls which perform (blocking) operations on a file
will issue a fhold() call to prevent the file from being closed
in the middle of an operation. Once the operation is finished the
(extra) reference will be released again by issuing a fdrop() call.

Exploitability

On most vulnerable systems this vulnerability can be reliably
exploited by local users to escalate their privileges or cause
an effective denial of service attack.

Refer to PINE-CERT-20030101 for more information.

Disclaimer

Pine Digital Security does not release exploits.

Patches

The FreeBSD Project has updated their CVS repositories.

References

FreeBSD-SA-03:16.filedesc

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

file://usr/include/sys/file.h
file://usr/src/sys/kern/kern_descrip.c
file://usr/src/sys/kern/vfs_syscalls.c
file://usr/src/sys/kern/sys_generic.c

--
Service Provider :: Pine Digital Security :| www.pine.nl || +31 (0)70 311 10 10
:: PGP id 0xF360BB93 fpr ABED 303C 0120 E057 633A 1CB1 D236 C82A F360 BB93 ::
Login or Register to add favorites

File Archive:

April 2024

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close