LinuxSecurity.com
Share your story
The central voice for Linux and Open Source security news
Home News Topics Advisories HOWTOs Features Newsletters About Register

Welcome!
Sign up!
EnGarde Community
Login
Polls
What is the most important Linux security technology?
 
Advisories
Community
Linux Events
Linux User Groups
Link to Us
Security Center
Book Reviews
Security Dictionary
Security Tips
SELinux
White Papers
Featured Blogs
All About Linux
DanWalsh LiveJournal
Securitydistro
Latest Newsletters
Linux Security Week: April 21st, 2014
Linux Security Week: April 7th, 2014
Subscribe
LinuxSecurity Newsletters
E-mail:
Choose Lists:
About our Newsletters
RSS Feeds
Get the LinuxSecurity news you want faster with RSS
Powered By

  
FreeBSD: kernel memory disclosure vulnerability Print E-mail
User Rating:      How can I rate this item?
Posted by LinuxSecurity.com Team   
FreeBSD Several cases were identified where members of `struct uio' were notproperly validated before being used. In particular, the `uio_offset'member may be negative or extremely large, and was used to compute theregion of kernel memory to be returned to the user.

=============================================================================
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
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
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

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

 
< Prev   Next >
    
Partner

 

Latest Features
Peter Smith Releases Linux Network Security Online
Securing a Linux Web Server
Password guessing with Medusa 2.0
Password guessing as an attack vector
Squid and Digest Authentication
Squid and Basic Authentication
Demystifying the Chinese Hacking Industry: Earning 6 Million a Night
Free Online security course (LearnSIA) - A Call for Help
What You Need to Know About Linux Rootkits
Review: A Practical Guide to Fedora and Red Hat Enterprise Linux - Fifth Edition
Yesterday's Edition
Fixing OpenSSL's Heartbleed flaw will take MONTHS, warns Secunia
Even the most secure cloud storage may not be so secure, study finds
Targeted Attack Uses Heartbleed to Hijack VPN Sessions
Partner Sponsor

Community | HOWTOs | Blogs | Features | Book Reviews | Networking
 Security Projects |  Latest News |  Newsletters |  SELinux |  Privacy |  Home
 Hardening |   About Us |   Advertise |   Legal Notice |   RSS |   Guardian Digital
(c)Copyright 2014 Guardian Digital, Inc. All rights reserved.