exploit the possibilities

FreeBSD Security Advisory 2003.17

FreeBSD Security Advisory 2003.17
Posted Oct 3, 2003
Authored by The FreeBSD Project, Joost Pol | Site freebsd.org

FreeBSD Security Advisory FreeBSD-SA-03:17.procfs - A malicious local user could arrange to use a negative or extremely large offset when reading from a procfs "file", causing a system crash, or causing the kernel to return a large portion of kernel memory.

tags | advisory, kernel, local
systems | freebsd
MD5 | e829d03032083302d95fbdcbe31c92a6

FreeBSD Security Advisory 2003.17

Change Mirror Download
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

=============================================================================
FreeBSD-SA-03:17.procfs Security Advisory
The FreeBSD Project

Topic: kernel memory disclosure via procfs

Category: core
Module: sys
Announced: 2003-10-03
Credits: Joost Pol <joost@pine.nl>
Affects: All FreeBSD releases
Corrected: 2003-10-03 12:03:50 UTC (RELENG_4, 4.9-RC)
2003-10-03 13:02:17 UTC (RELENG_5_1, 5.1-RELEASE-p9)
2003-10-03 13:02:49 UTC (RELENG_5_0, 5.0-RELEASE-p17)
2003-10-03 13:03:44 UTC (RELENG_4_8, 4.8-RELEASE-p12)
2003-10-03 13:04:19 UTC (RELENG_4_7, 4.7-RELEASE-p22)
2003-10-03 13:05:05 UTC (RELENG_4_6, 4.6-RELEASE-p25)
2003-10-03 13:05:44 UTC (RELENG_4_5, 4.5-RELEASE-p36)
2003-10-03 13:06:32 UTC (RELENG_4_4, 4.4-RELEASE-p46)
2003-10-03 13:07:37 UTC (RELENG_4_3, 4.3-RELEASE-p42)
FreeBSD only: YES

For general information regarding FreeBSD Security Advisories,
including descriptions of the fields above, security branches, and the
following sections, please visit
<URL:http://www.freebsd.org/security/>.

I. Background

The process file system, procfs(5), 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).

The Linux process file system, linprocfs(5), emulates a subset of
Linux's process file system and is required for the complete operation
of some Linux binaries.

II. Problem Description

The procfs and linprocfs implementations use uiomove(9) and the
related `struct uio' in order to fulfill read and write requests.
Several cases were identified where members of `struct uio' were not
properly validated before being used. In particular, the `uio_offset'
member may be negative or extremely large, and was used to compute the
region of kernel memory to be returned to the user.

III. Impact

A malicious local user could arrange to use a negative or extremely
large offset when reading from a procfs ``file'', causing a system
crash, or causing the kernel to return a large portion of kernel
memory. Such memory might contain sensitive information, such as
portions of the file cache or terminal buffers. This information
might be directly useful, or it might be leveraged to obtain elevated
privileges in some way. For example, a terminal buffer might include
a user-entered password.

IV. Workaround

Unmount the procfs and linprocfs filesystems if they are mounted.
Execute the following command as root:

umount -a -t procfs,linprocfs

Also, remove or comment out any lines in fstab(5) that reference
`procfs' or `linprocfs', so that they will not be re-mounted at next
reboot.

V. Solution

1) Upgrade your vulnerable system to 4-STABLE, or to the
RELENG_5_1, RELENG_4_8, or RELENG_4_7 security branch dated
after the correction date.

2) To patch your present system:

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

[FreeBSD 4.3]
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:17/procfs43.patch
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:17/procfs43.patch.asc

[FreeBSD 4.4 and later 4.x]
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:17/procfs4x.patch
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:17/procfs4x.patch.asc

[FreeBSD 5.0]
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:17/procfs50.patch
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:17/procfs50.patch.asc

[FreeBSD 5.1]
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:17/procfs51.patch
# fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:17/procfs51.patch.asc

b) Apply the patch.

# cd /usr/src
# patch < /path/to/patch

c) Recompile your kernel as described in
<URL:http://www.freebsd.org/handbook/kernelconfig.html>
and reboot the system.

VI. Correction details

The following list contains the revision numbers of each file that was
corrected in FreeBSD.

