SubversionException: ('Svndiff contains a too-large window', 185001)

Bug #413113 reported by Russel Winder
60
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Invalid
High
Unassigned
subvertpy
Fix Released
High
Jelmer Vernooij

Bug Description

Sorry for just putting the error as the summary but I have no idea what this actually means.

The context is a Bazaar shared repository containing a checkout of a Subversion branch from which a branch has been taken in the same repository. A trio of commits have been made to the feature branch which are now being pushed to the mirror branch and thence to the Subversion repository.

|> bzr push
Using saved push location: /home/users/russel/Repositories/Bazaar/Subversion/ConcertantLLP_Website/Trunk/
bzr: ERROR: subvertpy.SubversionException: ('Svndiff contains a too-large window', 185001)

Traceback (most recent call last):
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/builtins.py", line 1147, in run
    use_existing_dir=use_existing_dir)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/push.py", line 128, in _show_push_branch
    remember, create_prefix)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/bzrdir.py", line 1285, in push_branch
    tree_to.branch, overwrite, stop_revision=revision_id)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/branch.py", line 952, in push
    *args, **kwargs)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/branch.py", line 3101, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/branch.py", line 2917, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/branch.py", line 3125, in _push_with_bound_branches
    self.source._basic_push(master_branch, overwrite, stop_revision)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/branch.py", line 2315, in _basic_push
    overwrite=overwrite, graph=graph)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/branch.py", line 891, in update_revisions
    overwrite, graph)
  File "/home/users/russel/.bazaar/plugins/svn/branch.py", line 770, in update_revisions
    graph=graph)
  File "/home/users/russel/.bazaar/plugins/svn/branch.py", line 838, in _update_revisions
    push_merged, overwrite=overwrite)
  File "/home/users/russel/.bazaar/plugins/svn/push.py", line 214, in push_branch
    overwrite=overwrite)
  File "/home/users/russel/.bazaar/plugins/svn/push.py", line 236, in push
    override_svn_revprops=target_config.get_override_svn_revprops())
  File "/home/users/russel/.bazaar/plugins/svn/push.py", line 150, in push_revision_tree
    revid = builder.commit(rev.message)
  File "/home/users/russel/.bazaar/plugins/svn/errors.py", line 136, in convert
    raise convert_error(e)
SubversionException: ('Svndiff contains a too-large window', 185001)

bzr 2.0dev on python 2.6.2 (linux2)
arguments: ['/home/users/russel/bin/bzr', 'push']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_GB.UTF-8'
plugins:
  bookmarks /home/users/russel/.bazaar/plugins/bookmarks [unknown]
  builddeb /home/users/russel/.bazaar/plugins/builddeb [2.1.1dev]
  bzrtools /home/users/russel/.bazaar/plugins/bzrtools [1.18]
  dbus /home/users/russel/.bazaar/plugins/dbus [0.1dev]
  email /home/users/russel/.bazaar/plugins/email [unknown]
  explorer /home/users/russel/.bazaar/plugins/explorer [0.7dev]
  fastimport /usr/lib/python2.6/dist-packages/bzrlib/plugins/fastimport [unknown]
  gtk /home/users/russel/.bazaar/plugins/gtk [0.97.0.dev.1]
  launchpad /home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/plugins/launchpad [2.0dev]
  locksvncheckout /home/users/russel/.bazaar/plugins/locksvncheckout [0.0dev]
  loom /usr/lib/python2.6/dist-packages/bzrlib/plugins/loom [1.4dev]
  netrc_credential_store /home/Checkouts/Bazaar/Bazaar/Mainline_Mirror/bzrlib/plugins/netrc_credential_store [2.0dev]
  pqm /usr/lib/python2.6/dist-packages/bzrlib/plugins/pqm [1.3]
  qbzr /home/users/russel/.bazaar/plugins/qbzr [0.14dev]
  rebase /home/users/russel/.bazaar/plugins/rebase [0.5.4dev]
  search /usr/lib/python2.6/dist-packages/bzrlib/plugins/search [1.7dev]
  stats /usr/lib/python2.6/dist-packages/bzrlib/plugins/stats [unknown]
  svn /home/users/russel/.bazaar/plugins/svn [0.6.5dev]
  upload /home/users/russel/.bazaar/plugins/upload [1.0dev]
  xmloutput /home/users/russel/.bazaar/plugins/xmloutput [0.8.5]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

CVE References

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Do you have an easy way to repduce this on a standalone repository?

Revision history for this message
Deeksy (cdekievit) wrote :

I'm getting this same issue on a subversion repository that has been checked out locally. In this case, this is a commit back to a subversion server repository running 1.6.4.

I've checked out the entire repository again, to see if this would fix the issue, but it remains the same.

I've attached the traceback here.

Revision history for this message
Deeksy (cdekievit) wrote :

This issue presents no matter how large the change I'm trying to commit. So a one-line change in a text file will still give the same issue to the point where it is currently impossible to commit to this repository.

Revision history for this message
Deeksy (cdekievit) wrote :

As a follow up, we moved back from subversion 1.6.4 on the server side to 1.6.3 and the problem has gone away. This may well be an issue on the subversion server end.

Revision history for this message
Thomas Krause (krause) wrote :

It looks that this is caused by the security fix described here

http://subversion.tigris.org/security/CVE-2009-2411-advisory.txt

There are several places where this error is thrown after the patch, one of the is e.g.

+ if (tview_len > SVN_DELTA_WINDOW_SIZE ||
+ sview_len > SVN_DELTA_WINDOW_SIZE ||
+ /* for svndiff1, newlen includes the original length */
+ newlen > SVN_DELTA_WINDOW_SIZE + MAX_ENCODED_INT_LEN ||
+ inslen > MAX_INSTRUCTION_SECTION_LEN)
+ return svn_error_create(SVN_ERR_SVNDIFF_CORRUPT_WINDOW, NULL,
+ _("Svndiff contains a too-large window"));

Going back to 1.6.3 would make you vulnerable to the exploit described by the advisory. Does someone know why bzr-svn satisfies the checks of the patch?

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: New → Triaged
Changed in subvertpy:
status: New → Triaged
Changed in bzr-svn:
importance: Undecided → High
Changed in subvertpy:
importance: Undecided → High
Jelmer Vernooij (jelmer)
Changed in subvertpy:
milestone: none → 0.6.9
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

in 0.6.9

Changed in bzr-svn:
status: Triaged → Invalid
Changed in subvertpy:
status: Triaged → Fix Released
Revision history for this message
ChriS (christophe-troestler) wrote :

I use bzr 2.0 and python-subvertpy 0.6.9-1 but got this error nonetheless. bzr.log attached.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

What version of bzr-svn do you use?

Do you get this only on a single repository or everywhere?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.