From owner-freebsd-bugs Sat Sep 29 7:50: 7 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 9AE7D37B40D for ; Sat, 29 Sep 2001 07:50:00 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8TEo0V71021; Sat, 29 Sep 2001 07:50:00 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7BFD137B40B for ; Sat, 29 Sep 2001 07:41:57 -0700 (PDT) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f8TEfvC70510; Sat, 29 Sep 2001 07:41:57 -0700 (PDT) (envelope-from nobody) Message-Id: <200109291441.f8TEfvC70510@freefall.freebsd.org> Date: Sat, 29 Sep 2001 07:41:57 -0700 (PDT) From: Dimitri Lommers To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/30913: fingerd(8) execv failure due to missing argv termination (patch) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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