Skip to content

do not write files outside of work-dir

Erik Faye-Lund git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3A Windows path starting with a backslash is absolutecache.h+1 -10 replies
2/3real_path: do not assume '/' is the path seperatorabspath.c compat/mingw.h git-compat-util.h+15 -20 replies
3/3verify_path: consider dos drive prefixread-cache.c+4 -111 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchTheo Niessink
1/3
2/3
3/3Noticed-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH maint 0/3] do not write files outside of work-dir

Theo Niessink has uncovered a serious sercurity issue in Git for Windows, where cloning an evil repository can arbitrarily overwrite files outside the repository. Since many Windows users run as administrators, this can be used for very nasty purposes.

The first two patches fix "git add" so it reject paths outside of the repository when specified in the "C:\..."-form on Windows.

Patch 3/3 makes sure we don't try to actually write to these files.

This series applies cleanly to 'maint', and I strongly encourage that we apply at the very least 3/3 there.

Erik Faye-Lund (1):
verify_path: consider dos drive prefix

Theo Niessink (2):
A Windows path starting with a backslash is absolute
real_path: do not assume '/' is the path seperator

 abspath.c         |    4 ++--
 cache.h           |    2 +-
 compat/mingw.h    |    9 +++++++++
 git-compat-util.h |    4 ++++
 read-cache.c      |    5 ++++-
 5 files changed, 20 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.5.3.3.g435ff