exploit the possibilities
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:

December 2024

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