bugGNU GRUB - Bugs: bug #56654, Bug in grub_xputs_normal

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #56654: Bug in grub_xputs_normal

Submitted by:  Stephan <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: 
Open/Closed:  Open Release: 
Release:  Git master Reproducibility:  Every Time
Planned Release:  None

Mon 22 Jul 2019 06:26:14 AM UTC, original submission:  

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: https://lists.gnu.org/archive/html/bug-grub/2019-07/msg00015.html)

Stephan <sgabert>

 

Attached Files
file #47245:  bug-xputs.patch added by sgabert (2KiB - text/x-patch - A small patch that triggers the bug.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sgabert (Submitted the item)
  • -email is unavailable- added by sgabert
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-07-22 sgabert Attached File- => Added bug-xputs.patch, #47245
        Carbon-Copy- => Added sgabert

    Back to the top


    Powered by Savane 3.5