1. 27 Aug, 2019 10 commits
    • Martin Blix Grydeland's avatar
      Prepare for 6.0.4 · 14d4eee6
      Martin Blix Grydeland authored
      14d4eee6
    • Martin Blix Grydeland's avatar
      Update changelog · a794dc6f
      Martin Blix Grydeland authored
      a794dc6f
    • Martin Blix Grydeland's avatar
    • Martin Blix Grydeland's avatar
      Fix HTTP header line continuation in http1_dissect_hdrs · bf18bb21
      Martin Blix Grydeland authored
      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.
      bf18bb21
    • Martin Blix Grydeland's avatar
      Be stricter on final [CR]LF parsing in http1_dissect_hdrs · 3eb7a045
      Martin Blix Grydeland authored
      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.
      3eb7a045
    • Martin Blix Grydeland's avatar
      Do not set the proto txt.b value when third field is missing · 73befed1
      Martin Blix Grydeland authored
      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.
      73befed1
    • Martin Blix Grydeland's avatar
      Fix http1_splitline parsing of 2 field HTTP proto lines using NLNL · 3dc8c15a
      Martin Blix Grydeland authored
      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.
      3dc8c15a
    • Martin Blix Grydeland's avatar
      Allow a NULL value in http_Proto · f98c2503
      Martin Blix Grydeland authored
      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.
      f98c2503
    • Alf-André Walla's avatar
      Add bounds-checking to vct_iscrlf and vct_skipcrlf · 177e17c8
      Alf-André Walla authored
      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.
      177e17c8
    • Martin Blix Grydeland's avatar
      Update changes.rst · b4af2d11
      Martin Blix Grydeland authored
      b4af2d11
  2. 10 Jul, 2019 18 commits
  3. 04 Jul, 2019 12 commits