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

invalid cast of off_t math to int

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1.0
    • 3.1.1
    • Cache
    • None

    Description

      iocore/CacheWrite.cc:Vol::evac_range calculates its looping values from 64bit off_t values but stores them in 32bit integers:

      CacheWrite.cc#1086711:694-700
       
      int
      Vol::evac_range(off_t low, off_t high, int evac_phase)
      {
        int s = offset_to_vol_offset(this, low);
        int e = offset_to_vol_offset(this, high);
        int si = dir_offset_evac_bucket(s);
        int ei = dir_offset_evac_bucket(e);
      

      When Vol::start and/or the low high parameters get large enough these loop values become truncated and potentially negative causing a general protection fault as it attempts to access memory addresses below the valid range.

      Attachments

        Activity

          People

            zwoop Leif Hedstrom
            wanderingbort Bart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: