赞
踩
漏洞详情见上图和相关连接 https://nvd.nist.gov/vuln/detail/CVE-2024-6387
本文在CentOS(x86) 和 麒麟sp3(arm)系统上均验证成功
下载源码包和依赖,相关连接如下
openssh-9.8p1.tar.gz
x11-ssh-askpass-1.2.4.1.tar.gz
#配置RPM构建环境
yum install rpmdevtools
rpmdev-setuptree tar -xzvf openssh-9.8p1.tar.gz cp openssh-9.8p1/contrib/redhat/openssh.spec /root/rpmbuild/SPECS/ cp openssh-9.8p1.tar.gz /root/rpmbuild/SOURCES/ cp x11-ssh-askpass-1.2.4.1.tar.gz /root/rpmbuild/SOURCES/ [root@localhost ~]# tree rpmbuild/ rpmbuild/ ├── BUILD ├── RPMS ├── SOURCES │ ├── openssh-9.8p1.tar.gz │ └── x11-ssh-askpass-1.2.4.1.tar.gz ├── SPECS │ └── openssh.spec └── SRPMS # 编译并生成rpm cd ~/rpmbuild/SPECS rpmbuild -ba openssh.spec # 编译完成后的rpm包生成在rpmbuild/RPMS目录中 [root@localhost rpmbuild]# ls RPMS/x86_64/ openssh-9.8p1-1.el7.x86_64.rpm openssh-askpass-9.8p1-1.el7.x86_64.rpm openssh-askpass-gnome-9.8p1-1.el7.x86_64.rpm openssh-clients-9.8p1-1.el7.x86_64.rpm openssh-debuginfo-9.8p1-1.el7.x86_64.rpm openssh-server-9.8p1-1.el7.x86_64.rpm
mkdir -p /backup/ssh_backup/pam.d
cp /etc/pam.d/sshd /backup/ssh_backup/pam.d/
cp -r /etc/ssh /backup/ssh_backup/
#在线环境
yum localinstall open*.rpm
#离线环境
rpm -ivh --force --nodeps open*.rpm
# 缺少依赖,去yum地址找包或者yum install 解决
yum install libSM-devel
# 缺少依赖,去yum地址找包或者yum install 解决
yum install libICE-devel
cp /backup/ssh_backup/pam.d/sshd /etc/pam.d/
chmod 400 /etc/ssh/ssh_host_*
ssh -V
OpenSSH_9.8p1, without OpenSSL
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。