GNU 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
Submitter: | Stephan <sgabert> | ||
Submitted: | 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: | Git master |
Release: | Reproducibility: | Every Time | |
Planned Release: | None |
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
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
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 |
Powered by Savane 3.13-f8d8.
Corresponding source code
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)