exploit the possibilities

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
MD5 | a75744b84a107cfb9a9f5f81ca214c17

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:

May 2020

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2020 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close