terminal line settings are not reset if SIGINT is received while waiting for pam plugin
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- c, linux
- Lĩnh vực
- cli, operating-systems
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- C
- Star
- 1.7k
- Fork
- 306
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 22
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của sudo-project/sudo
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
sudo-project/sudo#583 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
sudo-project/sudo#581 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Signal forwarded to the command is lost when it arrives between fork() and execve() of the commandĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
sudo-project/sudo#566 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
sudo-project/sudo#553 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
sudo-project/sudo#552 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của sudo-project/sudo
Issue tương tự
-
Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
apache/nuttx-apps#3942 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add missing unit tests for IsAdmissionPolicyName and IsCertManagerResourceNameCó thể đã có người làm @a1h8 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
kubernetes-sigs/security-profiles-operator#3644 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
ly05010419/MacNativeGames#1340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày