關于OpenSSL1.0.2k-fip升級修復漏洞
前言
近日,國家信息安全漏洞庫(CNNVD)收到關于OpenSSL 安全漏洞(CNNVD-202207-242、CVE-2022-2274)情況的報送。成功利用此漏洞的攻擊者,可造成目標機器內存損壞,進而在目標機器遠程執(zhí)行代碼。OpenSSL 3.0.4版本受漏洞影響。目前,OpenSSL官方已發(fā)布新版本修復了漏洞,請用戶及時確認是否受到漏洞影響,盡快采取修補措施。
一、漏洞介紹
OpenSSL是OpenSSL團隊開發(fā)的一個開源的能夠實現安全套接層(SSLv2/v3)和安全傳輸層(TLSv1)協(xié)議的通用加密庫。該產品支持多種加密算法,包括對稱密碼、哈希算法、安全散列算法等。該漏洞源于計算機上具有2048位私鑰的 RSA 實現不正確,并且在計算過程中會發(fā)生內存損壞,導致攻擊者可能會在執(zhí)行計算的機器上遠程執(zhí)行代碼。
二、危害影響
成功利用此漏洞的攻擊者,可造成目標機器內存損壞,進而在目標機器遠程執(zhí)行代碼。OpenSSL1.0.2、OpenSSL1.1.1、OpenSSL 3.0版本受漏洞影響。
三、修復建議
目前,OpenSSL官方已發(fā)布新版本修復了漏洞,請用戶及時確認是否受到漏洞影響,盡快采取修補措施。官方鏈接如下:
https://git.openssl.org/gitweb/?p=openssl.git;a=commitdiff;h=4d8a88c134df634ba610ff8db1eb8478ac5fd345
一、下載openssl和openssh
https://www.openssl.org/source/
https://mirrors.aliyun.com/pub/OpenBSD/OpenSSH/portable/
二、openssl升級步驟
1.查看當前的openssl和openssh的版本
[root@openvpn ~]# ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
2.編譯安裝(需要gcc環(huán)境)
[root@openvpn ~]# yum remove openssl-devel
[root@openvpn ~]# yum install openssl-devel
[root@openvpn openssl-1.1.1s]# ./config --prefix=/usr/local/openssl-1.1.1s --shared
Operating system: x86_64-whatever-linux2
Configuring OpenSSL version 1.1.1s (0x1010113fL) for linux-x86_64
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
**********************************************************************
*** ***
*** OpenSSL has been successfully configured ***
*** ***
*** If you encounter a problem while building, please open an ***
*** issue on GitHub <https://github.com/openssl/openssl/issues> ***
*** and include the output from the following command: ***
*** ***
*** perl configdata.pm --dump ***
*** ***
*** (If you are new to OpenSSL, you might want to consult the ***
*** 'Troubleshooting' section in the INSTALL file first) ***
*** ***
**********************************************************************
[root@openvpn openssl-1.1.1s]# make && make install
備份當前openssl
[root@openvpn openssl-1.1.1s]# mv /usr/bin/openssl /usr/bin/openssl.bak
[root@openvpn openssl-1.1.1s]# mv /usr/include/openssl /usr/include/openssl.bak
配置使用新版本
[root@openvpn openssl-1.1.1s]# ln -s /usr/local/openssl-1.1.1s/bin/openssl /usr/bin/openssl
[root@openvpn openssl-1.1.1s]# ln -s /usr/local/openssl-1.1.1s/include/openssl /usr/include/openssl
更新動態(tài)鏈接庫數據
[root@openvpn openssl-1.1.1s]# echo "/usr/local/openssl-1.1.1s/lib">>/etc/ld.so.conf
[root@openvpn ~]# ldconfig -v
ldconfig: Can't stat /libx32: No such file or directory
ldconfig: Path `/usr/lib' given more than once
ldconfig: Path `/usr/lib64' given more than once
ldconfig: Can't stat /usr/libx32: No such file or directory
/usr/lib64//bind9-export:
libisccfg-export.so.160 -> libisccfg-export.so.160.2.1
libisc-export.so.169 -> libisc-export.so.169.0.3
libirs-export.so.160 -> libirs-export.so.160.0.5
libdns-export.so.1102 -> libdns-export.so.1102.1.2
/usr/local/openssl-1.1.1s/lib:
libssl.so.1.1 -> libssl.so.1.1
libcrypto.so.1.1 -> libcrypto.so.1.1
再次查看版本號
[root@openvpn ~]# openssl version
OpenSSL 1.1.1s 1 Nov 2022
三、openssh升級步驟
個人機器已經是最新的版本
[root@openvpn openssh-9.1p1]# yum install pam-devel libselinux-devel zlib-devel openssl-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Package pam-devel-1.1.8-23.el7.x86_64 already installed and latest version
Package libselinux-devel-2.5-15.el7.x86_64 already installed and latest version
Package zlib-devel-1.2.7-20.el7_9.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-25.el7_9.x86_64 already installed and latest version
Nothing to do
[root@openvpn openssh-9.1p1]# mv /etc/ssh /etc/ssh.bak
[root@openvpn openssh-9.1p1]# ./configure --with-md5-passwords --with-pam --with-selinux --with-privsep-path=/var/lib
/sshd/ --sysconfdir=/etc/ssh --with-ssl-dir=/usr/local/openssl-1.1.1s/lib
[root@openvpn openssh-9.1p1]# make && make install
[root@openvpn openssh-9.1p1]# mv /etc/ssh.bak/sshd_config /etc/ssh/sshd_config
mv: overwrite ‘/etc/ssh/sshd_config’? y
最后文章來源:http://www.zghlxwxcb.cn/news/detail-808634.html
[root@openvpn openssh-9.1p1]# systemctl daemon-reload
[root@openvpn openssh-9.1p1]# systemctl restart sshd
[root@openvpn openssh-9.1p1]# ssh -V
OpenSSH_9.1p1, OpenSSL 1.1.1s 1 Nov 2022
四、關于openssh和openssl簡單介紹
OpenSSL
OpenSSL是一個強大的安全套接字層密碼庫,囊括主要的密碼算法、常用的密鑰和證書封裝管理功能及SSL協(xié)議,并提供豐富的應用程序供測試或其它目的使用。
Apache使用它加密HTTPS,OpenSSH使用它加密SSH,但是,你不應該只將其作為一個庫來使用,它還是一個多用途的、跨平臺的密碼工具。
OpenSSL整個軟件包大概可以分成三個主要的功能部分:密碼算法庫、SSL協(xié)議庫以及應用程序。OpenSSL的目錄結構自然也是圍繞這三個功能部分進行規(guī)劃的,也可以建立私有CA證書等。
OpenSSL和OpenSSH的區(qū)別
SSL是通訊鏈路的附加層。可以包含很多協(xié)議。https, ftps
SSH只是加密的shell,最初是用來替代telnet的。通過port forward,也可以讓其他協(xié)議通過ssh的隧道而起到加密的效果。
OpenSSL------一個C語言函數庫,是對SSL協(xié)議的實現。
OpenSSH-----是對SSH協(xié)議的實現。
SSH 利用 OpenSSL 提供的庫。OpenSSH依賴于OpenSSL ,沒有OpenSSL 的話OpenSSH 就編譯不過去,也運行不了。文章來源地址http://www.zghlxwxcb.cn/news/detail-808634.html
到了這里,關于關于OpenSSL1.0.2k-fip升級修復漏洞的文章就介紹完了。如果您還想了解更多內容,請在右上角搜索TOY模板網以前的文章或繼續(xù)瀏覽下面的相關文章,希望大家以后多多支持TOY模板網!