opensslの脆弱性対応で9.6.1にアップデートしたのでメモ
環境
仮想化:VMware Workstation-playre17またはVMware workstation-pro17
ホスト:Windows10またはWindows11pro
ゲスト:ubuntu22.04.3TLS
環境構築時のメモ
VMでWindowsホストにUbuntuをゲスト起動する
dockerコンテナ環境作成
アップデート手順
ssh -V
sudo apt-get install aptitude
sudo apt-get install aptitude
sudo aptitude install build-essential zlib1g-dev libssl-dev libpam0g-dev libselinux1-dev libkrb5-dev
sudo mkdir /var/lib/sshd && sudo chmod -R 700 /var/lib/sshd/ && sudo chown -R root:sys /var/lib/sshd/
cd ~/Downloads/
任意のディレクトリを指定
wget -c http://mirror.exonetric.net/pub/OpenBSD/OpenSSH/portable/openssh-9.6p1.tar.gz
2024/1/20現在の最新版を指定
tar -xzf openssh-9.6p1.tar.gz
cd openssh-9.6p1
which openssl
/usr/bin/openssl
./configure --with-kerberos5 --with-md5-passwords --with-pam --with-selinux --with-privsep-path=/var/lib/sshd/ --sysconfdir=/etc/ssh --with-ssl-dir=/usr
--with-ssl-dir=/usr
は、opensslがあるディレクトリのヘッダを指定
make
sudo make install
shutdown -r now
ssh -V
OpenSSH_9.6p1, OpenSSL 3.0.2 15 Mar 2022
sudo systemctl status ssh.service
active(running)を確認する
参考にしたページ
https://manualmaton.com/2023/12/21/ubuntu20-04%e3%81%aeopenssh%e3%82%928-2p1%e3%81%8b%e3%82%899-6-1p%e3%81%ab%e3%82%a2%e3%83%83%e3%83%97%e3%83%87%e3%83%bc%e3%83%88%e3%80%82/
当方の環境差分以外は、ほぼコピペさせていただきました。
UnuntuのCVE(脆弱性)データベースのステータス見方
The Common Vulnerabilities and Exposures (CVE) system
Released: 脆弱性に対するアップデートがリリースされており、適用可能であることを意味する。
Needs triage: 分析中であり、Ubuntuセキュリティチームが対応を決定する前の段階。脆弱性の影響や重要度に応じて、対応の優先度が決定される。
Needed: 脆弱性に対する修正が必要だが、まだ具体的なアップデートはリリースされていない。
Deferred: 現時点での対応は延期されていることを示す。これは、リソースの制限や脆弱性の影響が限定的であるなど、さまざまな理由による。
Not vulnerable: このステータスは、該当バージョンのUbuntuがその脆弱性の影響を受けないことを示す