exploit the possibilities

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

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:

September 2020

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