From: Jeff King Date: Thu, 13 Mar 2014 13:44:09 GMT Subject: Re: [PATCH 0/2] Fix possible buffer overflow in remove_subtree() Message-ID: <20140313134409.GA22046@sigill.intra.peff.net> In-Reply-To: <1394702348-6433-1-git-send-email-mhagger@alum.mit.edu> On Thu, Mar 13, 2014 at 10:19:06AM +0100, Michael Haggerty wrote: > These patches are proposed for maint (but also apply cleanly to > master). > > I presume that this is exploitable via Git commands, though I haven't > verified it explicitly [1]. It's possible to overflow this buffer, like: git init repo && cd repo && blob=$(git hash-object -w /dev/null) && big=$(perl -e 'print "a" x 250') (for i in $(seq 1 17); do mkdir $big && cd $big; done) printf "100644 blob $blob\t$big\n" >tree && tree=$(git mktree