OpenSSL漏洞修复脚本
漏洞描述
OpenSSL官方发布安全公告,披露CVE-2020-1971 OpenSSL GENERAL_NAME_cmp 拒绝服务漏洞。当两个GENERAL_NAME都包含同一个EDIPARTYNAME时,由于GENERAL_NAME_cmp函数未能正确处理,从而导致空指针引用,并可能导致拒绝服务
修复方案
将OpenSSL修复至安全版本
安全版本
OpenSSL 1.1.1i
OpenSSL 1.0.2x
1.背景
由于多台主机存在版本漏洞,单独修复效率过低。
2.OpenSSL漏洞修复脚本
#!/bin/bash
#auth:chenl
#version:v1.0
#func:openssl 升级
# 定义安装目录、及日志信息
. /etc/init.d/functions
[ $(id -u) != "0" ] && echo "Error: You must be root to run this script" && exit 1
log_dir=/root/log/
log_file=openssl.log
openssl_url=https://www.openssl.org/source/openssl-1.1.1i.tar.gz
openssl_name=$(echo $openssl_url|awk -F'/' '{print $NF}')
clear
cat <<EOF
+++++++++ openssl updata +++++++++
EOF
# 传入内容,格式化内容输出,可以传入多个参数,用空格隔开
output_msg() {
for msg in $*;do
action $msg /bin/true
done
}
#判断软件依赖报
check_yum_command

本文介绍了OpenSSL的CVE-2020-1971拒绝服务漏洞,提供了一个修复脚本,帮助在CentOS服务器上将OpenSSL更新到安全版本1.1.1i或1.0.2x,以提升系统的安全性。适合运维新手参考。
最低0.47元/天 解锁文章
493





