Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Sep 2001 07:41:57 -0700 (PDT)
From:      Dimitri Lommers <dimitri@hinttech.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/30913: fingerd(8) execv failure due to missing argv termination (patch)
Message-ID:  <200109291441.f8TEfvC70510@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help


>Number:         30913
>Category:       bin
>Synopsis:       fingerd(8) execv failure due to missing argv termination (patch)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 29 07:50:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dimitri Lommers
>Release:        4.3-RELEASE
>Organization:
Hinttech Internetwork Technologies
>Environment:
Version of fingerd.c:
$FreeBSD: src/libexec/fingerd/fingerd.c,v 1.16.2.1 2001/03/05 10:59:50 kris Exp $
>Description:
When the maximum number of names are given to fingerd (50-3), the argv array given to execv will not be NULL terminated, resulting in a bad address return.

>How-To-Repeat:
telnet localhost finger, enter 47 or more arguments, see /var/log/messages

>Fix:
# diff -c fingerd.c fingerd.c.new
*** fingerd.c   Sat Sep 29 16:41:58 2001
--- fingerd.c.new       Sat Sep 29 16:41:58 2001
***************
*** 161,168 ****
                        av[1] = "-l";
                        comp = &av[0];
                }
!               else if (++ap == av + ENTRIES)
                        break;
                lp = NULL;
        }
  
--- 161,170 ----
                        av[1] = "-l";
                        comp = &av[0];
                }
!               else if (++ap == av + ENTRIES) {
!                       *ap = NULL;
                        break;
+               }
                lp = NULL;
        }
  

>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109291441.f8TEfvC70510>