Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-1145

svnserve channel can be corrupted in tunnel mode

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • all
    • unscheduled
    • svnserve
    • None

    Description

      The tunnel mode ra_svn data stream can be corrupted in two ways:
      
        * Dotfiles can output to stdout before svnserve runs.
        * Hook scripts can output to stdout, adding text to the middle of
      the data stream.
      
      When this happens, the user sees a cryptic "Malformed network data"
      error message.
      
      We can solve the second problem by closing stdout before invoking hook
      scripts, although doing this well may involve non-portable gook
      (FD_CLOEXEC).
      
      We can solve the first problem by introducing a guard at the beginning
      of the protocol (either just in tunnel mode or all the time); that is,
      the server would send something like "\n---svn datastream starts
      here---\n" before sending text.  Or, we can introduce a guard for
      every communication ("svn:<length>:<data>" for every chunk of text
      sent, either just in tunnel mode or all the time).
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ghudson Greg Hudson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: