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

CID 1365975, 1365974: Coverity warnings introduced with TS-4399:

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.1.0
    • Component/s: Manager
    • Labels:
      None

      Description

      *** CID 1365975:  Security best practices violations  (TOCTOU)
      /mgmt/LocalManager.cc: 984 in LocalManager::startProxy(const char *)()
      978           Debug("lm", "opt %d = '%s'", i, tok);
      979           options[i++] = tok;
      980         }
      981     
      982         EnableDeathSignal(SIGTERM);
      983     
         CID 1365975:  Security best practices violations  (TOCTOU)
         Calling function "execv" that uses "this->absolute_proxy_binary" after a check function. This can cause a time-of-check, time-of-use race condition.
      984         execv(absolute_proxy_binary, options);
      985         mgmt_fatal(errno, "[LocalManager::startProxy] Exec of %s failed\n", absolute_proxy_binary);
      986       }
      987       return true;
      988     }
      989     
      
      ** CID 1365974:  Null pointer dereferences  (FORWARD_NULL)
      /mgmt/LocalManager.cc: 937 in LocalManager::startProxy(const char *)()
      
      
      ________________________________________________________________________________________________________
      *** CID 1365974:  Null pointer dereferences  (FORWARD_NULL)
      /mgmt/LocalManager.cc: 937 in LocalManager::startProxy(const char *)()
      931         if (onetime_options && *onetime_options) {
      932           real_proxy_options.append(" ", strlen(" "));
      933           real_proxy_options.append(onetime_options, strlen(onetime_options));
      934         }
      935     
      936         // Make sure we're starting the proxy in mgmt mode
         CID 1365974:  Null pointer dereferences  (FORWARD_NULL)
         Passing null pointer "onetime_options" to "strstr", which dereferences it. [Note: The source code implementation of the function has been overridden by a builtin model.]
      937         if (strstr(proxy_options, MGMT_OPT) == 0 && strstr(onetime_options, MGMT_OPT) == 0) {
      938           real_proxy_options.append(" ", strlen(" "));
      939           real_proxy_options.append(MGMT_OPT, sizeof(MGMT_OPT) - 1);
      940         }
      941     
      942         // Check if we need to pass down port/fd information to
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                zwoop Leif Hedstrom
                Reporter:
                zwoop Leif Hedstrom
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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