terminal line settings are not reset if SIGINT is received while waiting for pam plugin
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- c, linux
- Domínio
- cli, operating-systems
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- C
- Estrelas
- 1.7k
- Forks
- 306
- Merge médio
- 1d 8h
- PRs com merge (30d)
- 24
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de sudo-project/sudo
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 42/100
sudo-project/sudo#583 ·
Mantenedores costumam responder em até 1 dia
-
Signal forwarded to the command is lost when it arrives between fork() and execve() of the commandAberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
sudo-project/sudo#566 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
sudo-project/sudo#553 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
sudo-project/sudo#552 ·
Mantenedores costumam responder em até 1 dia
-
Documentation text overflows container instead of wrappingTalvez livre de novo @BittuBarnwal7479 assumiu há 132 dias e não há nenhum pull request aberto. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 58/100
sudo-project/sudo#547 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
Todas as issues de sudo-project/sudo
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
Mantenedores costumam responder em até 2 dias
-
BUG: linalg.bandwidth: misses the upper band in a wide matrix's last rowTalvez já em andamento @ilayn assumiu há 205 dias. Abertadefect scipy.linalg
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
scipy/scipy#26579 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 80/100
Mantenedores costumam responder em até 1 dia