Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1597

Memory corruption in axis2_http_transport_utils_process_accept_headers()

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: transport/http
    • Labels:
      None

      Description

      There's an obvious bug/typo in src/core/transport/http/util/http_transport_utils.c in function axis2_http_transport_utils_process_accept_headers().
      First, the "Accept:" header is tokenized into <accept_field_list>.
      Then in a loop (iterating over the accept_record_list):
      1) each field is parsed into struct axis2_http_accept_record_t
      2) the struct should be added into a list of records list, <accept_record_list>
      However, there's a typo here and the record is added into the same original list (<accept_field_list>), not into the <accept_record_list>.

      This results in looping over and over the same list with 100% CPU load, and also memory issues (because arbitrary not necessary 0-terminated pieces of memory are being strdup'ed).

        Attachments

          Activity

            People

            • Assignee:
              nandika Korale Gamaralalage Nandika Chandrasiri Jayawardana
              Reporter:
              ipechorin Ivan Pechorin

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment