varnish-cache:6.2

Last commit made on 2019-08-27
Get this branch:
git clone -b 6.2 https://git.launchpad.net/varnish-cache

Branch merges

Branch information

Name:
6.2
Repository:
lp:varnish-cache

Recent commits

9f8588e... by Martin Blix Grydeland <email address hidden> on 2019-08-23

Prepare for 6.2.1

Release Varnish 6.2.1

6da64a4... by Martin Blix Grydeland <email address hidden> on 2019-08-23

Avoid some code duplication

Apply some adjustments to recent patches based off of review by Nils
Goroll at UPLEX (@nigoroll)

af13de0... by Martin Blix Grydeland <email address hidden> on 2019-08-15

Add a test case covering some HTTP/1 parsing corner cases

ec3997a... by Martin Blix Grydeland <email address hidden> on 2019-08-15

Fix HTTP header line continuation in http1_dissect_hdrs

When clearing the [CR]LF in a line continuation, we would continue
replacing any [CR|LF|HT|SP] characters up until the end of the buffer,
possibly overwriting later [CR]LFs. Fix this by only unconditionally
overwrite one [CR]LF, and then only replace [HT|SP] with SP to keep with
previous behaviour.

Update r00494.vtc to include multiple line continuations to make sure they
are parsed.

3471718... by Martin Blix Grydeland <email address hidden> on 2019-08-15

Be stricter on final [CR]LF parsing in http1_dissect_hdrs

The end of http1_dissect_hdrs ends with skipping over the final [CR]LF
that marks then end of the headers. Currently that skip is optional, that
is, it is skipped if it was present.

This patch adds an assert if the final [CR]LF is not found when finishing
the parsing. HTTP1_Complete guarantees that it is there, if not we would
not have started parsing the request or response in the first place, and
if it is missing, there must be an error in the parsing leading up to it.

dd47e65... by Martin Blix Grydeland <email address hidden> on 2019-08-15

Do not set the proto txt.b value when third field is missing

In http1_splitline, if the third field is missing, we would still set the
txt.b value to where the field would have been, with a NULL txt.e
entry. This would cause http_Proto to attempt to parse the values
there. Fix this by only setting the .b and .e if the third field was
present.

72df38f... by Martin Blix Grydeland <email address hidden> on 2019-08-15

Fix http1_splitline parsing of 2 field HTTP proto lines using NLNL

When parsing a request like this, "GET /\n\n", the first NL would be
overwritten by nul guard inserted after the 2nd field, and the second NL
would be overwritten by the nul guard after the missing 3rd field. This
would cause http1_dissect_hdrs to attempt to decode the body as headers.

0f0e51e... by Martin Blix Grydeland <email address hidden> on 2019-08-15

Allow a NULL value in http_Proto

The proto field is optional in HTTP, so it may not be set. Set the proto
to 0 also for a NULL value instead of segfaulting if it were NULL.

1cb778f... by Alf-André Walla <email address hidden> on 2019-08-13

Add bounds-checking to vct_iscrlf and vct_skipcrlf

The macros vct_iscrlf() and vct_skipcrlf() may look at one or two bytes
after its pointer value, causing OOB reads. This would allow
http1_dissect_hdrs to wrongly see a CRLF when one wasn't there (the last
LF left over in the bufer from the previous request).

Change the macros to inline functions, and harden them by always sending
the end pointer so that they can't overflow.

vct_iscrlf() will return an int value of 0 for no [CR]LF, 1 for LF and 2
for CRLF.

vct_skipcrlf() will return the pointer having been skipped 0, 1 or 2
bytes.

b14a3d3... by Pål Hermunn Johansen <email address hidden> on 2019-03-15

Prepare for 6.2.0

This is the first commit in the 6.2 branch, and marks the release
of Varnish Cache 6.2.0.