haproxy/src
Willy Tarreau 320ec2a745 BUG/MEDIUM: chunks: always reject negative-length chunks
The recent addition of "show env" on the CLI has revealed an interesting
design bug. Chunks are supposed to support a negative length to indicate
that they carry no data. chunk_printf() sets this size to -1 if the string
is too large for the buffer. At a few places in the http engine we may end
up with trash.len = -1. But bi_putchk(), chunk_appendf() and a few other
chunks consumers don't consider this case as possible and will use such a
chunk, possibly restoring an invalid string or trying to copy -1 bytes.

This fix takes care of clarifying the situation in a backportable way
where such sizes are used, so that a negative length indicating an error
remains present until the chunk is reinitialized or overwritten. But a
cleaner design adjustment needs to be done so that there's a clear contract
on how to use these chunks. At first glance it doesn't seem *that* useful
to support negative sizes, so probably this is what should change.

This fix must be backported to 1.6 and 1.5.
2016-02-25 16:24:14 +01:00
..
51d.c CLEANUP: 51d: Aligned if statements with HAProxy best practices and removed casts from malloc. 2016-01-13 12:10:44 +01:00
acl.c BUG/MEDIUM: acl: always accept match "found" 2015-09-24 16:38:48 +02:00
applet.c MINOR: stream-int: rename si_applet_done() to si_applet_wake_cb() 2015-09-25 21:16:02 +02:00
arg.c BUG/MINOR: args: add name for ARGT_VAR 2015-09-21 20:57:12 +02:00
auth.c MINOR: samples: rename union from "data" to "u" 2015-08-20 17:13:46 +02:00
backend.c BUG/MAJOR: http-reuse: fix risk of orphaned connections 2016-02-03 21:23:08 +01:00
base64.c [MINOR] add encode/decode function for 30-bit integers from/to base64 2010-10-30 19:04:33 +02:00
buffer.c BUG/MEDIUM: buffers: do not round up buffer size during allocation 2016-01-25 02:31:18 +01:00
cfgparse.c BUG/MEDIUM: stats: stats bind-process doesn't propagate the process mask correctly 2016-02-24 07:38:37 +01:00
channel.c BUG/MEDIUM: chunks: always reject negative-length chunks 2016-02-25 16:24:14 +01:00
checks.c MINOR: mailers: make it possible to configure the connection timeout 2016-02-20 15:33:06 +01:00
chunk.c BUG/MEDIUM: chunks: always reject negative-length chunks 2016-02-25 16:24:14 +01:00
compression.c REORG: filters: Prepare creation of the HTTP compression filter 2016-02-09 14:53:15 +01:00
connection.c BUG/MAJOR: connection: fix TLV offset calculation for proxy protocol v2 parsing 2015-07-03 17:05:20 +02:00
da.c BUG/MEDIUM: da: stop DeviceAtlas processing in the convertor if there is no input. 2015-12-03 11:37:01 +01:00
dns.c MEDIUM: dns: add a "resolve-net" option which allow to prefer an ip in a network 2016-02-19 14:37:49 +01:00
dumpstats.c MINOR: server: generalize the "updater" source 2016-02-24 23:37:39 +01:00
ev_epoll.c CLEANUP: poll: move the conditions for waiting out of the poll functions 2015-04-13 20:47:51 +02:00
ev_kqueue.c CLEANUP: poll: move the conditions for waiting out of the poll functions 2015-04-13 20:47:51 +02:00
ev_poll.c CLEANUP: poll: move the conditions for waiting out of the poll functions 2015-04-13 20:47:51 +02:00
ev_select.c CLEANUP: poll: move the conditions for waiting out of the poll functions 2015-04-13 20:47:51 +02:00
fd.c MAJOR: polling: centralize calls to I/O callbacks 2014-11-21 20:37:32 +01:00
filters.c MINOR: filters: Extract proxy stuff from the struct filter 2016-02-09 14:53:15 +01:00
flt_http_comp.c MINOR: filters: Extract proxy stuff from the struct filter 2016-02-09 14:53:15 +01:00
flt_trace.c MINOR: filters: Extract proxy stuff from the struct filter 2016-02-09 14:53:15 +01:00
freq_ctr.c BUG/MINOR: time: frequency counters are not totally accurate 2012-12-29 21:50:07 +01:00
frontend.c MINOR: samples: rename union from "data" to "u" 2015-08-20 17:13:46 +02:00
haproxy-systemd-wrapper.c BUILD/CLEANUP: systemd: avoid a warning due to mixed code and declaration 2015-03-04 10:11:57 +01:00
haproxy.c MEDIUM: log: add a new log format flag "E" 2016-02-12 13:36:47 +01:00
hash.c MINOR: hash: add new function hash_crc32 2015-01-20 19:48:05 +01:00
hdr_idx.c OPTIM/MINOR: move the hdr_idx pools out of the proxy struct 2011-10-24 18:15:04 +02:00
hlua_fcn.c DOC: lua: copyrights 2016-02-19 13:24:21 +01:00
hlua.c BUG/MINOR: lua: Useless copy 2016-02-23 22:42:47 +01:00
i386-linux-vsys.c MEDIUM: listener: add support for linux's accept4() syscall 2012-10-08 20:11:03 +02:00
lb_chash.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_fas.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_fwlc.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_fwrr.c REORG/MEDIUM: server: split server state and flags in two different variables 2014-05-22 11:27:00 +02:00
lb_map.c MINOR: server: make use of srv_is_usable() instead of checking eweight 2014-05-23 14:29:11 +02:00
listener.c MINOR: samples: rename union from "data" to "u" 2015-08-20 17:13:46 +02:00
log.c MEDIUM: log: add a new log format flag "E" 2016-02-12 13:36:47 +01:00
lru.c MINOR: lru: new function to delete <nb> least recently used keys 2016-01-11 07:31:35 +01:00
mailers.c MEDIUM: Add parsing of mailers section 2015-02-03 00:24:16 +01:00
map.c MINOR: map: Add regex matching replacement 2016-02-10 23:38:34 +01:00
memory.c MEDIUM: pools: add a new flag to avoid rounding pool size up 2016-01-25 02:31:18 +01:00
namespace.c BUG/MEDIUM: namespaces: don't fail if no namespace is used 2015-10-20 15:29:00 +02:00
pattern.c MINOR: map: Add regex matching replacement 2016-02-10 23:38:34 +01:00
payload.c BUG/MINOR: acl: don't use record layer in req_ssl_ver 2015-11-05 14:10:06 +01:00
peers.c BUG/MEDIUM: peers: table entries learned from a remote are pushed to others after a random delay. 2015-12-16 15:50:22 +01:00
pipe.c BUILD/MINOR: silent a build warning in src/pipe.c (fcntl) 2011-10-24 17:09:22 +02:00
proto_http.c MINOR: filters/http: Forward remaining data when a channel has no "data" filters 2016-02-09 14:53:15 +01:00
proto_tcp.c MEDIUM: server: implement TCP_USER_TIMEOUT on the server 2015-10-13 16:18:27 +02:00
proto_udp.c MEDIUM: protocol: add minimalist UDP protocol client 2015-06-13 22:07:35 +02:00
proto_uxst.c MINOR: unix: don't mention free ports on EAGAIN 2016-01-26 21:11:51 +01:00
protocol.c MEDIUM: protocol: use a family array to index the protocol handlers 2015-02-28 23:12:31 +01:00
proxy.c MINOR: filters: Extract proxy stuff from the struct filter 2016-02-09 14:53:15 +01:00
queue.c REORG/MEDIUM: stream: rename stream flags from SN_* to SF_* 2015-04-06 11:23:57 +02:00
raw_sock.c BUG/MINOR: raw_sock: also consider ENOTCONN in addition to EAGAIN for recv() 2014-03-04 07:27:18 +01:00
rbtree.c [MINOR] imported the rbtree function from Linux kernel 2007-01-07 02:12:57 +01:00
regex.c MEDIUM: regex: add support for passing regex flags to regex_exec_match() 2015-01-22 14:24:53 +01:00
sample.c MEDIUM: logs: add a new RFC5424 log-format for the structured-data 2015-09-28 14:01:27 +02:00
server.c MINOR: server: generalize the "updater" source 2016-02-24 23:37:39 +01:00
session.c MAJOR: filters: Add filters support 2016-02-09 14:53:15 +01:00
shctx.c MINOR: stats: add counters for SSL cache lookups and misses 2014-05-28 16:53:04 +02:00
signal.c BUG/MEDIUM: signal: signal handler does not properly check for signal bounds 2013-01-24 16:19:19 +01:00
ssl_sock.c BUG/MEDIUM: ssl: fix off-by-one in NPN list allocation 2016-02-12 17:11:12 +01:00
standard.c MINOR: common: mask conversion 2016-02-19 14:37:41 +01:00
stick_table.c BUG/MINOR: counters: make the sc-inc-gpc0 and sc-set-gpt0 touch the table 2016-01-25 14:56:33 +01:00
stream_interface.c BUG/MEDIUM: stream-int: avoid double-call to applet->release 2015-09-25 21:16:03 +02:00
stream.c MEDIUM: filters: Replace filter_http_headers callback by an analyzer 2016-02-09 14:53:15 +01:00
task.c REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
time.c BUG/MINOR: time: frequency counters are not totally accurate 2012-12-29 21:50:07 +01:00
trace.c MINOR: add a new function call tracer for debugging purposes 2012-05-26 00:12:37 +02:00
uri_auth.c BUG/MEDIUM: uri_auth: missing NULL check and memory leak on memory shortage 2013-01-24 16:19:19 +01:00
vars.c MEDIUM: actions: pass a new "flags" argument to custom actions 2015-09-27 11:04:06 +02:00
xxhash.c IMPORT: hash: import xxhash-r39 2015-04-29 19:15:21 +02:00