YUM方式升级Nginx到1.20.1 修补CVE-2021-23017漏洞
日前Nginx暴严重漏洞NS解析器Off-by-One堆写入漏洞,该漏洞存在于Nginx的DNS解析模块ngx_resolver_copy()。攻击者可以利用该漏洞进行远程DDos攻击,甚至远程执行。
确认的受影响版本: 0.6.18-1.20.0
确认的修补版本: 1.21.0,1.20.1
(1) vi /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
(2) yum update nginx
(3) nginx -v
nginx version: nginx/1.20.1