Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SysRq can be used to restart autologin #1899

Open
xray-tango opened this issue Mar 24, 2024 · 2 comments
Open

SysRq can be used to restart autologin #1899

xray-tango opened this issue Mar 24, 2024 · 2 comments

Comments

@xray-tango
Copy link

When the automatic login on boot option is enabled and the SysRQ Key is fully enabled.
Pressing control+alt+PrtSc+I initiates the "on boot auto-login" sequence, bypassing all possible lock screen methods with it.
This logs in anyone that has physical access to the computer into the default user just by pressing the above mentioned key combination.

This exploit can be triggered on many systems, primarily on the systems of technical and privacy centrist users because:
The SysRQ key is often enabled by advanced users to avoid having to force power off their computer in case of a system lock up.
Auto-login is often enabled by users that use full disk encryption to eliminate the need for having to enter their password twice.

@Vogtinator Vogtinator changed the title Major login bypass vulnerability. SysRq can be used to restart autologin Mar 25, 2024
@Vogtinator
Copy link
Contributor

First things first: Please do https://en.wikipedia.org/wiki/Coordinated_vulnerability_disclosure. What you just did is irresonsible disclosure and is bad for everyone involved.

IIUC SysRq+i is "kill-all-tasks(i)". What happens is that systemd stays alive and tries to restart the crashed sddm service. IMO this works as intended: If the sddm service fails during start, it should try again. From that PoV, the vulnerability is that a system which is meant to protect against a physically present attacker has SysRq enabled.

It might be useful to have sddm save into /run/ or so that autologin happened that startup and to not try again until the system rebooted. That only applies to one-shot autologin of course.

@xray-tango
Copy link
Author

First things first: Please do https://en.wikipedia.org/wiki/Coordinated_vulnerability_disclosure. What you just did is irresonsible disclosure and is bad for everyone involved.

I apologize for my un-professionalism and irresponsibility at reporting of this. I've tried to look for guidance on how to properly report vulnerabilities, or even a single mention of it on the SDDM Github page but i couldn't find any resources in 10 minutes of searching, I've got fed up and just made an issue about it.

You are right about the reason this happens, SysRq never kills the init system (in our case SystemD) which ends up restarting everything as if the system just booted.

My Idea for checking if an auto-login likely happened before or not is very crude but it could work;
The uptime could be checked and it it returns a value above, let's say 10 minutes, the auto-login does not initiate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants