Uploaded image for project: 'radsecproxy'
  1. radsecproxy
  2. RADSECPROXY-53

Attribute copying is shallow, freeing is not

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • radsecproxy-1.6.5
    • radsecproxy-1.6.4
    • None
    • None

      radmsg_getalltype() copies attributes using list_push() which creates a new list_node and sets its data member to point at 'data'.

      radmsg_copy_attrs() gets a list from radmsg_getalltype() and calls radmsg_add() for all its entries, copying them to 'dst'.

      radmsg_add() uses list_push() to copy, leaving us with a new list pointing to the same data as what's pointed at from the original rq->msg in respond().

      This should result in double freeing or accessing freed memory, depending on what's happening first of freeing of the incoming message or freeing the generated response.

            linus Linus Nordberg
            linus Linus Nordberg
            Archiver:
            kleist Josva Kleist

              Created:
              Updated:
              Resolved:
              Archived: