Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2009 12:00:50 GMT
From:      Bruce Cran <bruce@cran.org.uk>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/133240: [boot] off-by-one error in gets.c causes panic when input buffer is filled
Message-ID:  <200903311200.n2VC0oeZ051904@www.freebsd.org>
Resent-Message-ID: <200903311210.n2VCA174026846@freefall.freebsd.org>

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

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



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