kern/133240: [boot] off-by-one error in gets.c causes panic when
input buffer is filled
Bruce Cran
bruce at cran.org.uk
Tue Mar 31 05:10:02 PDT 2009
>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:
More information about the freebsd-bugs
mailing list