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

Sign up!
EnGarde Community
What is the most important Linux security technology?
Linux Events
Linux User Groups
Link to Us
Security Center
Book Reviews
Security Dictionary
Security Tips
White Papers
Featured Blogs
All About Linux
DanWalsh LiveJournal
Latest Newsletters
Linux Security Week: March 30th, 2015
Linux Advisory Watch: March 27th, 2015
LinuxSecurity Newsletters
Choose Lists:
About our Newsletters
RSS Feeds
Get the LinuxSecurity news you want faster with RSS
Powered By

FreeBSD: 'fingerd' vulnerability Print E-mail
User Rating:      How can I rate this item?
Posted by Team   
FreeBSD A malicious user may be able to read certain files via a finger request.

FreeBSD-SA-00:54                                           Security Advisory
                                                                FreeBSD, Inc.

Topic:          fingerd allows remote reading of filesystem

Category:       core
Module:         fingerd
Announced:      2000-10-13
Credits:        NIIMI Satoshi <>
Affects:        FreeBSD 4.1.1-RELEASE
Corrected:      2000-10-05 (4.1.1-STABLE)
FreeBSD only:   Yes

I.   Background

The finger service is used to provide information about users on the
system to remote clients.

II.  Problem Description

Shortly before the release of FreeBSD 4.1.1, code was added to
finger(1) intended to allow the utility to send the contents of
administrator-specified files in response to a finger request. However
the code incorrectly allowed users to specify a filename directly, the
contents of which would be returned to the user.

The finger daemon usually runs as user 'nobody' and invokes the
finger(1) command in response to a remote request, meaning it does not
have access to privileged files on the system (such as the hashed
password file /etc/master.passwd), however the vulnerability may be
used to read arbitrary files to which the 'nobody' user has read
permission. This may disclose internal information including
information which may be used to mount further attacks against the

Note that servers running web and other services often incorrectly run
these as the 'nobody' user, meaning this vulnerability may be used to
read internal web server data such as web server password files, the
source code to cgi-bin scripts, etc.

FreeBSD 4.1-RELEASE, 4.0-RELEASE, 3.5.1-RELEASE and FreeBSD 4.1-STABLE
systems dated before 2000-09-01 or after 2000-10-05 are unaffected by
this vulnerability.

III. Impact

Remote users can obtain read access (as the 'nobody' user) to large
parts of the local filesystem on systems running a vulnerable
fingerd. This may disclose confidential information and may facilitate
further attacks on the system.

IV.  Workaround

Disable the finger protocol in /etc/inetd.conf: make sure the
/etc/inetd.conf file does not contain the following entry
uncommented (i.e. if present in the inetd.conf file it should be
commented out as shown below:)

#finger  stream  tcp     nowait/3/10 nobody /usr/libexec/fingerd fingerd -s

On IPv6-connected systems, be sure to disable the IPv6 instance of the
finger daemon as well:

#finger stream  tcp6    nowait/3/10 nobody /usr/libexec/fingerd fingerd -s

V.   Solution

One of the following:

1) Upgrade your vulnerable FreeBSD system to 4.1.1-STABLE dated after
the correction date.

2) Apply the patch below and rebuild your fingerd binary.

Either save this advisory to a file, or download the patch and
detached PGP signature from the following locations, and verify the
signature using your PGP utility.

# cd /usr/src/usr.bin/finger
# patch -p < /path/to/patch_or_advisory
# make all install
# cd /usr/src/libexec/fingerd
# make all install

Patch for vulnerable 4.1.x systems:

    Index: finger.c
    RCS file: /home/ncvs/src/usr.bin/finger/finger.c,v
    retrieving revision
    retrieving revision 1.21
    diff -u -r1.15.2.3 -r1.21
    --- finger.c        2000/09/15 21:51:00
    +++ finger.c        2000/10/05 15:56:13     1.21
    @@ -293,6 +293,16 @@
                goto net;
    +    * Mark any arguments beginning with '/' as invalid so that we 
    +    * don't accidently confuse them with expansions from finger.conf
    +    */
    +   for (p = argv, ip = used; *p; ++p, ++ip)
    +       if (**p == '/') {
    +           *ip = 1;
    +           warnx("%s: no such user", *p);
    +       }
    +   /*
         * Traverse the finger alias configuration file of the form
         * alias:(user|alias), ignoring comment lines beginning '#'.
    @@ -323,11 +333,11 @@
         * gathering the traditional finger information.
        if (mflag)
    -           for (p = argv; *p; ++p) {
    -                   if (**p != '/' || !show_text("", *p, "")) {
    +           for (p = argv, ip = used; *p; ++p, ++ip) {
    +                   if (**p != '/' || *ip == 1 || !show_text("", *p, "")) {
                                if (((pw = getpwnam(*p)) != NULL) && !hide(pw))
    -                           else
    +                           else if (!*ip)
                                        warnx("%s: no such user", *p);

< Prev   Next >


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
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 2015 Guardian Digital, Inc. All rights reserved.