🇰🇷 한글 설명
sudo-rs 0.2.5~0.2.10 미만 버전에서 Defaults targetpw/rootpw 설정 시 인증된 사용자 UID 대신 호출한 사용자 UID를 기록하여 유효한 타임스탐프로 재인증 없이 다른 계정의 명령을 실행할 수 있다. 높은 권한의 사용자가 한 계정의 비밀번호만 알면 정책 범위 내의 다른 모든 계정으로 비밀번호 없이 명령을 실행할 수 있다.
💡 쉬운 설명
Sudo-rs가 로그인 인증 기록을 잘못 저장해서 한 번의 인증으로 다시 비밀번호를 입력하지 않고 다른 관리자 계정으로 명령을 실행할 수 있다. 높은 권한의 사용자가 한 계정 비밀번호만 알면 정책이 허용하는 모든 계정에 접근 가능하다.
🇺🇸 원문 (English)
sudo-rs is a memory safe implementation of sudo and su written in Rust. With `Defaults targetpw` (or `Defaults rootpw`) enabled, the password of the target account (or root account) instead of the invoking user is used for authentication. sudo-rs starting in version 0.2.5 and prior to version 0.2.10 incorrectly recorded the invoking user’s UID instead of the authenticated-as user's UID in the authentication timestamp. Any later `sudo` invocation on the same terminal while the timestamp was still valid would use that timestamp, potentially bypassing new authentication even if the policy would have required it. A highly-privileged user (able to run commands as other users, or as root, through sudo) who knows one password of an account they are allowed to run commands as, would be able to run commands as any other account the policy permits them to run commands for, even if they don't know the password for those accounts. A common instance of this would be that a user can still use their own password to run commands as root (the default behaviour of `sudo`), effectively negating the intended behaviour of the `targetpw` or `rootpw` options. Version 0.2.10 contains a patch for the issue. Versions prior to 0.2.5 are not affected, since they do not offer `Defaults targetpw` or `Defaults rootpw`.
📍 영향받는 시스템
sudo-rs 버전 0.2.5 이상 0.2.10 미만
⚔️ 공격 벡터
targetpw 또는 rootpw Defaults 설정 환경에서 한 계정으로 한 번 인증 후 유효한 타임스탐프를 이용해 다른 계정의 비밀번호 없이 명령 실행
🛡️ 대응 방법
sudo-rs를 버전 0.2.10 이상으로 업그레이드
🔧 검증 코드
sudo-rs 버전이 0.2.10 미만이면 취약함; 0.2.10 이상이면 패치됨
sudo -V 2>&1 | grep -i 'sudo-rs' && sudo -V | grep -oE '[0-9]+\.[0-9]+\.[0-9]+'