Bugzilla – Bug 984001
VUL-0: CVE-2016-5360: haproxy: remote denial of service attack via reqdeny
Last modified: 2016-06-20 12:29:00 UTC
http://git.haproxy.org/?p=haproxy-1.6.git;a=commit;h=60f01f8c89e4fb2723d5a9f2046286e699567e0b BUG/MAJOR: http: fix breakage of "reqdeny" causing random crashes Commit 108b1dd ("MEDIUM: http: configurable http result codes for http-request deny") introduced in 1.6-dev2 was incomplete. It introduced a new field "rule_deny_status" into struct http_txn, which is filled only by actions "http-request deny" and "http-request tarpit". It's then used in the deny code path to emit the proper error message, but is used uninitialized when the deny comes from a "reqdeny" rule, causing random behaviours ranging from returning a 200, an empty response, or crashing the process. Often upon startup only 200 was returned but after the fields are used the crash happens. This can be sped up using -dM. There's no need at all for storing this status in the http_txn struct anyway since it's used immediately after being set. Let's store it in a temporary variable instead which is passed as an argument to function http_req_get_intercept_rule(). As an extra benefit, removing it from struct http_txn reduced the size of this struct by 8 bytes. This fix must be backported to 1.6 where the bug was detected. Special thanks to Falco Schmutz for his detailed report including an exploitable core and a reproducer. (cherry picked from commit 58727ec088e55f739b146cff3baa955f8d1b2a3e)
cve requested
bugbot adjusting priority
Duplicate of bsc#983972 *** This bug has been marked as a duplicate of bug 983972 ***