nginx漏洞分析与升级修复

 

一 、此次漏洞分析

1 nginx HTTP/2漏洞

[nginx-announce] nginx安全公告(CVE-2018-16843,CVE-2018-16844)
在nginx HTTP / 2实现中发现了两个安全问题,
漏洞对服务器的影响:
可能会导致过多的内存消耗(CVE-2018-16843)和CPU使用率(CVE-2018-16844)。
影响范围:
这些问题会影响使用ngx_http_v2_module编译的nginx(不是默认情况下编译)如果“listen”指令的“http2”选项是用于配置文件。
影响版本:
这些问题会影响nginx 1.9.5 - 1.15.5。
解决方法:
问题在nginx 1.15.6,1.14.1中得到修复。建议升级到最新稳定版

以上内容参考:
 upload/201811141158344277.gif" alt="复制代码" style="margin: 0px; padding: 0px; max-width: 800px; height: auto; border: none !important;" />

./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module 
--with-http_ssl_module --with-http_gzip_static_module --with-http_flv_module --with-http_realip_module
--with-http_auth_request_module --with-http_auth_request_module --add-module=/usr/local/src/nginx-auth-ldap
--add-module=/usr/local/src/headers-more-nginx-module-master --with-cc-opt=-Wno-error
复制代码

5 编译

make

6 备份原来sbin/nginx

复制代码
cd /usr/local/nginx/sbin/mv nginx nginx.back
复制代码

7 复制nginx-1.14.1/objs/nginx到/usr/local/nginx/sbin/

复制代码
cp nginx-1.14.1/objs/nginx /usr/local/nginx/sbin/
复制代码

8 升级

复制代码
cd nginx-1.14.1make upgrade
复制代码

输出如下:

复制代码
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful kill -USR2 `cat /usr/local/nginx/logs/nginx.pid` sleep 1 test -f /usr/local/nginx/logs/nginx.pid.oldbin kill -QUIT `cat /usr/local/nginx/logs/nginx.pid.oldbin`
复制代码

或者输出为以下内容: 

复制代码
/usr/local/nginx/sbin/nginx -
                        
关键字:
50000+
5万行代码练就真实本领
17年
创办于2008年老牌培训机构
1000+
合作企业
98%
就业率

联系我们

电话咨询

0532-85025005

扫码添加微信