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

TSMimeHdrFieldValueStringInsert() can use freed memory to edit headers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.4
    • 3.1.4, 3.1.0, 3.0.0
    • MIME
    • None

    Description

      TSMimeHdrFieldValueStringInsert() and other TSMimeHdrFieldValue*() APIs can use freed memory to edit headers
      due to calling HdrHeap::coalesce_str_heaps() from HdrHeap::allocate_str() from
      mime_field_value_insert_comma_val() and other mime_field_value_*comma_val() functions while holding pointers
      into the HdrHeap.
      I have a hacky but functional patch for this.

      Attachments

        1. headers-prealloc.diff
          2 kB
          William Bardwell

        Activity

          People

            zwoop Leif Hedstrom
            wbardwel William Bardwell
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: