V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
hitrust
V2EX  ›  NGINX

Nginx 多个版本出现中危敏感信息泄露漏洞

  •  1
     
  •   hitrust · 2017-07-15 08:11:38 +08:00 · 9761 次点击
    这是一个创建于 2448 天前的主题,其中的信息可能已经有所发展或是发生改变。

    2017 年 7 月 11 日,Nginx 官方发布最新的安全公告,在 Nginx 范围过滤器中发现了一个安全问题( CVE-2017-7529 ),通过精心构造的恶意请求可能会导致整数溢出并且不正确处理范围,从而导致敏感信息泄漏。

    当使用 Nginx 标准模块时,如果文件头从缓存返回响应,允许攻击者获取缓存文件头。在某些配置中,缓存文件头可能包含后端服务器 IP 地址或其他敏感信息。

    此外,如果使用第三方模块有潜在的可能导致拒绝服务。

    影响版本

    Nginx 0.5.6-1.13.2

    漏洞等级

    中危

    受影响网站:

    安全指数分析中国互联网共有 713651 个网站受到影响。

    修复建议

    升级 Nginx 到最新无漏洞版本,当前 1.13.3,1.12.1 版本中已修复了这个问题。

    http://mailman.nginx.org/pipermail/nginx-announce/2017/000200.html

    21 条回复    2017-07-18 19:48:39 +08:00
    greenskinmonster
        1
    greenskinmonster  
       2017-07-15 08:21:33 +08:00
    谢谢,updating ~~~
    zrj766
        2
    zrj766  
       2017-07-15 08:29:45 +08:00 via Android
    前几天已更新
    kn007
        3
    kn007  
       2017-07-15 08:47:33 +08:00
    在 11 号就更新过了。。
    zuolan
        4
    zuolan  
       2017-07-15 08:48:15 +08:00
    敏感信息泄漏是指什么?
    hitrust
        5
    hitrust  
    OP
       2017-07-15 08:53:43 +08:00
    @zrj766
    @kn007
    11 号发布的,因为看到 nginx 节点没有这条,所以就发了
    hitrust
        6
    hitrust  
    OP
       2017-07-15 08:55:59 +08:00
    @zuolan
    allows an attacker to obtain a cache file header if a response was returned from cache. In some configurations a cache file header may contain IP address of the backend server or other sensitive information.
    thinker3
        7
    thinker3  
       2017-07-15 09:05:23 +08:00
    怎么更新呢
    yvanhom
        8
    yvanhom  
       2017-07-15 09:17:07 +08:00
    openresty 也得更进更新?
    DoraJDJ
        9
    DoraJDJ  
       2017-07-15 09:37:57 +08:00
    惨了,已经安装原有 Nginx 的 Ubuntu,尝试从官方软件源更新 Nginx 失败。

    Unpacking nginx (1.12.1-1~xenial) over (1.10.3-0ubuntu0.16.04.2) ...
    dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.1-1~xenial_amd64.deb (--unpack):
    trying to overwrite '/etc/nginx/uwsgi_params', which is also in package nginx-common 1.10.3-0ubuntu0.16.04.2
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
    /var/cache/apt/archives/nginx_1.12.1-1~xenial_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    又不想丢失现有的配置文件,莫非真的要卸载重装?
    zjsxwc
        10
    zjsxwc  
       2017-07-15 09:41:43 +08:00
    如何操作利用这个漏洞?
    privil
        11
    privil  
       2017-07-15 09:49:09 +08:00
    @DoraJDJ ……你就不会先备份配置文件么
    elepover
        12
    elepover  
       2017-07-15 10:24:51 +08:00 via Android   ❤️ 2
    @DoraJDJ 把 /etc/nginx 下的配置文件备份出来再重装啊...
    Arch 一路滚包的路过(
    DoraJDJ
        13
    DoraJDJ  
       2017-07-15 10:36:30 +08:00
    @privil
    @elepover 好,现在是全新安装:
    Unpacking nginx (1.12.1-1~xenial) ...
    dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.1-1~xenial_amd64.deb (--unpack):
    trying to overwrite '/etc/nginx/uwsgi_params', which is also in package nginx-common 1.10.3-0ubuntu0.16.04.2
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
    /var/cache/apt/archives/nginx_1.12.1-1~xenial_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    一样报错,Ubuntu 你****
    MrMario
        14
    MrMario  
       2017-07-15 10:53:21 +08:00 via iPhone
    慌不要慌,该漏洞需启用 cache alice,其次支持 Range 头,才会被利用
    mytsing520
        15
    mytsing520  
       2017-07-15 10:54:42 +08:00
    /t/374739
    之前已经发过了,不谢 @hitrust
    MrMario
        16
    MrMario  
       2017-07-15 11:07:56 +08:00   ❤️ 1
    除了版本升级外,也有缓解措施
    1.在 http/server/location 配置
    max_ranges 1;
    该配置下 range 头会失效,无法正常获取需要的部分文件大小

    2.打补丁,自行编译
    补丁链接: http://nginx.org/download/patch.2017.ranges.txt

    3.不使用 Nginx 的 proxy_cache
    gongjianwei
        17
    gongjianwei  
       2017-07-15 11:31:43 +08:00 via Android
    更新已滚
    bingkubei
        18
    bingkubei  
       2017-07-15 12:12:00 +08:00
    感觉没什么用,要求苛刻,已现在的设置来讲很难暴露后端 IP
    Showfom
        19
    Showfom  
       2017-07-15 18:19:49 +08:00 via iPhone
    @DoraJDJ 用 nginx 的 ppa 呀
    hitrust
        20
    hitrust  
    OP
       2017-07-16 11:25:59 +08:00
    @DoraJDJ
    try force overwrite
    notolddriver
        21
    notolddriver  
       2017-07-18 19:48:39 +08:00
    如果没有开启 cache 是不是就不影响了呢?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1262 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 17:53 · PVG 01:53 · LAX 10:53 · JFK 13:53
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.