terminal line settings are not reset if SIGINT is received while waiting for pam plugin
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- c, linux
- Bereich
- cli, operating-systems
Rechercherichtung
Start by tracing how sudo handles SIGINT while waiting for PAM authentication and where terminal line settings are saved and restored; the payload does not name source files or tests. Reproduce with an interactive PAM module and compare stty -a before and after pressing Ctrl-C. Done means the original terminal settings are restored and the interrupted authentication returns cleanly.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
When sudo is configured to use a pam module like pam_agent_auth trying to abort with CTRL-C(/SIGINT) sudo before the pam module returns, will break terminals. As line settings are not reset back to their original state potentially requiring the terminal to be restarted to use it again or settings to be reset in extra command if still possible.
The time window for that is generally short, but if the pam module requires interactive authentication, like physical touch for presence detection, it becomes much more likely for this to be triggered.
Further sudo wont early anyway, waiting for the authentication to timeout or succeed before finally failing.
Environment
Operating System: Nixos 24.11
Sudo version: 1.1.15p5
terminal and shell: kitty+zsh, also reproduced using different shells and terminals.
Reproduce
- use ssh-key that requires interactive authentication (password protected/yubikey/etc)
- Add pam module like pam_agent_auth to /etc/pam.d/sudo
auth sufficient pam_ssh_agent_auth.so file=/etc/ssh/authorized_keys.d/%u - add ssh key to for user to directory
- ensure user is in sudoers file
- open new shell and check terminal line settings with
stty -a - execute command with
sudoin that shell - press CTRL-C
- wait for sudo to return
- execute '
tty -aagain and compare to before. some settings will be changed and terminal might be broken
- Vorherrschende Sprache
- C
- Sterne
- 1.7k
- Forks
- 306
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 24
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sudo-project/sudo
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
sudo-project/sudo#583 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Signal forwarded to the command is lost when it arrives between fork() and execve() of the commandOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
sudo-project/sudo#566 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
sudo-project/sudo#553 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
sudo-project/sudo#552 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Documentation text overflows container instead of wrappingEvtl. wieder frei @BittuBarnwal7479 hat das vor 131 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 58/100
sudo-project/sudo#547 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sudo-project/sudo
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Status: Opened Type: Bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
severity: low
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
luainkernel/lunatik#2221 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
FriendsofECCE/ECCE#731 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
zephyrproject-rtos/zephyr#124160 ·
Maintainer antworten meist innerhalb von 3 Tagen