OpenSSH CVE-2023-38408

반응형

CVE-2023-38408

 

OpenSSH CVE-2023-38408 테스트 및 CentOS 7.9 오류 리포트

OpenSSH CVE-2023-38408 테스트 및 CentOS 7.9 오류 리포트

1. 오류 개요

본 보고서는 CentOS 7.9 환경에서 OpenSSH CVE-2023-38408 취약점 대응을 위한 openssh-9.3p2 수동 업그레이드 중 발생한 여러 오류 현상을 분석한 내용이다. 해당 시스템은 기존 OpenSSH_7.4p1 버전을 사용하고 있었으며, yum 리포지토리 지원이 종료된 환경에서 직접 컴파일 설치를 수행하였다.

2. 사전 환경

  • 운영체제: CentOS 7.9
  • 기존 OpenSSH: OpenSSH_7.4p1 / OpenSSL 1.0.2k-fips (2017)
  • 업그레이드 대상: OpenSSH 9.3p2

3. 사전 준비 작업

# 필수 패키지 설치
yum install -y zlib-devel openssl-devel pam-devel gcc make

# SSH 설정 백업
cp /etc/ssh/*_config /home/work/ssh_config_bak/

4. 설치 과정 및 주요 로그

# 기존 OpenSSH 제거
rpm -e --nodeps openssh openssh-clients openssh-server

# 소스 압축 해제
tar zxvf openssh-9.3p2.tar.gz
cd openssh-9.3p2

# 컴파일 및 설치
./configure --prefix=/usr/local/openssh --with-ssl-dir=/usr/local/openssl/bin --with-pam
make && make install

초기 오류 발생: configure: error: zlib.h missingyum install -y zlib-devel 후 해결

5. 주요 오류 사례 및 조치

5.1 SSH Host Key Permission 오류

Permissions 0640 for '/etc/ssh/ssh_host_ed25519_key' are too open.
sshd: no hostkeys available -- exiting.

조치: chmod 600 /etc/ssh/ssh_host_* 명령을 통해 권한 수정 후 재기동 성공

5.2 sshd_config 옵션 오류

Unsupported option GSSAPIAuthentication
Unsupported option GSSAPICleanupCredentials

조치: /usr/local/openssh/etc/sshd_config의 79~80행 옵션을 주석 처리

5.3 PAM 모듈 경로 오류

PAM unable to dlopen(/lib/security/pam_unix.so)
PAM unable to dlopen(/lib/security/pam_cracklib.so)

조치: /etc/pam.d/sshd의 모듈 경로를 /usr/lib64/security로 변경

5.4 root 로그인 차단

기본적으로 OpenSSH 9.3p2는 root 직접 접속을 차단한다. PermitRootLogin yes 항목을 /usr/local/openssh/etc/sshd_config에 추가 후 재기동.

6. 조치 결과

모든 오류 조치 후 systemctl status sshd 확인 결과, 서비스 정상 기동:

Active: active (running) since 2023-08-04 15:51:40 KST
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.

7. 결론

CentOS 7.9는 이미 EOL(EOS) 상태로, yum 리포지토리의 보안 패치 제공이 종료되었다. 그러나 시스템 교체가 어려운 환경에서는, 위와 같은 수동 빌드 및 취약점 조치가 현실적인 대안이 된다.

💡 권고사항: CentOS EOL/EOS 환경에서는 OS를 즉시 교체하기 어렵더라도, 최소한의 보안 취약점 조치(예: OpenSSH 수동 업그레이드)를 수행할 것을 권장합니다.
반응형

 

반응형
LIST