[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #56654] Bug in grub_xputs_normal

From: Stephan
Subject: [bug #56654] Bug in grub_xputs_normal
Date: Mon, 22 Jul 2019 02:26:16 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36


                 Summary: Bug in grub_xputs_normal
                 Project: GNU GRUB
            Submitted by: sgabert
            Submitted on: Mon 22 Jul 2019 06:26:14 AM UTC
                Category: None
                Severity: Major
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: Git master
         Reproducibility: Every Time
         Planned Release: None



Calling grub_printf with an 80 character string (grub_printf(str) == 80) 80
times in a row leads to grub being unresponsive and de facto being trapped in
endless loop (of printing newlines?).

This behavior does not occur before switching to normal mode, when grub_printf
still calls grub_xputs_dumb. It only occurs after switching to normal mode,
when grub_printf calls grub_xputs_normal.

The bug is not triggered, if 80*80 (or more) characters are being printed at
once by grub_printf: A string of at least 80 characters has to be
grub_printf'd at least 80 times in a row.

I attached a small patch to demonstrate the bug:
- printf_test prints an 80-char long string 80 times successively
- this test succeeds with grub_printf using grub_xputs_dumb (before normal
mode) - this test fails with grub_printf using grub_xputs_normal (after
switching to normal mode)

I could reproduce this behavior within qemu and on several different physical
systems. For testing, I used the current master-branch and grub-2.02-rc2
(8014b7b), but prior versions are affected too.

(originally sent to bug-grub:


File Attachments:

Date: Mon 22 Jul 2019 06:26:14 AM UTC  Name: bug-xputs.patch  Size: 2KiB   By:
A small patch that triggers the bug.


Reply to this item at:


  Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]