天天看點

Apache HTTPD DoS 漏洞CVE-2016-8740 綠盟科技釋出安全威脅通告

2016年12月5日(當地時間),seclists.org網站釋出了一條關于apache網頁伺服器拒絕服務漏洞的消息,漏洞編号為cve-2016-8740。官方尚未釋出該漏洞的版本更新。綠盟科技釋出安全威脅通告,原文見文末。

該漏洞存在于mod_http2子產品中,這是從apache httpd 2.4.17版本開始引入的關于http/2協定的子產品。然而該子產品在預設情況下不被編譯,且預設不啟用,該漏洞隻影響使用http/2協定的使用者。在使用http/2協定的伺服器上,攻擊者可以通過發送精心構造的請求,導緻伺服器記憶體耗盡,造成拒絕服務。

apache has limits on the number and length of request header fields. which limits the amount of memory a client can allocate on the server for a request. version 2.4.17 of the apache http server introduced an experimental feature: mod_http2 for the http/2 protocol (rfc7540, previous versions were known as google spdy). this module is not compiled in by default -and- is not enabled by default, although some distribution may have chosen to do so. it is generally needs to be enabled in the 'protocols' line in httpd by adding 'h2' and/or 'h2c' to the 'http/1.1' only default. the default distributions of the apache software foundation do not include this experimental feature.

- from version 2.4.17, upto and including version 2.4.23 the server failed to take the limitations on request memory use into account when providing access to a resource over http/2. this issue has been fixed in version 2.4.23 (r1772576). as a result - with a request using the http/2 protocol a specially crafted request can allocate memory on the server until it reaches its limit. this can lead to denial of service for all requests against the server.

<a href="http://seclists.org/oss-sec/2016/q4/595">http://seclists.org/oss-sec/2016/q4/595</a>

成功利用漏洞後,耗盡伺服器記憶體,導緻拒絕服務攻擊。

http/2(超文本傳輸協定第2版,最初命名為http 2.0),是http協定的的第二個主要版本,使用于網際網路。http/2是http協定自1999年http 1.1釋出後的首個更新,主要基于spdy協定。它由網際網路工程任務組(ietf)的hypertext transfer protocol bis(httpbis)工作小組進行開發。http/2的目标包括異步連接配接複用,頭壓縮和請求回報管線化并保留與http 1.1的完全語義相容。(引用自《維基百科》)

受影響的版本

apache httpd version 2.4.17

apache httpd version 2.4.18

apache httpd version 2.4.20

apache httpd version 2.4.23

不受影響的版本

github上已經對該漏洞進行了源代碼修複,部分修複情況如下所示。

修複代碼中增加了對h2_stream_add_header函數傳回值重置狀态的判斷。

Apache HTTPD DoS 漏洞CVE-2016-8740 綠盟科技釋出安全威脅通告

圖1 代碼修複截圖(1)

修複代碼中修改了對已添加頭部的檢查,并且在條件不成立時,傳回的狀态為“重置連接配接”。

Apache HTTPD DoS 漏洞CVE-2016-8740 綠盟科技釋出安全威脅通告

圖2 代碼修複截圖(2)

源代碼修複位址如下:

<a href="https://github.com/apache/httpd/commit/29c63b786ae028d82405421585e91283c8fa0da3">https://github.com/apache/httpd/commit/29c63b786ae028d82405421585e91283c8fa0da3</a>

apache官方尚未釋出版本更新,然而github上已經對該漏洞進行了源代碼修複,建議使用者下載下傳最新的源碼編譯安裝。github連結位址如下:

<a href="https://github.com/apache/httpd">https://github.com/apache/httpd</a>

作為臨時的緩解政策,已經啟用http/2的使用者也可以從配置檔案的“protocols”行中删除“h2”和“h2c”進而禁用http/2 。

本安全公告僅用來描述可能存在的安全問題,綠盟科技不為此安全公告提供任何保證或承諾。由于傳播、利用此安全公告所提供的資訊而造成的任何直接或者間接的後果及損失,均由使用者本人負責,綠盟科技以及安全公告作者不為此承擔任何責任。綠盟科技擁有對此安全公告的修改和解釋權。如欲轉載或傳播此安全公告,必須保證此安全公告的完整性,包括版權聲明等全部内容。未經綠盟科技允許,不得任意修改或者增減此安全公告内容,不得以任何方式将其用于商業目的。

apache httpd漏洞的相關文章請參看

<a href="http://toutiao.secjia.com/cnvd-report-weekly-2016-32#">看完cncert周報再來看cnvd周報 報告提示flash及http2.0漏洞值得關注</a>

原文釋出時間:2017年3月24日 

本文由:綠盟科技 釋出,版權歸屬于原作者

原文連結:http://toutiao.secjia.com/apache-httpd-dos-cve-2016-8740

本文來自雲栖社群合作夥伴安全加,了解相關資訊可以關注安全加網站