Branch Revision
Path
- -------------------------------------------------------------------------
RELENG_4
src/sys/i386/linux/linprocfs/linprocfs_misc.c 1.3.2.9
src/sys/kern/kern_subr.c 1.31.2.3
src/sys/miscfs/procfs/procfs_dbregs.c 1.4.2.4
src/sys/miscfs/procfs/procfs_fpregs.c 1.11.2.4
src/sys/miscfs/procfs/procfs_regs.c 1.10.2.4
src/sys/miscfs/procfs/procfs_rlimit.c 1.5.2.1
src/sys/miscfs/procfs/procfs_status.c 1.20.2.5
src/sys/sys/uio.h 1.11.2.2
RELENG_5_1
src/UPDATING 1.251.2.11
src/sys/conf/newvers.sh 1.50.2.11
src/sys/fs/procfs/procfs_dbregs.c 1.22.2.1
src/sys/fs/procfs/procfs_fpregs.c 1.28.2.1
src/sys/fs/procfs/procfs_regs.c 1.27.2.1
src/sys/fs/pseudofs/pseudofs_vnops.c 1.35.2.1
src/sys/kern/kern_subr.c 1.74.2.1
src/sys/sys/uio.h 1.27.2.1
RELENG_5_0
src/UPDATING 1.229.2.23
src/sys/conf/newvers.sh 1.48.2.18
src/sys/fs/procfs/procfs_dbregs.c 1.21.2.1
src/sys/fs/procfs/procfs_fpregs.c 1.27.2.1
src/sys/fs/procfs/procfs_regs.c 1.26.2.1
src/sys/fs/pseudofs/pseudofs_vnops.c 1.32.2.1
src/sys/kern/kern_subr.c 1.63.2.1
src/sys/sys/uio.h 1.23.2.1
RELENG_4_8
src/UPDATING 1.73.2.80.2.14
src/sys/conf/newvers.sh 1.44.2.29.2.13
src/sys/i386/linux/linprocfs/linprocfs_misc.c 1.3.2.8.10.1
src/sys/kern/kern_subr.c 1.31.2.2.6.1
src/sys/miscfs/procfs/procfs_dbregs.c 1.4.2.3.8.1
src/sys/miscfs/procfs/procfs_fpregs.c 1.11.2.3.8.1
src/sys/miscfs/procfs/procfs_regs.c 1.10.2.3.8.1
src/sys/miscfs/procfs/procfs_rlimit.c 1.5.14.1
src/sys/miscfs/procfs/procfs_status.c 1.20.2.4.8.1
src/sys/sys/uio.h 1.11.2.1.8.1
RELENG_4_7
src/UPDATING 1.73.2.74.2.25
src/sys/conf/newvers.sh 1.44.2.26.2.24
src/sys/i386/linux/linprocfs/linprocfs_misc.c 1.3.2.8.8.1
src/sys/kern/kern_subr.c 1.31.2.2.4.1
src/sys/miscfs/procfs/procfs_dbregs.c 1.4.2.3.6.1
src/sys/miscfs/procfs/procfs_fpregs.c 1.11.2.3.6.1
src/sys/miscfs/procfs/procfs_regs.c 1.10.2.3.6.1
src/sys/miscfs/procfs/procfs_rlimit.c 1.5.12.1
src/sys/miscfs/procfs/procfs_status.c 1.20.2.4.6.1
src/sys/sys/uio.h 1.11.2.1.6.1
RELENG_4_6
src/UPDATING 1.73.2.68.2.54
src/sys/conf/newvers.sh 1.44.2.23.2.42
src/sys/i386/linux/linprocfs/linprocfs_misc.c 1.3.2.8.6.1
src/sys/kern/kern_subr.c 1.31.2.2.2.1
src/sys/miscfs/procfs/procfs_dbregs.c 1.4.2.3.4.1
src/sys/miscfs/procfs/procfs_fpregs.c 1.11.2.3.4.1
src/sys/miscfs/procfs/procfs_regs.c 1.10.2.3.4.1
src/sys/miscfs/procfs/procfs_rlimit.c 1.5.10.1
src/sys/miscfs/procfs/procfs_status.c 1.20.2.4.4.1
src/sys/sys/uio.h 1.11.2.1.4.1
RELENG_4_5
src/UPDATING 1.73.2.50.2.53
src/sys/conf/newvers.sh 1.44.2.20.2.37
src/sys/i386/linux/linprocfs/linprocfs_misc.c 1.3.2.8.4.1
src/sys/kern/kern_subr.c 1.31.2.1.2.1
src/sys/miscfs/procfs/procfs_dbregs.c 1.4.2.3.2.1
src/sys/miscfs/procfs/procfs_fpregs.c 1.11.2.3.2.1
src/sys/miscfs/procfs/procfs_regs.c 1.10.2.3.2.1
src/sys/miscfs/procfs/procfs_rlimit.c 1.5.8.1
src/sys/miscfs/procfs/procfs_status.c 1.20.2.4.2.1
src/sys/sys/uio.h 1.11.2.1.2.1
RELENG_4_4
src/UPDATING 1.73.2.43.2.54
src/sys/conf/newvers.sh 1.44.2.17.2.45
src/sys/i386/linux/linprocfs/linprocfs_misc.c 1.3.2.8.2.1
src/sys/kern/kern_subr.c 1.31.6.1
src/sys/miscfs/procfs/procfs_dbregs.c 1.4.2.2.2.2
src/sys/miscfs/procfs/procfs_fpregs.c 1.11.2.2.2.2
src/sys/miscfs/procfs/procfs_regs.c 1.10.2.2.2.2
src/sys/miscfs/procfs/procfs_rlimit.c 1.5.6.1
src/sys/miscfs/procfs/procfs_status.c 1.20.2.3.4.2
src/sys/sys/uio.h 1.11.6.1
RELENG_4_3
src/UPDATING 1.73.2.28.2.41
src/sys/conf/newvers.sh 1.44.2.14.2.31
src/sys/i386/linux/linprocfs/linprocfs_misc.c 1.3.2.5.2.1
src/sys/kern/kern_subr.c 1.31.4.1
src/sys/miscfs/procfs/procfs_dbregs.c 1.4.2.1.2.2
src/sys/miscfs/procfs/procfs_fpregs.c 1.11.2.1.2.2
src/sys/miscfs/procfs/procfs_regs.c 1.10.2.1.2.2
src/sys/miscfs/procfs/procfs_rlimit.c 1.5.4.1
src/sys/miscfs/procfs/procfs_status.c 1.20.2.3.2.2
src/sys/sys/uio.h 1.11.4.1
- -------------------------------------------------------------------------

VII. References

<URL:http://www.pine.nl/press/pine-cert-20030902.txt>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/fYXyFdaIBMps37IRArbkAJ4qv/N215x61BW2NTyl6e4WY/DGLACgirQd
evgz6IOFh0L8fLRBHjbKO4A=
=Np7P
-----END PGP SIGNATURE-----
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
    1 Files
  • 20
    Sep 20th
    1 Files
  • 21
    Sep 21st
    15 Files
  • 22
    Sep 22nd
    21 Files
  • 23
    Sep 23rd
    8 Files
  • 24
    Sep 24th
    15 Files
  • 25
    Sep 25th
    4 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