Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-4809

do_completion() use-after-free when log level is debug

Add voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • c client

    Description

      void *do_completion(void *v)
      {
          zhandle_t *zh = v;
          // ...
          api_epilog(zh, 0);  // L1
          LOG_DEBUG(LOGCALLBACK(zh), "completion thread terminated");  // L2
          return 0;
      }
      

      When the log level is debug, L2 gets the log calback after zookeeper_close(), causes uaf.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            fanyang fanyang

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m

                Slack

                  Issue deployment