Re: [PATCH] Fix buffer overflow in git-grep

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: <git@...>
Date: Wednesday, July 16, 2008 - 7:54 am

On Wed, Jul 16, 2008 at 12:35:06PM +0200, Johannes Schindelin wrote:

Sure, but other git commands do not work much better in this case.
In fact, what you called as "brutal" may be considered as very
polite comparing to what other git commands did.

For instance, git show will show you nothing at all and exit with 0.
The same problem with git whatchanged. The whole history mysteriously
disappeared at that commit, and git whatchanged exited with 0 without
any error or warning... Though git log will show you all history, but
if you run it with -p then it will also exit with zero at this commit
silently like previously history do not exist at all. So, I didn't see
any reason to make git grep to work in the situation where practically
any other git command does not. I guess, they should be corrected too,
but I did not have time to look at them yet.


It is probably a good suggestion, but I just wanted to provided a quick
fix to what may be considered as security issue. Of course, you usually
do not grep on untrusted repos, but if you did and something nasty
happened to you. I don't think it will help Git's reputation as being
secure and reliable...

Now the question is whether we really want to fix all Git commands that
do not touch the work tree to work with filenames longer than PATH_MAX?

Dmitry
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix buffer overflow in git-grep, Dmitry Potapov, (Wed Jul 16, 6:15 am)
Re: [PATCH] Fix buffer overflow in git-grep, Johannes Schindelin, (Wed Jul 16, 6:35 am)
[PATCH v2] Fix buffer overflow in git-grep, Dmitry Potapov, (Wed Jul 16, 11:33 am)
Re: [PATCH] Fix buffer overflow in git-grep, Dmitry Potapov, (Wed Jul 16, 7:54 am)
Re: [PATCH] Fix buffer overflow in git-grep, Dmitry Potapov, (Wed Jul 16, 10:33 am)
[PATCH] Fix buffer overflow in git diff, Dmitry Potapov, (Wed Jul 16, 10:54 am)
[PATCH] Fix buffer overflow in prepare_attr_stack, Dmitry Potapov, (Wed Jul 16, 10:54 am)
Re: [PATCH] Fix buffer overflow in prepare_attr_stack, Johannes Sixt, (Wed Jul 16, 11:21 am)
[PATCH v2] Fix buffer overflow in prepare_attr_stack, Dmitry Potapov, (Wed Jul 16, 11:39 am)
Re: [PATCH] Fix buffer overflow in git-grep, Johannes Schindelin, (Wed Jul 16, 10:47 am)