Your message dated Thu, 26 Mar 2015 21:19:24 +0000
with message-id <e1ybfbu-00024b...@franck.debian.org>
and subject line Bug#780989: fixed in dulwich 0.9.7-3
has caused the Debian Bug report #780989,
regarding python-dulwich: CVE-2014-9706: arbitrary command execution 
vulnerability in conjunction with git
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
780989: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780989
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: python-dulwich
Version: 0.8.5-2
Severity: normal
Control: tag -1 + security fixed-upstream

This is like CVE-2014-9390, except without the part where it makes any
attempt to avoid paths involving ".git/".  So if someone uses dulwich to
checkout a tree and then does something there with git proper, we get
all the problems of CVE-2014-9390, but without any need for a
case-insensitive filesystem: this would be directly exploitable on a
standard Debian system, assuming you had some program that actually used
dulwich to checkout a tree onto the filesystem.

I believe this is what the security team calls "local (remote)".

I found the problem described in
<https://lists.launchpad.net/dulwich-users/msg00827.html>:

,----[ Re: Git vulnerability CVE-2014-9390 ]
|     To: Andi McClure <andi.m.mcclure@xxxxxxxxx>
|     From: Gary van der Merwe <garyvdm@xxxxxxxxx>
|     Date: Fri, 19 Dec 2014 00:57:33 +0200
|     Cc: dulwich-users <dulwich-users@xxxxxxxxxxxxxxxxxxx>
|     In-reply-to: 
<CAJDLOYLGjkZrFVTYtd=zkaipnzgbs28kktnxwoxyunoz5md...@mail.gmail.com>
| 
| On Thu, Dec 18, 2014 at 11:45 PM, Andi McClure <andi.m.mcclure@xxxxxxxxx> 
wrote:
| >
| > News is going around today about a potential-remote-code-execution 
vulnerability in the standard git clients:
| >
| > https://github.com/blog/1938-git-client-vulnerability-announced
| >
| > Is Dulwich potentially affected?
| 
| Yes. And not only on case insensitive file systems, like with git, but
| always :-(
| 
| I've attached a file to demonstrate it. It creates a repo with a
| commit of a .git/hooks/pre-commit file. Git prevents writing this file
| to the working tree, but dulwich happily writes it out.
| 
| /tmp % ./cve-2014-9390-create.py
| /tmp % cd cve-2014-9390-repo.git
| /tmp/cve-2014-9390-repo.git (git)-[master] % git reset --hard
| error: Invalid path '.git/hooks/pre-commit'
| HEAD is now at 1c27312 Evil commit
| /tmp/cve-2014-9390-repo.git (git)-[master] % dulwich reset --hard
| /tmp/cve-2014-9390-repo.git (git)-[master] % git commit -m "test" 
--allow-empty
| You just got cracked! (not really but you could have been!)
| [master 29a7100] test
| 
| For my own use cases of dulwich, I'm not affected by this as I only
| ever read and write directly to repos with dulwich with out checking
| out trees to a working tree.  Do other users actually use the dulwich
| index module, or porcilian commands.
| 
| How do we fix this? I assume we start by filtering what we write in
| dulwich.index.build_index_from_tree? Filtering the case sensitive and
| case insensitive cases is easy, but some of the other edge cases
| ("git~1" on windows, ".g\u200cit" on HFS+) are a little more tricky.
| Do we care about preventing a user from adding these paths to the
| index?
| 
| 
| Gary
...
[ Demo scrubbed ]
...
`----

And the CVE was assigned at <http://seclists.org/oss-sec/2015/q1/939>:

,----
| > Does the scope of CVE-2014-9390 also include these bits
| > from the above:
|  
| > dulwich happily clones a repository which contains commit with invalid
| > paths, say .git/hooks/pre-commit, and thus allowing execution of code
| > on subsequent commits.
| 
| No, the scope of CVE-2014-9390 does not include that. Use
| CVE-2014-9706 for this vulnerability in dulwich.
| 
| The scope of CVE-2014-9390 is currently undefined, in part because
| http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-9390
| intentionally doesn't have any related information. Usage of
| CVE-2014-9390 is, very roughly, concerned with "The string .git/ for a
| directory name has always been considered Very Special. Therefore,
| other strings with equivalence relationships to .git/ must also be
| considered Very Special."
| 
| The root cause of the problem in dulwich seems to be "The string .git/
| for a directory name was not considered Very Special." This is
| completely distinct conceptually, and is a much simpler case for CVE
| coverage.
| 
| There are two types of concerns with CVE-2014-9390. First,
| CVE-2014-9390 can only apply to omitted equivalence-relationship
| handling in source code that is, or is directly copied from, "Git
| before 1.8.5.6, 1.9.x before 1.9.5, 2.0.x before 2.0.5, 2.1.x before
| 2.1.4, and 2.2.x before 2.2.1" source code. It is not possible to have
| a CVE for a cross-implementation vulnerability class of this
| equivalence-relationship handling. Second, usage of CVE-2014-9390
| seems to span multiple types of problems, possibly including all of:
| 
|   http://cwe.mitre.org/data/definitions/178.html
|   http://cwe.mitre.org/data/definitions/180.html
|   http://cwe.mitre.org/data/definitions/182.html
`----

This is fixed upstream in
<https://git.samba.org/?p=jelmer/dulwich.git;a=commitdiff;h=091638be3c89f46f42c3b1d57dc1504af5729176>,
slated for inclusion in dulwich 0.9.9, though after that CVE-2014-9390
actually applies (to the extent that it's a meaningful vulnerability
identifier).

-- System Information:
Debian Release: 7.8
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-dulwich depends on:
ii  libc6      2.13-38+deb7u8
ii  python     2.7.3-4+deb7u1
ii  python2.6  2.6.8-1.1
ii  python2.7  2.7.3-6+deb7u2

Versions of packages python-dulwich recommends:
ii  python-fastimport  0.9.2-1

Versions of packages python-dulwich suggests:
pn  python-dulwich-dbg  <none>

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: dulwich
Source-Version: 0.9.7-3

We believe that the bug you reported is fixed in the latest version of
dulwich, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 780...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jelmer Vernooij <jel...@debian.org> (supplier of updated dulwich package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Tue, 24 Mar 2015 22:34:34 +0000
Source: dulwich
Binary: python-dulwich python-dulwich-dbg
Architecture: source amd64
Version: 0.9.7-3
Distribution: jessie
Urgency: medium
Maintainer: Jelmer Vernooij <jel...@debian.org>
Changed-By: Jelmer Vernooij <jel...@debian.org>
Description:
 python-dulwich - Python Git library
 python-dulwich-dbg - Python Git library - Debug Extension
Closes: 780958 780989
Changes:
 dulwich (0.9.7-3) testing-proposed-updates; urgency=medium
 .
   * Add 02_cve_2015-0838: Fix buffer overflow in C implementation of
     apply_delta (CVE-2015-0838). Closes: #780958
   * Add 03_cve_2014-9706: Don't allow writing to files under .git/ when
     checking out working trees (CVE-2014-9706). Closes: #780989
Checksums-Sha1:
 df95be1d3a9f9f0e0efad54d6cee1032e250d780 2084 dulwich_0.9.7-3.dsc
 7c7362c1afb76a87ab6e6ead6e78a465bc2eee2e 407536 dulwich_0.9.7-3.debian.tar.xz
 5d7b2ea3b0d894dce544429ea3795497c824b177 192144 
python-dulwich_0.9.7-3_amd64.deb
 0897ca2853620f697e93156d7a8e5dc1e4e075c4 68930 
python-dulwich-dbg_0.9.7-3_amd64.deb
Checksums-Sha256:
 2ed1f4b70a46401dd86d119c11caa694e1f592734c7ab2a5e39b87a4de00d0bb 2084 
dulwich_0.9.7-3.dsc
 1f4b1095e39077e51919c7cd6a43bd667790aee3227c3ae3d39cf150b9ce4a1c 407536 
dulwich_0.9.7-3.debian.tar.xz
 df53edc4554cf8d9c6557d262fc9e988a250ae09addf555b3415865b9ed2c4d8 192144 
python-dulwich_0.9.7-3_amd64.deb
 5d383f70892b9e7697541986127aadbf5526cbb440082b88928c2c0cf1a70d30 68930 
python-dulwich-dbg_0.9.7-3_amd64.deb
Files:
 ff5dcc3118fc447178983bbb2e71f7cf 2084 python optional dulwich_0.9.7-3.dsc
 373fa036faa90ad153b572910b93d8ab 407536 python optional 
dulwich_0.9.7-3.debian.tar.xz
 4c34ece84548ab183ae5a7927800fd2e 192144 python optional 
python-dulwich_0.9.7-3_amd64.deb
 05c1349c47b67ab45f5612b54a61b616 68930 debug extra 
python-dulwich-dbg_0.9.7-3_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCgAGBQJVFHXOAAoJEACAbyvXKaRXzosP/RqjYIrEpsRCBnoA2xEOsze3
SN2MO+oTTPfulKNEIqkWfz6VxfagQPl2C+0g7yLs7DztHz7R/9LRpVV0f8sPUBnb
7avw5SV4pTANwsYnTRHuHrxCmO/FywfpArnZJW7j1vvwyxG3H3153vou/TaXKQuS
9YuRjMHPU/of8+twbSqwxk6sadxfLsHo21ANf4D7h5vkrSoqQy6j+eDIgRUOMgNq
lI9PZb7ixMZ+6d3gnyFrcOgBLtgpX3cowQ6+ApWuQFQUwWk1gk4Rwyp6rMrcgM4J
lxufTxqvTjJ5b1gQ8yMQyBfEmsJslv5e6v+BTei1sKB9kA7jTFGzHZtRxNIjS6Sm
WDZWG1I8AWGmWuarnt69EiYbNj8HaT6lQlVAinki8yfCwpMhC3XBNYvOuBSH0A5f
OMmb6zcse2Ak+WGcJhvcO3clTE1tE8D5FzXlVVI7cFes3n279XHwglRBQ0PiSYn4
1Or+RHsLZp+yWGqqmQlINhhzQV9itmQq6DFBsKjAgFJJUm4CYNNNsgJ5GsO7cTI4
2K/4PsIzDpvtKYVJ0c8PDoBzNxn/23aCytzHwr5JXETXuKEy0wYMQUAkZqtGV3+y
ONLiqmgVC4kEVlEv8WNBNqUyshblSwWk9kGVJcji5UvcOT9jqXhcgQOsSona8vgv
1jxajMogRh5BLbyvGoJG
=mG6q
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to