Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

terminal line settings are not reset if SIGINT is received while waiting for pam plugin

Offen
#402 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

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

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 sudo in that shell
  • press CTRL-C
  • wait for sudo to return
  • execute 'tty -a again 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

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus sudo-project/sudo

Alle Issues in sudo-project/sudo

Ähnliche Issues

Weitere Issues zu C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.