exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

pine-cert-20030902.txt

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

Pine Digital Security Advisory PINE-CERT-20030902 - An integer overflow condition in all versions of FreeBSD could lead to disclosure of kernel memory.

tags | advisory, overflow, kernel
systems | freebsd
SHA-256 | 19e199ebba5f002b2f5b355c5a5d6960f5ecfe97e20fc885c026a346d1f05c8f

pine-cert-20030902.txt

Change Mirror Download
-------------------------------------------------------------------------------
Pine Digital Security Advisory
-------------------------------------------------------------------------------
Advisory ID : PINE-CERT-20030902
Authors : Joost Pol
Vendor Informed : 2003-23-09
Issue date : 2003-01-10
Application : kernel / uio
Version(s) : All Versions
Platforms : FreeBSD
Availability : http://www.pine.nl/press/pine-cert-20030902.txt
-------------------------------------------------------------------------------

Synopsis

While performing an audit for a customer, Pine Digital Security
encountered an integer overflow/underflow condition which
could lead to the disclosure of kernel memory.

Versions

All known FreeBSD versions are vulnerable.

Impact

Serious.

Local users on a machine with procfs enabled could exploit this
vulnerability to cause a system panic (denial of service) or
potentially elevate their privileges.

Description

The process file system, or procfs, implements a view of the system
process table inside the file system. It is normally mounted on
/proc, and is required for the complete operation of programs
such as ps(1) and w(1).

On several places in the procfs implementation the "uio" offset
parameter is used without proper validation, the following
code fragment illustrates this:

/usr/src/sys/miscfs/procfs/procfs_regs.c (edited, line 59-84):

struct reg r; char *kv; int kl;
..

kl = sizeof(r);
kv = (char *) &r;
...

kv += uio->uio_offset;
kl -= uio->uio_offset;

if (kl > uio->uio_resid) kl = uio->uio_resid;

...

if (kl < 0) error = EINVAL;

...

if (error == 0) error = uiomove(kv, kl, uio);

As the above code fragment illustrates and since the uio->uio_offset
parameter is under (indirect) control of the user it is possible
to disclose large amounts of kernel memory by specifying an
extremely large or negative value.

Exploitability

Local users can cause an effective denial of service by attempting
to read from non resident kernel memory and thus generating
a system panic.

Local users could also potentially elevate their privileges by
reading from terminal input buffers and thus stealing other
users passwords.

Appendum

The FreeBSD security officer team spotted a similiar vulnerability
in the pseudofs implementation. Pine Digital Security recommends
upgrading even if you do not use procfs.

Disclaimer

Pine Digital Security does not release exploits.

Patches

The FreeBSD Project has updated their CVS repositories.

References

FreeBSD-SA-03:17.procfs.asc

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

file://usr/include/sys/file.h
file://usr/src/sys/miscfs/procfs/procfs_dbregs.c
file://usr/src/sys/miscfs/procfs/procfs_fpregs.c
file://usr/src/sys/miscfs/procfs/procfs_regs.c
file://usr/src/sys/miscfs/procfs/procfs_rlimit.c
file://usr/src/sys/miscfs/procfs/procfs_status.c
file://usr/src/sys/kern/vfs_syscalls.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