欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 美食 > nginx漏洞修复 ngx_http_mp4_module漏洞(CVE-2022-41742)【低可信】 nginx版本升级

nginx漏洞修复 ngx_http_mp4_module漏洞(CVE-2022-41742)【低可信】 nginx版本升级

2024/10/25 8:01:00 来源:https://blog.csdn.net/weixin_44578029/article/details/140636708  浏览:    关键词:nginx漏洞修复 ngx_http_mp4_module漏洞(CVE-2022-41742)【低可信】 nginx版本升级

风险描述:
Nginx 是一款轻量级的Web服务器、反向代理服务器。
Nginx 的受影响版本中的ngx _http_mp4_module模块存在内存越界写入漏洞,当在配置中使用 mp4 directive时,攻击者可利用此漏洞使用使用ngx_http_mp4_module模块处理特制的音频或视频文件时导致损坏Nginx worker 内存,进而导致 Nginx 工作进程终止或内存泄露。

参考链接
https://www.oschina.net/news/215155
https://www.oscs1024.com/hd/MPS-2022-58326

根据我的理解
ngx_http_mp4_module 这个模块是用于处理

模块ngx_http_mp4_module为H.264/AAC文件,主要是以.mp4、.m4v、和.m4a为扩展名的文件, 提供伪流媒体服务端支持。

所以是一个强相关需要使用的模块,不能关闭使用。


网上有很多解决方案,我决定整体升级

之前安装是使用二进制安装,本次平滑升级也使用二进制,更新到最新的稳定版本1.26

下载官网 https://nginx.org/en/download.html

在这里插入图片描述

有条件的可以使用yum (有条件指,服务器可以使用yum源安装)进行升级 https://blog.csdn.net/weilaozongge/article/details/138862749

将下载好的包上传到服务器上,解压 (大家做之前搞好备份)
在这里插入图片描述
然后输入以下命令

#nginx 依赖安装
# 配置
./configure \
--prefix=/usr/local/nginx \
--pid-path=/var/local/nginx/nginx.pid \
--lock-path=/var/local/nginx/nginx.lock \
--error-log-path=/var/local/nginx/error.log \
--http-log-path=/var/local/nginx/access.log \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/local/nginx/client \
--http-proxy-temp-path=/var/local/nginx/proxy \
--http-fastcgi-temp-path=/var/local/nginx/fastcgi \
--http-uwsgi-temp-path=/var/local/nginx/uwsgi \
--http-scgi-temp-path=/var/local/nginx/scgi \
--with-http_stub_status_module \
--with-http_ssl_module 

然后进行编译,依次输入以下内容


#make
#make install
#cd /usr/local/nginx/sbin/

然后将目前存活的nginx干掉

lsof -i:80

在这里插入图片描述
然后重新重新指定下新nginx的目录

./nginx -c /usr/local/nginx/conf/nginx.conf

在这里插入图片描述

查看版本,是否已经完成升级
在这里插入图片描述

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com