Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-2792

Large request header causes unexpected remap

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.0.2, 5.0.0
    • Fix Version/s: 5.0.0
    • Component/s: None
    • Labels:

      Description

      I get unexpected remap result when I request with likely 4KB of header. It seems to be caused by coalescing of heaps.

      In url_rewrite_remap_request, requestPath points to the path string of the URL. However, the address of the string may be changed in remap process in this function (e.g. request_url->host_set()). Because large header uses lots of space so reallocation of heap may be caused when we modify the header values. So the memcpy in this function may use the old invalid address as a source, and it results unexpected remap and also results broken log outputs.

      It may not cause crashes, but works incorrectly.

      How to reproduce:
      It's hard to reproduce but I believe that requests with likely 3.5 to 4KB of header causes this problem.

        Attachments

        1. quickfix.diff
          0.9 kB
          Masakazu Kitajo

          Issue Links

            Activity

              People

              • Assignee:
                zwoop Leif Hedstrom
                Reporter:
                maskit Masakazu Kitajo
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: