Bug 1477222 (CVE-2017-12425)

Summary: CVE-2017-12425 varnish: Missing check for integer overflow when handling chunk sizes in HTTP requests
Product: [Other] Security Response Reporter: Adam Mariš <amaris>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: carnil, dkholia, hhorak, ingvar, jorton, luhliari, security-response-team
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: varnish 4.0.5, varnish 4.1.8, varnish 5.1.3 Doc Type: If docs needed, set a value
Doc Text:
An integer overflow flaw, leading to assertion failure, was found in the way Varnish handled chunk sizes in HTTP requests. A remote attacker could use this flaw to make the Varnish daemon restart unexpectedly due to an assertion failure by sending a specially crafted HTTP request.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-08 05:20:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1476784, 1477698, 1477699    
Bug Blocks: 1477246    
Attachments:
Description Flags
varnish 4.0 patch
none
varnish 4.1 patch
none
varnish 5.0 patch
none
varnish 5.1 patch none

Description Adam Mariš 2017-08-01 13:50:47 UTC
Missing check for integer overflow was found in the code handling chunk sizes in HTTP requests. The vulnerability opens up for denial of service (DOS) attacks by a specially crafted HTTP request, which will cause the Varnish daemon to assert and restart, clearing the cache in the process. There is no risk for information leakage or remote execution. The vulnerability is present in all releases of Varnish Cache since version 4.0.1.

Comment 1 Adam Mariš 2017-08-01 13:50:51 UTC
Acknowledgments:

Name: the Varnish Cache project

Comment 2 Adam Mariš 2017-08-01 14:41:52 UTC
Created attachment 1307655 [details]
varnish 4.0 patch

Comment 3 Adam Mariš 2017-08-01 14:42:25 UTC
Created attachment 1307656 [details]
varnish 4.1 patch

Comment 4 Adam Mariš 2017-08-01 14:42:52 UTC
Created attachment 1307657 [details]
varnish 5.0 patch

Comment 5 Adam Mariš 2017-08-01 14:43:14 UTC
Created attachment 1307658 [details]
varnish 5.1 patch

Comment 9 Adam Mariš 2017-08-02 16:12:01 UTC
External References:

https://www.varnish-cache.org/security/VSV00001.html

Comment 10 Adam Mariš 2017-08-02 16:12:27 UTC
Created varnish tracking bugs for this issue:

Affects: epel-all [bug 1477699]
Affects: fedora-all [bug 1477698]