From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 31 12:10:01 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEAB51065670 for ; Tue, 31 Mar 2009 12:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7F05E8FC1F for ; Tue, 31 Mar 2009 12:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n2VCA10M026847 for ; Tue, 31 Mar 2009 12:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n2VCA174026846; Tue, 31 Mar 2009 12:10:01 GMT (envelope-from gnats) Resent-Date: Tue, 31 Mar 2009 12:10:01 GMT Resent-Message-Id: <200903311210.n2VCA174026846@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Bruce Cran Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B67E106567A for ; Tue, 31 Mar 2009 12:00:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 29B798FC29 for ; Tue, 31 Mar 2009 12:00:51 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2VC0oPU051905 for ; Tue, 31 Mar 2009 12:00:50 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n2VC0oeZ051904; Tue, 31 Mar 2009 12:00:50 GMT (envelope-from nobody) Message-Id: <200903311200.n2VC0oeZ051904@www.freebsd.org> Date: Tue, 31 Mar 2009 12:00:50 GMT From: Bruce Cran To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/133240: [boot] off-by-one error in gets.c causes panic when input buffer is filled X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2009 12:10:02 -0000 >Number: 133240 >Category: kern >Synopsis: [boot] off-by-one error in gets.c causes panic when input buffer is filled >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: Tue Mar 31 12:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Bruce Cran >Release: 7-STABLE >Organization: >Environment: 8-CURRENT and 7-STABLE >Description: If the input buffer at the loader prompt (OK) is filled until no more characters can be entered then a panic occurs when the enter key is pressed due to an off-by-one error in src/lib/libstand/gets.c. Line 77 of gets.c should be comparing (lp-buf) against (n-1) instead of n. >How-To-Repeat: At the loader (OK) prompt, enter "boot " followed by as many characters as possible until they stop being accepted. Press Enter. >Fix: Line 77 of src/lib/libstand/gets.c should be comparing (lp-buf) against (n-1) instead of n. >Release-Note: >Audit-Trail: >Unformatted: