GNU GRUB - Bugs: bug #59195, Running grub-emu as root under...
You are not allowed to post comments on this tracker with your current authentication level.
bug #59195: Running grub-emu as root under Linux borks the machine requiring a reboot
Submitter: | Dennis Filder <dfilder> | ||
Submitted: | Sun 27 Sep 2020 04:38:08 PM UTC | ||
Category: | None | Severity: | Major |
Priority: | 5 - Normal | Item Group: | None |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Name: | |
Open/Closed: | Open | Release: | 2.02 |
Release: | Reproducibility: | Every Time | |
Planned Release: | None |
No files currently attached
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.
No changes have been made to this item
Powered by Savane 3.13-4448.
Corresponding source code
Debian-BTS: #965026
Architecture: x86_64-linux-gnu
Kernel: Debian 4.19.146-1 (2020-09-17)
Version: 2.02+dfsg1-20+deb10u2, but the latest git revision (2df291226638261d50fadcab1f5edb6c12ab6cfd, 2020-07-31) shows exactly the same behaviour (Configured with ./configure --enable-grub-emu-sdl=yes --with-SDL --with-platform=emu and compiled against SDL 1.2.15+dfsg2-4).
Description
A blind user reported that running grub-emu made his braille and speech facilities stop and forced him to reboot. I tried looking into this, and every time I ran grub-emu as root (which I suspect he did, too) I had to reboot my machine to make it usable again. Running it under an unprivileged user works fine, but only because the SDL backend is using the X server or (if DISPLAY is unset) reusing the attached terminal (under X the menu is rendered in the xterm, on console it is rendered onto the virtual console, i.e. copying characters with GPM still works).
Reproducer
As root:
Diagnostics
For testing I added this menu stanza at the very beginning (with a 5 second timeout):
When running unprivileged and not pressing any keys, grub-emu always exitted gracefully and left the computer in a usable state regardless of how it was run. When run as root, even with this stanza in place and not pressing any keys, the computer would always be rendered unusable until rebooted (with Ctrl+Alt+Del), even though grub-emu exitted with 0 status code. Neither of the following recovery attempts worked:
The only diagnostically useful info I could come up with is this strace output of ioctls taken with the "halt" stanza in place:
The only thing dubious I can spot here is the VT_LOCKSWITCH call which is missing its corresponding VT_UNLOCKSWITCH call. I don't know if this happens in SDL or GRUB code. Grepping for it in the GRUB codebase yielded nothing.
Let me know if I can add anything more.