haproxy/src
Willy Tarreau 250b630fb9 BUG/MINOR: mux-h2: commit the current stream ID even on reject
The H2 spec says that a HEADERS frame turns an idle stream to the open
state, and it may then turn to half-closed(remote) on ES, then to close,
all at once, if we respond with RST (e.g. on error). Due to the fact that
we process a complete frame at once since h2_dec_hdrs() may reassemble
CONTINUATION frames until everything is complete, the state was only
committed after the frame was completley valid (otherwise multiple passes
could result in subsequent frames being rejected as the stream ID would
be equal to the highest one).

However this is not correct because it means that a client may retry on
the same ID as a previously failed one, which technically is forbidden
(for example the client couldn't know which of them a WINDOW_UPDATE or
RST_STREAM frame is for).

In practice, due to the error paths, this would only be possible when
failing to decode HPACK while leaving the HPACK stream intact, thus
when the valid decoded HPACK stream cannot be turned into a valid HTTP
representation, e.g. when the resulting headers are too large for example.
The solution to avoid this consists in committing the stream ID on this
error path as well. h2spec continues to be happy.

Thanks to Annika Wickert and Tim Windelschmidt for reporting this issue.

This fix must be backported to all stable versions.
2023-10-20 21:09:12 +02:00
..
acl.c MINOR: acl: add acl() sample fetch 2023-08-01 10:49:06 +02:00
action.c MINOR: support for http-request set-timeout client 2023-09-28 08:49:22 +02:00
activity.c MINOR: checks: maintain counters of active checks per thread 2023-09-01 08:26:06 +02:00
applet.c MINOR: stconn: Start to introduce mux-to-mux fast-forwarding notion 2023-10-17 18:51:13 +02:00
arg.c CLEANUP: arg: remove extra check in make_arg_list arg escaping 2022-11-22 16:27:52 +01:00
auth.c MINOR: auth: silence null dereference warning in check_user() 2022-11-24 15:24:02 +01:00
backend.c MINOR: tree-wide: Only rely on co_data() to check channel emptyness 2023-10-17 18:51:13 +02:00
base64.c BUG/MINOR: base64: base64urldec() ignores padding in output size check 2021-08-25 16:14:14 +02:00
cache.c MEDIUM: cache: Add "Origin" header to secondary cache key 2023-10-05 10:53:54 +02:00
calltrace.c BUG/MINOR: calltrace: fix 'now' being used in place of 'date' 2023-04-27 18:14:57 +02:00
cbuf.c CLEANUP: pool/tree-wide: remove suffix "_pool" from certain pool names 2022-06-23 11:49:09 +02:00
cfgcond.c MINOR: protocol: move the global reuseport flag to the protocols 2023-04-23 09:46:15 +02:00
cfgdiag.c CLEANUP: assorted typo fixes in the code and comments 2021-04-26 10:42:58 +02:00
cfgparse-global.c MINOR: global: Add an option to disable the zero-copy forwarding 2023-10-17 18:51:13 +02:00
cfgparse-listen.c MEDIUM: log/balance: support for the "hash" lb algorithm 2023-10-13 10:05:06 +02:00
cfgparse-quic.c MINOR: quic: define quic-socket bind setting 2023-10-03 16:49:26 +02:00
cfgparse-ssl.c MINOR: ssl: add an explicit error when 'ciphersuites' are not supported 2023-10-09 14:46:09 +02:00
cfgparse-tcp.c BUG/MINOR: cfgparse-tcp: leak when re-declaring interface from bind line 2023-06-06 15:15:17 +02:00
cfgparse-unix.c CLEANUP: tree-wide: remove 25 occurrences of unneeded fcntl.h 2022-04-26 10:59:48 +02:00
cfgparse.c MINOR: cfgparse: rename "rev@" prefix to "rhttp@" 2023-10-20 14:44:37 +02:00
channel.c MINOR: tree-wide: Only rely on co_data() to check channel emptyness 2023-10-17 18:51:13 +02:00
check.c BUILD: checks: shut up yet another stupid gcc warning 2023-09-04 19:38:51 +02:00
chunk.c MEDIUM: init: initialize the trash earlier 2023-09-08 16:25:19 +02:00
cli.c BUG/MEDIUM: master/cli: Pin the master CLI on the first thread of the group 1 2023-09-13 10:26:32 +02:00
clock.c MINOR: clock: provide a function to automatically adjust now_offset 2023-05-17 09:33:54 +02:00
compression.c MINOR: compression/slz: add support for a pure flush of pending bytes 2023-06-30 16:12:36 +02:00
connection.c BUG/MAJOR: connection: make sure to always remove a connection from the tree 2023-10-12 14:20:03 +02:00
cpuset.c REORG: cpuset: move parse_cpu_set() and parse_cpumap() to cpuset.c 2023-09-08 16:25:19 +02:00
debug.c MINOR: stream: fix output alignment of stuck thread dumps 2023-09-29 16:43:07 +02:00
dgram.c MINOR: dgram: allow to set rcv/sndbuf for dgram sockets as well 2023-10-18 17:01:19 +02:00
dict.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
dns.c MEDIUM: tree-wide: Change sc API to specify required free space to progress 2023-05-05 15:44:23 +02:00
dynbuf.c DEBUG: pools: always record the caller for uncached allocs as well 2023-09-11 15:19:49 +02:00
eb32sctree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
eb32tree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
eb64tree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebimtree.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
ebistree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebmbtree.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
ebpttree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebsttree.c REORG: ebtree: move the include files from ebtree to include/import/ 2020-06-11 09:31:11 +02:00
ebtree.c BUG/MEDIUM: ebtree: use a byte-per-byte memcmp() to compare memory blocks 2020-06-16 11:30:33 +02:00
errors.c BUG/MINOR: errors: handle malloc failure in usermsgs_put() 2023-05-12 09:45:30 +02:00
ev_epoll.c MINOR: pollers: only update the local date during busy polling 2022-09-21 09:06:28 +02:00
ev_evports.c MINOR: pollers: only update the local date during busy polling 2022-09-21 09:06:28 +02:00
ev_kqueue.c MINOR: pollers: only update the local date during busy polling 2022-09-21 09:06:28 +02:00
ev_poll.c BUG/MINOR: signals/poller: ensure wakeup from signals 2022-09-09 11:15:22 +02:00
ev_select.c MEDIUM: fd/poller: turn update_mask to group-local IDs 2022-07-15 20:16:30 +02:00
event_hdl.c Revert "MAJOR: import: update mt_list to support exponential back-off" 2023-09-15 17:13:43 +02:00
extcheck.c MINOR: checks: use the lighter PRNG for spread checks 2022-10-12 21:49:30 +02:00
fcgi-app.c MEDIUM: tree-wide: logsrv struct becomes logger 2023-10-13 10:05:06 +02:00
fcgi.c BUG/MAJOR: fcgi: Fix uninitialized reserved bytes 2022-12-09 12:23:14 +01:00
fd.c BUG/MEDIUM: fd: don't wait for tmask to stabilize if we're not in it. 2023-04-13 18:04:46 +02:00
filters.c MINOR: filter: "filter" requires TCP or HTTP mode 2023-10-06 15:34:30 +02:00
fix.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
flt_bwlim.c BUG/MEDIUM: bwlim: Reset analyse expiration date when then channel analyse ends 2023-08-01 11:33:45 +02:00
flt_http_comp.c MINOR: flt_http_comp: "compression" requires TCP or HTTP mode 2023-10-06 15:34:30 +02:00
flt_spoe.c MEDIUM: tree-wide: logsrv struct becomes logger 2023-10-13 10:05:06 +02:00
flt_trace.c BUG/MINOR: trace: show wall-clock date, not internal date in show activity 2023-04-27 18:22:34 +02:00
freq_ctr.c BUG/MEDIUM: freq-ctr: Don't compute overshoot value for empty counters 2022-12-14 10:44:17 +01:00
frontend.c MEDIUM: tree-wide: logsrv struct becomes logger 2023-10-13 10:05:06 +02:00
h1.c BUG/MEDIUM: h1: Ignore C-L value in the H1 parser if T-E is also set 2023-10-04 15:34:18 +02:00
h1_htx.c MINOR: h1-htx: Declare successful tunnel establishment as bodyless 2023-10-04 15:34:18 +02:00
h2.c MINOR: h2: Set the BODYLESS_RESP flag on the HTX start-line if necessary 2023-10-17 18:51:13 +02:00
h3.c BUG/MINOR: h3: strengthen host/authority header parsing 2023-10-11 14:21:30 +02:00
h3_stats.c MINOR: h3: Add a statistics module for h3 2022-05-30 09:59:26 +02:00
haproxy.c MINOR: global: Add an option to disable the zero-copy forwarding 2023-10-17 18:51:13 +02:00
hash.c BUILD: hash: use __fallthrough in hash_djb2() 2022-11-14 11:14:02 +01:00
hlua.c MINOR: tree-wide: Only rely on co_data() to check channel emptyness 2023-10-17 18:51:13 +02:00
hlua_fcn.c Revert "MAJOR: import: update mt_list to support exponential back-off" 2023-09-15 17:13:43 +02:00
hpack-dec.c BUG/CRITICAL: http: properly reject empty http header field names 2023-02-14 08:48:54 +01:00
hpack-enc.c CLEANUP: include: tree-wide alphabetical sort of include files 2020-06-11 10:18:59 +02:00
hpack-huff.c BUG/MEDIUM: hpack: fix incorrect huffman decoding of some control chars 2023-01-26 11:36:39 +01:00
hpack-tbl.c BUILD/DEBUG: hpack-tbl: fix format string in standalone debug code 2022-04-12 08:30:08 +02:00
hq_interop.c BUG/MINOR: hq-interop: simplify parser requirement 2023-10-04 17:32:23 +02:00
http.c BUG/MINOR: http: skip leading zeroes in content-length values 2023-08-09 11:28:48 +02:00
http_acl.c CLEANUP: acl: don't reference the generic pattern deletion function anymore 2020-11-05 19:27:09 +01:00
http_act.c MINOR: support for http-response set-timeout 2023-10-17 08:27:33 +02:00
http_ana.c MINOR: tree-wide: Only rely on co_data() to check channel emptyness 2023-10-17 18:51:13 +02:00
http_client.c MEDIUM: tree-wide: logsrv struct becomes logger 2023-10-13 10:05:06 +02:00
http_conv.c CLEANUP: assorted typo fixes in the code and comments 2023-04-01 18:33:40 +02:00
http_ext.c BUG/MINOR: http_ext: unhandled ERR_ABORT in proxy_http_parse_7239() 2023-07-06 15:41:17 +02:00
http_fetch.c MEDIUM: tree-wide: fetches that may return IPV4+IPV6 now return ADDR 2023-07-03 16:32:01 +02:00
http_htx.c MINOR: http_htx/errors: prevent the use of some keywords when not in tcp/http mode 2023-10-06 15:34:30 +02:00
http_rules.c MINOR: tree-wide: use free_acl_cond() where relevant 2023-05-11 15:37:04 +02:00
htx.c OPTIM: htx: inline the most common memcpy(8) 2023-02-03 13:39:18 +01:00
init.c MINOR: init: add the pre-check callback 2022-04-22 15:45:47 +02:00
jwt.c MINOR: jwt: Add support for RSA-PSS signatures (PS256 algorithm) 2023-03-08 10:43:04 +01:00
lb_chash.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
lb_fas.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
lb_fwlc.c BUG/MEDIUM: leastconn: fix rare possibility of divide by zero 2021-09-22 07:24:02 +02:00
lb_fwrr.c CLEANUP: assorted typo fixes in the code and comments 2021-08-16 12:37:59 +02:00
lb_map.c MINOR: server: replace the pendconns-related stuff with a struct queue 2021-06-22 18:43:14 +02:00
linuxcap.c MEDIUM: capabilities: enable support for Linux capabilities 2023-08-29 11:11:50 +02:00
listener.c MINOR: listener: forbid most keywords for reverse HTTP bind 2023-10-20 17:28:08 +02:00
log.c MINOR: dgram: allow to set rcv/sndbuf for dgram sockets as well 2023-10-18 17:01:19 +02:00
lru.c BUILD/DEBUG: lru: fix printf format in debug code 2022-04-12 08:19:33 +02:00
mailers.c MINOR: mailers/hlua: disable email sending from lua 2023-05-05 16:28:32 +02:00
map.c MEDIUM: map/acl: Replace map/acl spin lock by a read/write lock. 2023-08-25 15:42:03 +02:00
mjson.c BUILD: mjson: Fix warning about unused variables 2023-05-11 09:22:46 +02:00
mqtt.c MEDIUM: mqtt: support mqtt_is_valid and mqtt_field_value converters for MQTTv3.1 2022-03-22 09:25:52 +01:00
mux_fcgi.c MEDIUM: tree-wide: logsrv struct becomes logger 2023-10-13 10:05:06 +02:00
mux_h1.c REORG: stconn/muxes: Rename init step in fast-forwarding 2023-10-18 12:46:55 +02:00
mux_h2.c BUG/MINOR: mux-h2: commit the current stream ID even on reject 2023-10-20 21:09:12 +02:00
mux_pt.c REORG: stconn/muxes: Rename init step in fast-forwarding 2023-10-18 12:46:55 +02:00
mux_quic.c BUG/MINOR: mux-quic: fix free on qcs-new fail alloc 2023-10-13 08:52:29 +02:00
mworker-prog.c MEDIUM: clock: replace timeval "now" with integer "now_ns" 2023-04-28 16:08:08 +02:00
mworker.c MEDIUM: mworker: display a more accessible message when a worker crash 2023-09-05 15:31:04 +02:00
namespace.c BUG/MINOR: namespace: missing free in netns_sig_stop() 2023-06-14 11:27:29 +02:00
ncbuf.c MINOR: ncbuf: missing malloc checks in standalone code 2023-05-12 09:45:30 +02:00
pattern.c MINOR: pattern/ip: simplify pat_match_ip() function 2023-09-21 09:50:56 +02:00
payload.c MEDIUM: tree-wide: fetches that may return IPV4+IPV6 now return ADDR 2023-07-03 16:32:01 +02:00
peers.c BUG/MEDIUM: peers: Fix synchro for huge number of tables 2023-10-20 14:32:12 +02:00
pipe.c CLEANUP: atomic/tree-wide: replace single increments/decrements with inc/dec 2021-04-07 18:18:37 +02:00
pool.c DEBUG: pool: store the memprof bin on alloc() and update it on free() 2023-10-17 17:13:56 +02:00
proto_quic.c MINOR: dgram: allow to set rcv/sndbuf for dgram sockets as well 2023-10-18 17:01:19 +02:00
proto_reverse_connect.c MINOR: server: convert @reverse to rev@ standard format 2023-10-20 14:44:37 +02:00
proto_sockpair.c MEDIUM: proto: duplicate receivers marked RX_F_MUST_DUP 2023-04-21 17:41:26 +02:00
proto_tcp.c MINOR: protocol: move the global reuseport flag to the protocols 2023-04-23 09:46:15 +02:00
proto_udp.c MINOR: dgram: allow to set rcv/sndbuf for dgram sockets as well 2023-10-18 17:01:19 +02:00
proto_uxdg.c MINOR: proto_ux: ability to dump ABNS names in error messages 2023-02-23 15:05:05 +01:00
proto_uxst.c MINOR: proto: skip socket setup for duped FDs 2023-04-21 17:41:26 +02:00
protocol.c MINOR: quic+openssl_compat: Do not start without "limited-quic" 2023-08-17 15:44:03 +02:00
proxy.c MAJOR: log: introduce log backends 2023-10-13 10:05:06 +02:00
qmux_http.c MINOR: mux-quic: remove dedicated function to handle standalone FIN 2023-05-12 15:50:30 +02:00
qmux_trace.c MINOR: mux-quic: add flow-control info to minimal trace level 2023-03-22 16:08:54 +01:00
qpack-dec.c BUG/MINOR: mux-quic: fix transport VS app CONNECTION_CLOSE 2023-05-09 18:42:34 +02:00
qpack-enc.c BUG/MINOR: qpack: support bigger prefix-integer encoding 2022-05-30 14:30:05 +02:00
qpack-tbl.c CLEANUP: qpack: properly use the QPACK macros not HPACK ones in debug code 2022-11-24 15:38:26 +01:00
queue.c MEDIUM: clock: replace timeval "now" with integer "now_ns" 2023-04-28 16:08:08 +02:00
quic_ack.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_cc.c CLEANUP: quic: fix headers 2022-10-03 16:25:17 +02:00
quic_cc_cubic.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_cc_newreno.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_cc_nocc.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_cli.c BUG/MINOR: quic: Wrong RTT computation (srtt and rrt_var) 2023-09-05 17:14:51 +02:00
quic_conn.c BUG/MEDIUM: quic_conn: let the scheduler kill the task when needed 2023-10-17 17:14:06 +02:00
quic_frame.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_loss.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_openssl_compat.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_rx.c BUG/MINOR: quic: reject packet with no frame 2023-10-11 14:15:31 +02:00
quic_sock.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_ssl.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_stats.c MINOR: quic: fix stats naming for flow control BLOCKED frames 2023-05-26 17:17:00 +02:00
quic_stream.c BUG/MINOR: mux-quic: differentiate failure on qc_stream_desc alloc 2023-05-12 16:26:20 +02:00
quic_tls.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_tp.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_trace.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00
quic_tx.c BUG/MEDIUM: quic-conn: free unsent frames on retransmit to prevent crash 2023-10-13 08:57:08 +02:00
raw_sock.c MEDIUM: raw-sock: Specifiy amount of data to send via snd_pipe callback 2023-10-17 18:51:13 +02:00
regex.c BUG/MINOR: regex: Properly handle PCRE2 lib compiled without JIT support 2022-09-01 19:34:46 +02:00
resolvers.c MEDIUM: resolvers: Stop scheduling resolution during stopping stage 2023-05-17 16:48:33 +02:00
ring.c CLEANUP: ring: rename the ring lock "RING_LOCK" instead of "LOGSRV_LOCK" 2023-09-20 21:38:33 +02:00
sample.c MINOR: sample: Added support for Arrays in sample_conv_json_query in sample.c 2023-10-20 18:42:05 +02:00
server.c MINOR: server: convert @reverse to rev@ standard format 2023-10-20 14:44:37 +02:00
server_state.c BUG/MINOR: server-state: Avoid warning on 'file not found' 2023-07-21 15:08:27 +02:00
session.c MINOR: connection: prepare init code paths for active reverse 2023-08-24 17:02:37 +02:00
sha1.c BUILD: use inttypes.h instead of stdint.h 2019-04-01 07:44:56 +02:00
shctx.c MINOR: shctx: add a few BUG_ON() for consistency checks 2021-11-19 19:25:13 +01:00
signal.c BUG/MINOR: signals/poller: ensure wakeup from signals 2022-09-09 11:15:22 +02:00
sink.c MINOR: server: introduce "log-bufsize" kw 2023-10-13 10:05:07 +02:00
slz.c IMPORT: slz: implement a synchronous flush() operation 2023-06-30 16:12:36 +02:00
sock.c MINOR: sock: add a function to check for SO_REUSEPORT support at runtime 2023-04-23 09:46:15 +02:00
sock_inet.c MINOR: protocol: move the global reuseport flag to the protocols 2023-04-23 09:46:15 +02:00
sock_unix.c MEDIUM: proto: duplicate receivers marked RX_F_MUST_DUP 2023-04-21 17:41:26 +02:00
ssl_ckch.c MINOR: properly mark the end of the CLI command in error messages 2023-09-04 18:13:43 +02:00
ssl_crtlist.c MINOR: ssl: allow to change the signature algorithm for client authentication 2023-05-05 00:05:46 +02:00
ssl_ocsp.c BUG/MINOR: ssl: Fix potential leak in cli_parse_update_ocsp_response 2023-03-31 09:10:36 +02:00
ssl_sample.c MEDIUM: ssl: new sample fetch method to get curve name 2023-07-17 15:45:41 +02:00
ssl_sock.c BUG/MAJOR: connection: make sure to always remove a connection from the tree 2023-10-12 14:20:03 +02:00
ssl_utils.c BUILD: ssl: ssl_c_r_dn fetches uses functiosn only available since 1.1.1 2023-05-15 12:07:52 +02:00
stats.c MINOR: tree-wide: Only rely on co_data() to check channel emptyness 2023-10-17 18:51:13 +02:00
stconn.c MINOR: global: Add an option to disable the zero-copy forwarding 2023-10-17 18:51:13 +02:00
stick_table.c BUG/MINOR: stktable: allow sc-add-gpc from tcp-request connection 2023-08-14 09:03:49 +02:00
stream.c MINOR: tree-wide: Only rely on co_data() to check channel emptyness 2023-10-17 18:51:13 +02:00
task.c BUG/MINOR: task: allow to use tasklet_wakeup_after with tid -1 2023-04-18 16:20:47 +02:00
tcp_act.c MINOR: tcp_act: remove limitation on protocol for attach-srv 2023-09-29 18:11:10 +02:00
tcp_rules.c MINOR: tcp_rules: tcp-{request,response} requires TCP or HTTP mode 2023-10-06 15:34:30 +02:00
tcp_sample.c MINOR: sample: accept_date / request_date return %Ts / %tr timestamp values 2023-07-24 17:12:29 +02:00
tcpcheck.c CLEANUP: fix a few reported typos in code comments 2023-05-07 07:07:44 +02:00
thread.c CLEANUP: ring: rename the ring lock "RING_LOCK" instead of "LOGSRV_LOCK" 2023-09-20 21:38:33 +02:00
time.c REORG: time: move time-keeping code and variables to clock.c 2021-10-08 17:22:26 +02:00
tools.c MINOR: cfgparse: rename "rev@" prefix to "rhttp@" 2023-10-20 14:44:37 +02:00
trace.c BUG/MINOR: trace: fix trace parser error reporting 2023-10-19 14:45:07 +02:00
uri_auth.c CLEANUP: Compare the return value of XXXcmp() functions with zero 2021-01-04 10:09:02 +01:00
uri_normalizer.c MINOR: uri_normalizer: Add fragment-encode normalizer 2021-05-11 17:24:32 +02:00
vars.c BUILD: vars: use __fallthrough in var_accounting_{diff,add}() 2022-11-14 11:14:02 +01:00
version.c BUILD: Fix build by including haproxy/global.h 2020-06-16 23:36:04 +02:00
wdt.c BUG/MEDIUM: wdt: fix wrong thread being checked for sleeping 2023-02-17 16:01:34 +01:00
xprt_handshake.c CLEANUP: pool/tree-wide: remove suffix "_pool" from certain pool names 2022-06-23 11:49:09 +02:00
xprt_quic.c REORG: quic: cleanup traces definition 2023-10-11 14:15:31 +02:00