public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: "Shawn O. Pearce" <spearce@spearce•org>
To: Nicolas Pitre <nico@fluxnic•net>
Cc: Andy Isaacson <adi@hexapodia•org>,
	Junio C Hamano <gitster@pobox•com>,
	git@vger•kernel.org
Subject: Re: git hang with corrupted .pack
Date: Wed, 14 Oct 2009 09:12:59 -0700	[thread overview]
Message-ID: <20091014161259.GK9261@spearce.org> (raw)
In-Reply-To: <alpine.LFD.2.00.0910141208170.20122@xanadu.home>

Nicolas Pitre <nico@fluxnic•net> wrote:
> > Some types of corruption to a pack may confuse the deflate stream
> > which stores an object.  In Andy's reported case a 36 byte region
> > of the pack was overwritten, leading to what appeared to be a valid
> > deflate stream that was trying to produce a result larger than our
> > allocated output buffer could accept.
...
> This is unfortunate that making a test case for this isn't exactly 
> trivial.

Hmmm.  We could do something like manually create a pack file of
one non-delta blob whose pack header length is 16, but use a zlib
stream whose result body is 64.  Prior to this fix, we'd be stuck
in the infinite loop.  :-)

Its a PITA to create though, you have to hand-craft the test vector
and save it in the repository, we can't produce such a pack with
any real code we ship.

-- 
Shawn.

  reply	other threads:[~2009-10-14 16:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14  4:22 git hang with corrupted .pack Andy Isaacson
2009-10-14 14:23 ` Shawn O. Pearce
2009-10-14 16:09   ` Nicolas Pitre
2009-10-14 16:12     ` Shawn O. Pearce [this message]
2009-10-14 16:42       ` Nicolas Pitre
2009-10-14 18:03         ` Shawn O. Pearce
2009-10-14 18:39           ` Nicolas Pitre
2009-10-15  7:39             ` Junio C Hamano
2009-10-20 15:14               ` Alex Riesen
2009-10-20 15:23                 ` Sverre Rabbelier
2009-10-20 15:36                   ` Alex Riesen
2009-10-26  2:35                 ` Junio C Hamano
2009-10-26  7:07                   ` Alex Riesen
2009-10-26 14:23                   ` Shawn O. Pearce
2009-11-03 21:31                 ` Pascal Obry
2009-11-03 22:28                   ` Shawn O. Pearce
2009-11-03 22:34                     ` Pascal Obry
2009-10-20 16:52   ` Junio C Hamano
2009-10-20 17:13     ` Junio C Hamano
2009-10-20 19:33       ` Junio C Hamano
2009-10-20 19:46         ` Nicolas Pitre
2009-10-20 20:50           ` Junio C Hamano
2009-10-22  6:06             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091014161259.GK9261@spearce.org \
    --to=spearce@spearce$(echo .)org \
    --cc=adi@hexapodia$(echo .)org \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=nico@fluxnic$(echo .)net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox