haproxy/include/types
Willy Tarreau 9dc1c61c43 BUG/CRITICAL: http: don't update msg->sov once data start to leave the buffer
Commit bb2e669 ("BUG/MAJOR: http: correctly rewind the request body
after start of forwarding") was incorrect/incomplete. It used to rely on
CF_READ_ATTACHED to stop updating msg->sov once data start to leave the
buffer, but this is unreliable because since commit a6eebb3 ("[BUG]
session: clear BF_READ_ATTACHED before next I/O") merged in 1.5-dev1,
this flag is only ephemeral and is cleared once all analysers have
seen it. So we can start updating msg->sov again each time we pass
through this place with new data. With a sufficiently large amount of
data, it is possible to make msg->sov wrap and validate the if()
condition at the top, causing the buffer to advance by about 2GB and
crash the process.

Note that the offset cannot be controlled by the attacker because it is
a sum of millions of small random sizes depending on how many bytes were
read by the server and how many were left in the buffer, only because
of the speed difference between reading and writing. Also, nothing is
written, the invalid pointer resulting from this operation is only read.

Many thanks to James Dempsey for reporting this bug and to Chris Forbes for
narrowing down the faulty area enough to make its root cause analysable.

This fix must be backported to haproxy 1.5.
2014-09-02 16:48:54 +02:00
..
acl.h BUG/MEDIUM: patterns: last fix was still not enough 2014-04-28 14:19:17 +02:00
arg.h MINOR: tcp: prepare support for the "capture" action 2014-06-13 16:32:48 +02:00
auth.h MAJOR: auth: Change the internal authentication system. 2014-03-17 18:06:06 +01:00
backend.h MEDIUM: backend: add support for the wt6 hash 2013-11-14 16:37:50 +01:00
capture.h MINOR: capture: extend the captures to support non-header keys 2014-06-13 16:32:48 +02:00
channel.h BUG/CRITICAL: http: don't update msg->sov once data start to leave the buffer 2014-09-02 16:48:54 +02:00
checks.h MEDIUM: Add external check 2014-06-20 07:10:07 +02:00
compression.h MEDIUM: compression: use pool for comp_ctx 2012-11-21 01:56:47 +01:00
connection.h MEDIUM: connection: add new bit in Proxy Protocol V2 2014-08-23 07:35:29 +02:00
counters.h MEDIUM: session: maintain per-backend and per-server time statistics 2014-06-17 17:15:56 +02:00
fd.h BUG/MEDIUM: polling: fix possible CPU hogging of worker processes after receiving SIGUSR1. 2014-05-20 14:57:36 +02:00
freq_ctr.h [MINOR] freq_ctr: add new types and functions for periods different from 1s 2010-08-10 14:01:09 +02:00
global.h BUILD: fix dependencies between config and compat.h 2014-07-15 19:09:36 +02:00
hdr_idx.h
lb_chash.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_fas.h MEDIUM: backend: add the 'first' balancing algorithm 2012-02-21 22:27:27 +01:00
lb_fwlc.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_fwrr.h [MEDIUM] build: switch ebtree users to use new ebtree version 2009-10-26 21:10:04 +01:00
lb_map.h [CLEANUP] proxy: move last lb-specific bits to their respective files 2009-10-03 18:41:18 +02:00
listener.h MEDIUM: listener: parse the new "process" bind keyword 2014-05-09 19:16:26 +02:00
log.h MINOR: log: add a new field "%lc" to implement a per-frontend log counter 2014-08-28 15:08:14 +02:00
map.h MAJOR: pattern/map: Extends the map edition system in the patterns 2014-03-17 18:06:07 +01:00
obj_type.h DIET/MINOR: obj: pack the obj_type enum to 8 bits 2013-12-09 16:06:08 +01:00
pattern.h BUG/MEDIUM: patterns: last fix was still not enough 2014-04-28 14:19:17 +02:00
peers.h CLEANUP: Remove unused 'last_slowstart_change' field from struct peer 2013-11-19 08:04:59 +01:00
pipe.h [MEDIUM] introduce pipe pools 2009-01-25 13:49:53 +01:00
port_range.h [MEDIUM] add support for binding to source port ranges during connect 2009-06-10 12:23:32 +02:00
proto_http.h MEDIUM: http: add the track-sc* actions to http-request rules 2014-07-16 17:26:40 +02:00
proto_tcp.h MINOR: tcp: prepare support for the "capture" action 2014-06-13 16:32:48 +02:00
protocol.h MEDIUM: listener: implement a per-protocol pause() function 2014-07-08 01:13:34 +02:00
proxy.h MINOR: log: add a new field "%lc" to implement a per-frontend log counter 2014-08-28 15:08:14 +02:00
queue.h
sample.h MINOR: configuration: File and line propagation 2014-03-17 18:06:08 +01:00
server.h MEDIUM: Add external check 2014-06-20 07:10:07 +02:00
session.h CLEANUP: session: move the stick counters declarations to stick_table.h 2014-07-16 17:26:40 +02:00
signal.h [MEDIUM] signals: add support for registering functions and tasks 2010-08-27 18:00:40 +02:00
ssl_sock.h MEDIUM: ssl: improve crt-list format to support negation 2013-05-07 22:11:54 +02:00
stick_table.h CLEANUP: session: move the stick counters declarations to stick_table.h 2014-07-16 17:26:40 +02:00
stream_interface.h MEDIUM: dumpstats: Display error message during add of values. 2014-03-17 18:06:08 +01:00
task.h DIET/MINOR: task: reduce struct task size by 8 bytes 2013-12-09 16:06:22 +01:00
template.h